From 89a2939b6a44a1af7595ce02042a35f9a2df9208 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 6 Aug 2026 21:06:57 +0000 Subject: [PATCH 1/2] chore: update protobuf to 33.2 and rules_python to 1.6.0 PiperOrigin-RevId: 960369644 Source-Link: https://github.com/googleapis/googleapis/commit/fc62df08979faf46d3c4d7eec30c57e6046a29f1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/80c59368f6b8c91fcf55e9f937519203b45c22f3 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWRhdGFfc291cmNlcy12MS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWRhdGFfc291cmNlcy12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWludmVudG9yaWVzLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI4MGM1OTM2OGY2YjhjOTFmY2Y1NWU5ZjkzNzUxOTIwM2I0NWMyMmYzIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWludmVudG9yaWVzLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWxmcC12MS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LWxmcC12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXByb2R1Y3RzLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI4MGM1OTM2OGY2YjhjOTFmY2Y1NWU5ZjkzNzUxOTIwM2I0NWMyMmYzIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXByb2R1Y3RzLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXByb21vdGlvbnMtdjEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXByb21vdGlvbnMtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiI4MGM1OTM2OGY2YjhjOTFmY2Y1NWU5ZjkzNzUxOTIwM2I0NWMyMmYzIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXJlcG9ydHMtdjEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXJlcG9ydHMtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiI4MGM1OTM2OGY2YjhjOTFmY2Y1NWU5ZjkzNzUxOTIwM2I0NWMyMmYzIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXJldmlld3MtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiI4MGM1OTM2OGY2YjhjOTFmY2Y1NWU5ZjkzNzUxOTIwM2I0NWMyMmYzIn0= Copy-Tag: eyJwIjoiZ3JhZmVhcy12MS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 --- .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../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 | 986 ++++++ .../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 | 901 ++++++ .../data_sources_service/rest/service_stub.rb | 452 +++ .../data_sources/v1/file_uploads_service.rb | 57 + .../v1/file_uploads_service/client.rb | 486 +++ .../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 | 436 +++ .../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 | 593 ++++ .../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 | 128 + .../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 | 49 + .../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 | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../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 | 982 ++++++ .../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 | 897 ++++++ .../data_sources_service/rest/service_stub.rb | 452 +++ .../v1beta/file_uploads_service.rb | 57 + .../v1beta/file_uploads_service/client.rb | 486 +++ .../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 | 436 +++ .../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 | 593 ++++ .../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 | 128 + .../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 | 49 + .../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 | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../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 | 33 + .../inventories/v1/local_inventory_service.rb | 57 + .../v1/local_inventory_service/client.rb | 804 +++++ .../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 | 740 +++++ .../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 | 807 +++++ .../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 | 743 +++++ .../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 | 593 ++++ .../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 | 128 + .../inventories/v1/inventories_common.rb | 275 ++ .../merchant/inventories/v1/localinventory.rb | 258 ++ .../inventories/v1/regionalinventory.rb | 262 ++ .../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 | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../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 | 713 +++++ .../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 | 649 ++++ .../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 | 713 +++++ .../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 | 649 ++++ .../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 | 593 ++++ .../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 | 128 + .../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 | 35 + .../.gitignore | 20 + .../.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 | 15 + .../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 | 490 +++ .../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 | 440 +++ .../rest/service_stub.rb | 145 + .../lfp/v1/lfp_merchant_state_service.rb | 62 + .../v1/lfp_merchant_state_service/client.rb | 490 +++ .../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 | 440 +++ .../rest/service_stub.rb | 144 + .../merchant/lfp/v1/lfp_sale_service.rb | 59 + .../lfp/v1/lfp_sale_service/client.rb | 488 +++ .../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 | 438 +++ .../v1/lfp_sale_service/rest/service_stub.rb | 145 + .../merchant/lfp/v1/lfp_store_service.rb | 59 + .../lfp/v1/lfp_store_service/client.rb | 790 +++++ .../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 | 719 +++++ .../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 | 593 ++++ .../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 | 128 + .../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 | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../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 | 490 +++ .../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 | 440 +++ .../rest/service_stub.rb | 145 + .../lfp/v1beta/lfp_merchant_state_service.rb | 59 + .../lfp_merchant_state_service/client.rb | 486 +++ .../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 | 436 +++ .../rest/service_stub.rb | 144 + .../merchant/lfp/v1beta/lfp_sale_service.rb | 59 + .../lfp/v1beta/lfp_sale_service/client.rb | 488 +++ .../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 | 438 +++ .../lfp_sale_service/rest/service_stub.rb | 145 + .../merchant/lfp/v1beta/lfp_store_service.rb | 59 + .../lfp/v1beta/lfp_store_service/client.rb | 790 +++++ .../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 | 719 +++++ .../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 | 593 ++++ .../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 | 128 + .../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 | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 ++ .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 52 + ...ogle-shopping-merchant-products-v1.gemspec | 29 + .../google-shopping-merchant-products-v1.rb | 21 + .../google/shopping/merchant/products/v1.rb | 48 + .../products/v1/product_inputs_service.rb | 57 + .../v1/product_inputs_service/client.rb | 765 +++++ .../v1/product_inputs_service/credentials.rb | 49 + .../v1/product_inputs_service/paths.rb | 66 + .../v1/product_inputs_service/rest.rb | 54 + .../v1/product_inputs_service/rest/client.rb | 701 +++++ .../rest/service_stub.rb | 268 ++ .../merchant/products/v1/productinputs_pb.rb | 35 + .../products/v1/productinputs_services_pb.rb | 71 + .../products/v1/products_common_pb.rb | 104 + .../merchant/products/v1/products_pb.rb | 33 + .../merchant/products/v1/products_service.rb | 57 + .../products/v1/products_service/client.rb | 636 ++++ .../v1/products_service/credentials.rb | 49 + .../products/v1/products_service/paths.rb | 66 + .../products/v1/products_service/rest.rb | 54 + .../v1/products_service/rest/client.rb | 579 ++++ .../v1/products_service/rest/service_stub.rb | 205 ++ .../products/v1/products_services_pb.rb | 57 + .../shopping/merchant/products/v1/rest.rb | 40 + .../shopping/merchant/products/v1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++++ .../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 | 128 + .../merchant/products/v1/productinputs.rb | 297 ++ .../shopping/merchant/products/v1/products.rb | 221 ++ .../merchant/products/v1/products_common.rb | 2786 +++++++++++++++++ .../proto_docs/google/shopping/type/types.rb | 248 ++ .../proto_docs/google/type/interval.rb | 45 + .../snippets/Gemfile | 32 + .../delete_product_input.rb | 47 + .../insert_product_input.rb | 47 + .../update_product_input.rb | 47 + .../snippets/products_service/get_product.rb | 47 + .../products_service/list_products.rb | 51 + ..._google.shopping.merchant.products.v1.json | 215 ++ .../v1/product_inputs_service_paths_test.rb | 67 + .../v1/product_inputs_service_rest_test.rb | 266 ++ .../v1/product_inputs_service_test.rb | 288 ++ .../v1/products_service_paths_test.rb | 67 + .../products/v1/products_service_rest_test.rb | 209 ++ .../products/v1/products_service_test.rb | 229 ++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 ++ .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 52 + ...-shopping-merchant-products-v1beta.gemspec | 29 + ...oogle-shopping-merchant-products-v1beta.rb | 21 + .../shopping/merchant/products/v1beta.rb | 48 + .../products/v1beta/product_inputs_service.rb | 58 + .../v1beta/product_inputs_service/client.rb | 733 +++++ .../product_inputs_service/credentials.rb | 49 + .../v1beta/product_inputs_service/paths.rb | 66 + .../v1beta/product_inputs_service/rest.rb | 55 + .../product_inputs_service/rest/client.rb | 669 ++++ .../rest/service_stub.rb | 268 ++ .../products/v1beta/productinputs_pb.rb | 35 + .../v1beta/productinputs_services_pb.rb | 68 + .../products/v1beta/products_common_pb.rb | 54 + .../merchant/products/v1beta/products_pb.rb | 33 + .../products/v1beta/products_service.rb | 57 + .../v1beta/products_service/client.rb | 606 ++++ .../v1beta/products_service/credentials.rb | 49 + .../products/v1beta/products_service/paths.rb | 66 + .../products/v1beta/products_service/rest.rb | 54 + .../v1beta/products_service/rest/client.rb | 549 ++++ .../products_service/rest/service_stub.rb | 205 ++ .../products/v1beta/products_services_pb.rb | 57 + .../shopping/merchant/products/v1beta/rest.rb | 40 + .../merchant/products/v1beta/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++++ .../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 | 128 + .../merchant/products/v1beta/productinputs.rb | 213 ++ .../merchant/products/v1beta/products.rb | 166 + .../products/v1beta/products_common.rb | 1029 ++++++ .../proto_docs/google/shopping/type/types.rb | 248 ++ .../proto_docs/google/type/interval.rb | 45 + .../snippets/Gemfile | 32 + .../delete_product_input.rb | 47 + .../insert_product_input.rb | 47 + .../update_product_input.rb | 47 + .../snippets/products_service/get_product.rb | 47 + .../products_service/list_products.rb | 51 + ...gle.shopping.merchant.products.v1beta.json | 215 ++ .../product_inputs_service_paths_test.rb | 67 + .../product_inputs_service_rest_test.rb | 266 ++ .../v1beta/product_inputs_service_test.rb | 288 ++ .../v1beta/products_service_paths_test.rb | 67 + .../v1beta/products_service_rest_test.rb | 209 ++ .../products/v1beta/products_service_test.rb | 229 ++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 ++ .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 33 + ...le-shopping-merchant-promotions-v1.gemspec | 29 + .../google-shopping-merchant-promotions-v1.rb | 21 + .../google/shopping/merchant/promotions/v1.rb | 47 + .../promotions/v1/promotions_common_pb.rb | 38 + .../merchant/promotions/v1/promotions_pb.rb | 34 + .../promotions/v1/promotions_service.rb | 57 + .../v1/promotions_service/client.rb | 703 +++++ .../v1/promotions_service/credentials.rb | 49 + .../promotions/v1/promotions_service/paths.rb | 52 + .../promotions/v1/promotions_service/rest.rb | 54 + .../v1/promotions_service/rest/client.rb | 639 ++++ .../promotions_service/rest/service_stub.rb | 267 ++ .../promotions/v1/promotions_services_pb.rb | 60 + .../shopping/merchant/promotions/v1/rest.rb | 39 + .../merchant/promotions/v1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++++ .../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/timestamp.rb | 128 + .../merchant/promotions/v1/promotions.rb | 176 ++ .../promotions/v1/promotions_common.rb | 446 +++ .../proto_docs/google/shopping/type/types.rb | 248 ++ .../proto_docs/google/type/interval.rb | 45 + .../snippets/Gemfile | 32 + .../promotions_service/get_promotion.rb | 47 + .../promotions_service/insert_promotion.rb | 47 + .../promotions_service/list_promotions.rb | 51 + ...oogle.shopping.merchant.promotions.v1.json | 135 + .../v1/promotions_service_paths_test.rb | 55 + .../v1/promotions_service_rest_test.rb | 265 ++ .../promotions/v1/promotions_service_test.rb | 291 ++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 ++ .../README.md | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 33 + ...hopping-merchant-promotions-v1beta.gemspec | 29 + ...gle-shopping-merchant-promotions-v1beta.rb | 21 + .../shopping/merchant/promotions/v1beta.rb | 47 + .../promotions/v1beta/promotions_common_pb.rb | 38 + .../promotions/v1beta/promotions_pb.rb | 34 + .../promotions/v1beta/promotions_service.rb | 57 + .../v1beta/promotions_service/client.rb | 692 ++++ .../v1beta/promotions_service/credentials.rb | 49 + .../v1beta/promotions_service/paths.rb | 52 + .../v1beta/promotions_service/rest.rb | 54 + .../v1beta/promotions_service/rest/client.rb | 628 ++++ .../promotions_service/rest/service_stub.rb | 267 ++ .../v1beta/promotions_services_pb.rb | 60 + .../merchant/promotions/v1beta/rest.rb | 39 + .../merchant/promotions/v1beta/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++++ .../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/timestamp.rb | 128 + .../merchant/promotions/v1beta/promotions.rb | 176 ++ .../promotions/v1beta/promotions_common.rb | 445 +++ .../proto_docs/google/shopping/type/types.rb | 248 ++ .../proto_docs/google/type/interval.rb | 45 + .../snippets/Gemfile | 32 + .../promotions_service/get_promotion.rb | 47 + .../promotions_service/insert_promotion.rb | 47 + .../promotions_service/list_promotions.rb | 51 + ...e.shopping.merchant.promotions.v1beta.json | 135 + .../v1beta/promotions_service_paths_test.rb | 55 + .../v1beta/promotions_service_rest_test.rb | 265 ++ .../v1beta/promotions_service_test.rb | 291 ++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 ++ .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 23 + ...oogle-shopping-merchant-reports-v1.gemspec | 29 + .../google-shopping-merchant-reports-v1.rb | 21 + .../google/shopping/merchant/reports/v1.rb | 47 + .../merchant/reports/v1/report_service.rb | 57 + .../reports/v1/report_service/client.rb | 506 +++ .../reports/v1/report_service/credentials.rb | 49 + .../reports/v1/report_service/rest.rb | 54 + .../reports/v1/report_service/rest/client.rb | 456 +++ .../v1/report_service/rest/service_stub.rb | 145 + .../merchant/reports/v1/reports_pb.rb | 65 + .../reports/v1/reports_services_pb.rb | 50 + .../shopping/merchant/reports/v1/rest.rb | 39 + .../shopping/merchant/reports/v1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++++ .../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/timestamp.rb | 128 + .../shopping/merchant/reports/v1/reports.rb | 1382 ++++++++ .../proto_docs/google/shopping/type/types.rb | 248 ++ .../proto_docs/google/type/date.rb | 56 + .../snippets/Gemfile | 32 + .../snippets/report_service/search.rb | 51 + ...a_google.shopping.merchant.reports.v1.json | 55 + .../reports/v1/report_service_rest_test.rb | 156 + .../reports/v1/report_service_test.rb | 173 + .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 ++ .../README.md | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 23 + ...e-shopping-merchant-reports-v1beta.gemspec | 29 + ...google-shopping-merchant-reports-v1beta.rb | 21 + .../shopping/merchant/reports/v1beta.rb | 47 + .../merchant/reports/v1beta/report_service.rb | 57 + .../reports/v1beta/report_service/client.rb | 505 +++ .../v1beta/report_service/credentials.rb | 49 + .../reports/v1beta/report_service/rest.rb | 54 + .../v1beta/report_service/rest/client.rb | 455 +++ .../report_service/rest/service_stub.rb | 145 + .../merchant/reports/v1beta/reports_pb.rb | 62 + .../reports/v1beta/reports_services_pb.rb | 50 + .../shopping/merchant/reports/v1beta/rest.rb | 39 + .../merchant/reports/v1beta/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++++ .../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/timestamp.rb | 128 + .../merchant/reports/v1beta/reports.rb | 1291 ++++++++ .../proto_docs/google/shopping/type/types.rb | 248 ++ .../proto_docs/google/type/date.rb | 56 + .../snippets/Gemfile | 32 + .../snippets/report_service/search.rb | 51 + ...ogle.shopping.merchant.reports.v1beta.json | 55 + .../v1beta/report_service_rest_test.rb | 156 + .../reports/v1beta/report_service_test.rb | 173 + .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 ++ .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 67 + ...e-shopping-merchant-reviews-v1beta.gemspec | 29 + ...google-shopping-merchant-reviews-v1beta.rb | 21 + .../shopping/merchant/reviews/v1beta.rb | 48 + .../v1beta/merchant_reviews_service.rb | 57 + .../v1beta/merchant_reviews_service/client.rb | 788 +++++ .../merchant_reviews_service/credentials.rb | 49 + .../v1beta/merchant_reviews_service/paths.rb | 66 + .../v1beta/merchant_reviews_service/rest.rb | 54 + .../merchant_reviews_service/rest/client.rb | 717 +++++ .../rest/service_stub.rb | 328 ++ .../v1beta/merchantreviews_common_pb.rb | 32 + .../reviews/v1beta/merchantreviews_pb.rb | 36 + .../v1beta/merchantreviews_services_pb.rb | 54 + .../reviews/v1beta/product_reviews_service.rb | 57 + .../v1beta/product_reviews_service/client.rb | 783 +++++ .../product_reviews_service/credentials.rb | 49 + .../v1beta/product_reviews_service/paths.rb | 66 + .../v1beta/product_reviews_service/rest.rb | 54 + .../product_reviews_service/rest/client.rb | 712 +++++ .../rest/service_stub.rb | 328 ++ .../v1beta/productreviews_common_pb.rb | 34 + .../reviews/v1beta/productreviews_pb.rb | 36 + .../v1beta/productreviews_services_pb.rb | 53 + .../shopping/merchant/reviews/v1beta/rest.rb | 40 + .../merchant/reviews/v1beta/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++++ .../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 | 128 + .../reviews/v1beta/merchantreviews.rb | 142 + .../reviews/v1beta/merchantreviews_common.rb | 187 ++ .../merchant/reviews/v1beta/productreviews.rb | 129 + .../reviews/v1beta/productreviews_common.rb | 273 ++ .../proto_docs/google/shopping/type/types.rb | 248 ++ .../snippets/Gemfile | 32 + .../delete_merchant_review.rb | 47 + .../get_merchant_review.rb | 47 + .../insert_merchant_review.rb | 47 + .../list_merchant_reviews.rb | 51 + .../delete_product_review.rb | 47 + .../get_product_review.rb | 47 + .../insert_product_review.rb | 47 + .../list_product_reviews.rb | 51 + ...ogle.shopping.merchant.reviews.v1beta.json | 335 ++ .../merchant_reviews_service_paths_test.rb | 67 + .../merchant_reviews_service_rest_test.rb | 319 ++ .../v1beta/merchant_reviews_service_test.rb | 349 +++ .../product_reviews_service_paths_test.rb | 67 + .../product_reviews_service_rest_test.rb | 319 ++ .../v1beta/product_reviews_service_test.rb | 349 +++ .../test/helper.rb | 35 + owl-bot-staging/grafeas-v1/.gitignore | 20 + .../grafeas-v1/.repo-metadata.json | 16 + owl-bot-staging/grafeas-v1/.rubocop.yml | 33 + owl-bot-staging/grafeas-v1/.toys.rb | 28 + owl-bot-staging/grafeas-v1/.yardopts | 11 + owl-bot-staging/grafeas-v1/CHANGELOG.md | 2 + owl-bot-staging/grafeas-v1/Gemfile | 15 + owl-bot-staging/grafeas-v1/LICENSE.md | 201 ++ owl-bot-staging/grafeas-v1/README.md | 142 + owl-bot-staging/grafeas-v1/Rakefile | 143 + .../grafeas-v1/gapic_metadata.json | 88 + owl-bot-staging/grafeas-v1/grafeas-v1.gemspec | 28 + owl-bot-staging/grafeas-v1/lib/grafeas-v1.rb | 21 + owl-bot-staging/grafeas-v1/lib/grafeas/v1.rb | 36 + .../lib/grafeas/v1/attestation_pb.rb | 22 + .../grafeas-v1/lib/grafeas/v1/build_pb.rb | 22 + .../grafeas-v1/lib/grafeas/v1/common_pb.rb | 26 + .../lib/grafeas/v1/compliance_pb.rb | 23 + .../grafeas-v1/lib/grafeas/v1/cvss_pb.rb | 34 + .../lib/grafeas/v1/deployment_pb.rb | 21 + .../grafeas-v1/lib/grafeas/v1/discovery_pb.rb | 31 + .../lib/grafeas/v1/dsse_attestation_pb.rb | 22 + .../grafeas-v1/lib/grafeas/v1/grafeas.rb | 57 + .../lib/grafeas/v1/grafeas/client.rb | 1810 +++++++++++ .../lib/grafeas/v1/grafeas/paths.rb | 77 + .../grafeas-v1/lib/grafeas/v1/grafeas_pb.rb | 59 + .../lib/grafeas/v1/grafeas_services_pb.rb | 85 + .../grafeas-v1/lib/grafeas/v1/image_pb.rb | 20 + .../lib/grafeas/v1/intoto_provenance_pb.rb | 24 + .../lib/grafeas/v1/intoto_statement_pb.rb | 31 + .../grafeas-v1/lib/grafeas/v1/package_pb.rb | 26 + .../lib/grafeas/v1/provenance_pb.rb | 32 + .../grafeas-v1/lib/grafeas/v1/risk_pb.rb | 19 + .../grafeas-v1/lib/grafeas/v1/sbom_pb.rb | 23 + .../grafeas-v1/lib/grafeas/v1/secret_pb.rb | 27 + .../grafeas-v1/lib/grafeas/v1/severity_pb.rb | 17 + .../lib/grafeas/v1/slsa_provenance_pb.rb | 25 + .../grafeas/v1/slsa_provenance_zero_two_pb.rb | 26 + .../grafeas-v1/lib/grafeas/v1/upgrade_pb.rb | 25 + .../grafeas-v1/lib/grafeas/v1/version.rb | 24 + .../grafeas-v1/lib/grafeas/v1/vex_pb.rb | 27 + .../lib/grafeas/v1/vulnerability_pb.rb | 32 + .../grafeas-v1/proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++++ .../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/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/grafeas/v1/attestation.rb | 98 + .../grafeas-v1/proto_docs/grafeas/v1/build.rb | 70 + .../proto_docs/grafeas/v1/common.rb | 243 ++ .../proto_docs/grafeas/v1/compliance.rb | 107 + .../grafeas-v1/proto_docs/grafeas/v1/cvss.rb | 337 ++ .../proto_docs/grafeas/v1/deployment.rb | 74 + .../proto_docs/grafeas/v1/discovery.rb | 195 ++ .../proto_docs/grafeas/v1/dsse_attestation.rb | 59 + .../proto_docs/grafeas/v1/grafeas.rb | 510 +++ .../grafeas-v1/proto_docs/grafeas/v1/image.rb | 95 + .../grafeas/v1/intoto_provenance.rb | 134 + .../proto_docs/grafeas/v1/intoto_statement.rb | 189 ++ .../proto_docs/grafeas/v1/package.rb | 203 ++ .../proto_docs/grafeas/v1/provenance.rb | 336 ++ .../grafeas-v1/proto_docs/grafeas/v1/risk.rb | 57 + .../grafeas-v1/proto_docs/grafeas/v1/sbom.rb | 105 + .../proto_docs/grafeas/v1/secret.rb | 165 + .../proto_docs/grafeas/v1/severity.rb | 43 + .../proto_docs/grafeas/v1/slsa_provenance.rb | 152 + .../grafeas/v1/slsa_provenance_zero_two.rb | 131 + .../proto_docs/grafeas/v1/upgrade.rb | 148 + .../grafeas-v1/proto_docs/grafeas/v1/vex.rb | 237 ++ .../proto_docs/grafeas/v1/vulnerability.rb | 323 ++ owl-bot-staging/grafeas-v1/snippets/Gemfile | 32 + .../snippets/grafeas/batch_create_notes.rb | 47 + .../grafeas/batch_create_occurrences.rb | 47 + .../snippets/grafeas/create_note.rb | 47 + .../snippets/grafeas/create_occurrence.rb | 47 + .../snippets/grafeas/delete_note.rb | 47 + .../snippets/grafeas/delete_occurrence.rb | 47 + .../grafeas-v1/snippets/grafeas/get_note.rb | 47 + .../snippets/grafeas/get_occurrence.rb | 47 + .../snippets/grafeas/get_occurrence_note.rb | 47 + .../snippets/grafeas/list_note_occurrences.rb | 51 + .../grafeas-v1/snippets/grafeas/list_notes.rb | 51 + .../snippets/grafeas/list_occurrences.rb | 51 + .../snippets/grafeas/update_note.rb | 47 + .../snippets/grafeas/update_occurrence.rb | 47 + .../snippets/snippet_metadata_grafeas.v1.json | 575 ++++ .../test/grafeas/v1/grafeas_paths_test.rb | 79 + .../test/grafeas/v1/grafeas_test.rb | 971 ++++++ owl-bot-staging/grafeas-v1/test/helper.rb | 35 + 909 files changed, 127604 insertions(+) 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-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-products-v1/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/google-shopping-merchant-products-v1.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google-shopping-merchant-products-v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/productinputs_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/productinputs_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_common_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/productinputs.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products_common.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/type/interval.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/delete_product_input.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/insert_product_input.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/update_product_input.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/snippets/products_service/get_product.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/snippets/products_service/list_products.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/snippets/snippet_metadata_google.shopping.merchant.products.v1.json create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/google-shopping-merchant-products-v1beta.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google-shopping-merchant-products-v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_common_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/productinputs.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products_common.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/type/interval.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/delete_product_input.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/insert_product_input.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/update_product_input.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/products_service/get_product.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/products_service/list_products.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/snippet_metadata_google.shopping.merchant.products.v1beta.json create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/google-shopping-merchant-promotions-v1.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google-shopping-merchant-promotions-v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_common_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions_common.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/type/interval.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/get_promotion.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/insert_promotion.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/list_promotions.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/snippet_metadata_google.shopping.merchant.promotions.v1.json create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/google-shopping-merchant-promotions-v1beta.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google-shopping-merchant-promotions-v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_common_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions_common.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/type/interval.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/get_promotion.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/insert_promotion.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/list_promotions.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/snippet_metadata_google.shopping.merchant.promotions.v1beta.json create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/google-shopping-merchant-reports-v1.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google-shopping-merchant-reports-v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/shopping/merchant/reports/v1/reports.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/type/date.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/snippets/report_service/search.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/snippets/snippet_metadata_google.shopping.merchant.reports.v1.json create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/google-shopping-merchant-reports-v1beta.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google-shopping-merchant-reports-v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/merchant/reports/v1beta/reports.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/type/date.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/report_service/search.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/snippet_metadata_google.shopping.merchant.reports.v1beta.json create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/google-shopping-merchant-reviews-v1beta.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google-shopping-merchant-reviews-v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_common_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_common_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews_common.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews_common.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/delete_merchant_review.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/get_merchant_review.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/insert_merchant_review.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/list_merchant_reviews.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/delete_product_review.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/get_product_review.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/insert_product_review.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/list_product_reviews.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/snippet_metadata_google.shopping.merchant.reviews.v1beta.json create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/helper.rb create mode 100644 owl-bot-staging/grafeas-v1/.gitignore create mode 100644 owl-bot-staging/grafeas-v1/.repo-metadata.json create mode 100644 owl-bot-staging/grafeas-v1/.rubocop.yml create mode 100644 owl-bot-staging/grafeas-v1/.toys.rb create mode 100644 owl-bot-staging/grafeas-v1/.yardopts create mode 100644 owl-bot-staging/grafeas-v1/CHANGELOG.md create mode 100644 owl-bot-staging/grafeas-v1/Gemfile create mode 100644 owl-bot-staging/grafeas-v1/LICENSE.md create mode 100644 owl-bot-staging/grafeas-v1/README.md create mode 100644 owl-bot-staging/grafeas-v1/Rakefile create mode 100644 owl-bot-staging/grafeas-v1/gapic_metadata.json create mode 100644 owl-bot-staging/grafeas-v1/grafeas-v1.gemspec create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas-v1.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/attestation_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/build_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/common_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/compliance_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/cvss_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/deployment_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/discovery_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/dsse_attestation_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas/client.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas/paths.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas_services_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/image_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/intoto_provenance_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/intoto_statement_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/package_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/provenance_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/risk_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/sbom_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/secret_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/severity_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/slsa_provenance_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/slsa_provenance_zero_two_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/upgrade_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/version.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/vex_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/vulnerability_pb.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/README.md create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/attestation.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/build.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/common.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/compliance.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/cvss.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/deployment.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/discovery.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/dsse_attestation.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/grafeas.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/image.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/intoto_provenance.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/intoto_statement.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/package.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/provenance.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/risk.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/sbom.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/secret.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/severity.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance_zero_two.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/upgrade.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/vex.rb create mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/vulnerability.rb create mode 100644 owl-bot-staging/grafeas-v1/snippets/Gemfile create mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/batch_create_notes.rb create mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/batch_create_occurrences.rb create mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/create_note.rb create mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/create_occurrence.rb create mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/delete_note.rb create mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/delete_occurrence.rb create mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/get_note.rb create mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/get_occurrence.rb create mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/get_occurrence_note.rb create mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/list_note_occurrences.rb create mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/list_notes.rb create mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/list_occurrences.rb create mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/update_note.rb create mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/update_occurrence.rb create mode 100644 owl-bot-staging/grafeas-v1/snippets/snippet_metadata_grafeas.v1.json create mode 100644 owl-bot-staging/grafeas-v1/test/grafeas/v1/grafeas_paths_test.rb create mode 100644 owl-bot-staging/grafeas-v1/test/grafeas/v1/grafeas_test.rb create mode 100644 owl-bot-staging/grafeas-v1/test/helper.rb 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..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/.gitignore @@ -0,0 +1,20 @@ +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..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/Gemfile @@ -0,0 +1,15 @@ +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-reporters", "~> 1.8.0", require: false +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..4f1beddc2e88 --- /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.2+. + +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..afc3e460298b --- /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.3" + 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..6275c96d4a65 --- /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,986 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..c2f4d348be69 --- /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,901 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..3c182bcd3f5c --- /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,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/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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..f57f18d6772a --- /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,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/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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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. + # + # Note: This field should not be used in most cases. + 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. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # 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..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 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..ae79b2f8dceb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/type/timeofday.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 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 a day in 24 hour format. Must be greater than or equal to 0 and + # typically must be less than or equal 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 an hour. Must be greater than or equal to 0 and less than or + # equal to 59. + # @!attribute [rw] seconds + # @return [::Integer] + # Seconds of a minute. Must be greater than or equal to 0 and typically must + # be less than or equal 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 greater than or equal to 0 + # and less than or equal 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..f63413fc66b8 --- /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 + c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_data_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_data_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.get_data_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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 + c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_data_source({ parent: parent, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_data_source parent: parent, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_data_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_data_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.delete_data_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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 + c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.fetch_data_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.fetch_data_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.fetch_data_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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..0c5eb387baf5 --- /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 + c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_data_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_data_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_data_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_data_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.fetch_data_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.fetch_data_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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..b56ae4cdf218 --- /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 + c = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_file_upload({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_file_upload name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.get_file_upload({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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..f7942f012f28 --- /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 + c = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_file_upload({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_file_upload name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +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..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.gitignore @@ -0,0 +1,20 @@ +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..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/Gemfile @@ -0,0 +1,15 @@ +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-reporters", "~> 1.8.0", require: false +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..b47788b8a8b9 --- /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.2+. + +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..3f660cf7f2be --- /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.3" + 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..cca4a0d03ce0 --- /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,982 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..dc9007d70c1f --- /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,897 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..07e6bed8f7cc --- /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,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/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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..861986ade8b7 --- /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,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/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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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. + # + # Note: This field should not be used in most cases. + 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. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # 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..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 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..ae79b2f8dceb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/timeofday.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 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 a day in 24 hour format. Must be greater than or equal to 0 and + # typically must be less than or equal 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 an hour. Must be greater than or equal to 0 and less than or + # equal to 59. + # @!attribute [rw] seconds + # @return [::Integer] + # Seconds of a minute. Must be greater than or equal to 0 and typically must + # be less than or equal 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 greater than or equal to 0 + # and less than or equal 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..a4bb34d4d813 --- /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 + c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_data_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_data_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.get_data_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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 + c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_data_source({ parent: parent, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_data_source parent: parent, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_data_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_data_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.delete_data_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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 + c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.fetch_data_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.fetch_data_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.fetch_data_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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..ba292b33871d --- /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 + c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_data_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_data_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_data_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_data_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.fetch_data_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.fetch_data_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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..5273b1043174 --- /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 + c = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_file_upload({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_file_upload name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.get_file_upload({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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..e3eefb76a42c --- /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 + c = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_file_upload({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_file_upload name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +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..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/.gitignore @@ -0,0 +1,20 @@ +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..cc4c090bfc0b --- /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..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/Gemfile @@ -0,0 +1,15 @@ +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-reporters", "~> 1.8.0", require: false +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..3c27ce22a6a6 --- /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.2+. + +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..e8466125c2b6 --- /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.3" + 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..4cd9f78efc30 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/inventories_common_pb.rb @@ -0,0 +1,33 @@ +# 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\"\xbb\n\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\x12&\n\x14local_shipping_label\x18\t \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12_\n\x10loyalty_programs\x18\n \x03(\x0b\x32@.google.shopping.merchant.inventories.v1.InventoryLoyaltyProgramB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\x0b \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\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_locationB\x17\n\x15_local_shipping_label\"\xd2\x03\n\x17InventoryLoyaltyProgram\x12\x1a\n\rprogram_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ntier_label\x18\x02 \x01(\tH\x01\x88\x01\x01\x12/\n\x05price\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x02\x88\x01\x01\x12\x41\n\x17\x63\x61shback_for_future_use\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x03\x88\x01\x01\x12\x1b\n\x0eloyalty_points\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12\x43\n\x1fmember_price_effective_interval\x18\x06 \x01(\x0b\x32\x15.google.type.IntervalH\x05\x88\x01\x01\x12\x1b\n\x0eshipping_label\x18\x07 \x01(\tH\x06\x88\x01\x01\x42\x10\n\x0e_program_labelB\r\n\x0b_tier_labelB\x08\n\x06_priceB\x1a\n\x18_cashback_for_future_useB\x11\n\x0f_loyalty_pointsB\"\n _member_price_effective_intervalB\x11\n\x0f_shipping_label\"\x89\x04\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\x12_\n\x10loyalty_programs\x18\x05 \x03(\x0b\x32@.google.shopping.merchant.inventories.v1.InventoryLoyaltyProgramB\x03\xe0\x41\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 + InventoryLoyaltyProgram = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.InventoryLoyaltyProgram").msgclass + 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..2645c7e4e8dd --- /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,804 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url + # encoded string (RFC 4648 Section 5). The decoded string must result + # in the `content_language~feed_label~offer_id` structure. This encoding + # MUST be used if any part of the product identifier (like `offer_id`) + # contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123`, the + # `{product}` segment must be the unpadded base64url encoding of this + # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + # @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}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url + # encoded string (RFC 4648 Section 5). The decoded string must result + # in the `content_language~feed_label~offer_id` structure. This encoding + # MUST be used if any part of the product identifier (like `offer_id`) + # contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123`, the + # `{product}` segment must be the unpadded base64url encoding of this + # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + # @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}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url + # encoded string (RFC 4648 Section 5). The decoded string must result + # in the `content_language~feed_label~offer_id` structure. This encoding + # MUST be used if any part of the product identifier (like `offer_id`) + # contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123` for + # `store_code` "store123", the `{product}` segment must be the + # unpadded base64url encoding of this string, which is + # `ZW5-VVN-c2t1LzEyMw`. The full resource name for the local + # inventory would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw/localInventories/store123`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..e2aeba79f62e --- /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,740 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url + # encoded string (RFC 4648 Section 5). The decoded string must result + # in the `content_language~feed_label~offer_id` structure. This encoding + # MUST be used if any part of the product identifier (like `offer_id`) + # contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123`, the + # `{product}` segment must be the unpadded base64url encoding of this + # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + # @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}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url + # encoded string (RFC 4648 Section 5). The decoded string must result + # in the `content_language~feed_label~offer_id` structure. This encoding + # MUST be used if any part of the product identifier (like `offer_id`) + # contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123`, the + # `{product}` segment must be the unpadded base64url encoding of this + # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + # @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}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url + # encoded string (RFC 4648 Section 5). The decoded string must result + # in the `content_language~feed_label~offer_id` structure. This encoding + # MUST be used if any part of the product identifier (like `offer_id`) + # contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123` for + # `store_code` "store123", the `{product}` segment must be the + # unpadded base64url encoding of this string, which is + # `ZW5-VVN-c2t1LzEyMw`. The full resource name for the local + # inventory would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw/localInventories/store123`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..2c1b21fb1f82 --- /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}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an + # **unpadded base64url** encoded string (RFC 4648 Section 5). The + # decoded string + # must result in the `content_language~feed_label~offer_id` structure. + # This encoding MUST be used if any part of the product identifier (like + # `offer_id`) contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123`, the + # `{product}` segment must be the unpadded base64url encoding of this + # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + # @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}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an + # **unpadded base64url** encoded string (RFC 4648 Section 5). The + # decoded string + # must result in the `content_language~feed_label~offer_id` structure. + # This encoding MUST be used if any part of the product identifier (like + # `offer_id`) contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123` for + # `region` "region123", the `{product}` segment must be the + # unpadded base64url encoding of this string, which is + # `ZW5-VVN-c2t1LzEyMw`. The full resource name for the regional + # inventory would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw/regionalInventories/region123`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..28aac8e58f05 --- /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,743 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an + # **unpadded base64url** encoded string (RFC 4648 Section 5). The + # decoded string + # must result in the `content_language~feed_label~offer_id` structure. + # This encoding MUST be used if any part of the product identifier (like + # `offer_id`) contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123`, the + # `{product}` segment must be the unpadded base64url encoding of this + # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + # @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}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an + # **unpadded base64url** encoded string (RFC 4648 Section 5). The + # decoded string + # must result in the `content_language~feed_label~offer_id` structure. + # This encoding MUST be used if any part of the product identifier (like + # `offer_id`) contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123`, the + # `{product}` segment must be the unpadded base64url encoding of this + # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + # @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}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an + # **unpadded base64url** encoded string (RFC 4648 Section 5). The + # decoded string + # must result in the `content_language~feed_label~offer_id` structure. + # This encoding MUST be used if any part of the product identifier (like + # `offer_id`) contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123` for + # `region` "region123", the `{product}` segment must be the + # unpadded base64url encoding of this string, which is + # `ZW5-VVN-c2t1LzEyMw`. The full resource name for the regional + # inventory would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw/regionalInventories/region123`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..7e02d841d316 --- /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\"\xdf\x02\n\x11RegionalInventory\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12 \n\x13\x62\x61se64_encoded_name\x18\n \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..a34fa6d2d41d --- /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 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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. + # + # Note: This field should not be used in most cases. + 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. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # 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..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 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..343776d38b25 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/inventories_common.rb @@ -0,0 +1,275 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # @!attribute [rw] local_shipping_label + # @return [::String] + # Optional. Specifies a label associated with the shipping for the + # `LocalInventory` resource. Can be used to group local shipping services to + # this particular inventory item. For accepted field format, see the [Local + # delivery](https://support.google.com/merchants/answer/14819809#localdelivery) + # @!attribute [rw] loyalty_programs + # @return [::Array<::Google::Shopping::Merchant::Inventories::V1::InventoryLoyaltyProgram>] + # Optional. An optional list of loyalty programs containing applicable + # loyalty member prices for this product at this store. + # + # This field is used to show store-specific member prices on Local + # Inventory Ads (LIA). + # + # To use this, the loyalty program must be configured in Google Merchant + # Center. The benefits provided must match the merchant's website and be + # clear to members. This is only applicable for merchants in supported + # countries. + # + # See [Loyalty program](https://support.google.com/merchants/answer/12922446) + # for details on supported countries and loyalty program configuration. + # For local inventory specific details, see the [Local inventory data + # specification](https://support.google.com/merchants/answer/3061342). + # @!attribute [rw] custom_attributes + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Optional. A list of custom (merchant-provided) attributes. It can also be + # used for submitting any attribute of the data specification in its generic + # form (for example, `{ "name": "size type", "value": "regular" }`). This is + # useful for submitting attributes not explicitly exposed by the API. Maximum + # allowed number of characters for each custom attribute is 10240 (represents + # sum of characters for name and value). Maximum 2500 custom attributes can + # be set, with total size of 102.4kB. Underscores in custom + # attribute names are replaced by spaces upon insertion. + 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 + + # A message that represents loyalty program. + # @!attribute [rw] program_label + # @return [::String] + # The label of the loyalty program. This is an internal label that uniquely + # identifies the relationship between a business entity and a loyalty + # program entity. The label must be provided if there are multiple loyalty + # programs available for the merchant, so that the system can associate + # the assets below (for example, price and points) with the correct business. + # The corresponding program must be linked to the Merchant Center account. + # @!attribute [rw] tier_label + # @return [::String] + # The label of the tier within the loyalty program. + # Must match one of the labels within the program. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # The price for members of the given tier, that is, the instant discount + # price. Must be smaller or equal to the regular price. + # @!attribute [rw] cashback_for_future_use + # @return [::Google::Shopping::Type::Price] + # The cashback that can be used for future purchases. + # @!attribute [rw] loyalty_points + # @return [::Integer] + # The amount of loyalty points earned on a purchase. + # @!attribute [rw] member_price_effective_interval + # @return [::Google::Type::Interval] + # A date range during which the item is eligible for member price. If not + # specified, the member price is always applicable. The date range is + # represented by a pair of ISO 8601 dates separated by a space, + # comma, or slash. + # @!attribute [rw] shipping_label + # @return [::String] + # The label of the shipping benefit. If the field has value, this offer has + # loyalty shipping benefit. If the field value isn't provided, the item is + # not eligible for loyalty shipping for the given loyalty tier. + class InventoryLoyaltyProgram + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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. + # @!attribute [rw] loyalty_programs + # @return [::Array<::Google::Shopping::Merchant::Inventories::V1::InventoryLoyaltyProgram>] + # Optional. An optional list of loyalty programs containing applicable + # loyalty member prices for this product in this region. + # + # This field is used to show region-specific member prices on Product + # Listing Ads (PLA). + # + # To use this, the loyalty program must be configured in Google Merchant + # Center, and the merchant must be using the Regional Availability and + # Pricing (RAAP) feature. The benefits provided must match the merchant's + # website and be clear to members. This is only applicable for merchants in + # supported countries. + # + # See [Loyalty program](https://support.google.com/merchants/answer/12922446) + # for details on supported countries and loyalty program configuration. + # Also see [Regional availability and + # pricing](https://support.google.com/merchants/answer/14644124) and [How to + # set up regional member + # pricing](https://support.google.com/merchants/answer/16388178) for more + # information. + 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..599f2ebc4939 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/localinventory.rb @@ -0,0 +1,258 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url + # encoded string (RFC 4648 Section 5). The decoded string must result + # in the `content_language~feed_label~offer_id` structure. This encoding + # MUST be used if any part of the product identifier (like `offer_id`) + # contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123` for + # `store_code` "store123", the `{product}` segment must be the + # base64url encoding of this string, which is `ZW5-VVN-c2t1LzEyMw`. + # The full resource name for the local inventory would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw/localInventories/store123`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + # @!attribute [r] base64_encoded_name + # @return [::String] + # Output only. The unpadded base64url encoded name of the `LocalInventory` + # resource. Format: + # `accounts/{account}/products/{product}/localInventories/{store_code}` + # where the `{product}` segment is the unpadded base64url encoded value of + # the identifier of the form `content_language~feed_label~offer_id`. Example: + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw/localInventories/store123` for + # the decoded product ID `en~US~sku/123` and `store_code` "store123". + # Can be used directly as input to the API methods that require the local + # product identifier within the local inventory name to be encoded if it + # contains special characters, for example + # [`GetLocalInventory`](https://developers.google.com/merchant/api/reference/rest/inventories_v1/accounts.products.localInventories/get). + # @!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}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url + # encoded string (RFC 4648 Section 5). The decoded string must result + # in the `content_language~feed_label~offer_id` structure. This encoding + # MUST be used if any part of the product identifier (like `offer_id`) + # contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123`, the + # `{product}` segment must be the unpadded base64url encoding of this + # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + # @!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}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url + # encoded string (RFC 4648 Section 5). The decoded string must result + # in the `content_language~feed_label~offer_id` structure. This encoding + # MUST be used if any part of the product identifier (like `offer_id`) + # contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123`, the + # `{product}` segment must be the unpadded base64url encoding of this + # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + # @!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}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url + # encoded string (RFC 4648 Section 5). The decoded string must result + # in the `content_language~feed_label~offer_id` structure. This encoding + # MUST be used if any part of the product identifier (like `offer_id`) + # contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123` for + # `store_code` "store123", the `{product}` segment must be the + # unpadded base64url encoding of this string, which is + # `ZW5-VVN-c2t1LzEyMw`. The full resource name for the local + # inventory would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw/localInventories/store123`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + 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..f81670c3624d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/regionalinventory.rb @@ -0,0 +1,262 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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: + # `accounts/{account}/products/{product}/regionalInventories/{region}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an + # **unpadded base64url** encoded string (RFC 4648 Section 5). The + # decoded string + # must result in the `content_language~feed_label~offer_id` structure. + # This encoding MUST be used if any part of the product identifier + # (like `offer_id`) contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123` for + # `region` "region123", the `{product}` segment must be the + # unpadded base64url encoding of this string, which is + # `ZW5-VVN-c2t1LzEyMw`. The full resource name for the regional + # inventory would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw/regionalInventories/region123`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + # @!attribute [r] base64_encoded_name + # @return [::String] + # Output only. The unpadded base64url encoded name of the `RegionalInventory` + # resource. Format: + # `accounts/{account}/products/{product}/regionalInventories/{region}` + # where the `{product}` segment is the unpadded base64url encoded value of + # the identifier of the form `content_language~feed_label~offer_id`. Example: + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw/regionalInventories/region123` + # for the decoded product ID `en~US~sku/123` and `region` "region123". + # Can be used directly as input to the API methods that require the product + # identifier within the regional inventory name to be encoded if it contains + # special characters, for example + # [`GetRegionalInventory`](https://developers.google.com/merchant/api/reference/rest/inventories_v1/accounts.products.regionalInventories/get). + # @!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}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an + # **unpadded base64url** encoded string (RFC 4648 Section 5). The + # decoded string + # must result in the `content_language~feed_label~offer_id` structure. + # This encoding MUST be used if any part of the product identifier (like + # `offer_id`) contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123`, the + # `{product}` segment must be the unpadded base64url encoding of this + # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + # @!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}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an + # **unpadded base64url** encoded string (RFC 4648 Section 5). The + # decoded string + # must result in the `content_language~feed_label~offer_id` structure. + # This encoding MUST be used if any part of the product identifier (like + # `offer_id`) contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123`, the + # `{product}` segment must be the unpadded base64url encoding of this + # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + # @!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}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an + # **unpadded base64url** encoded string (RFC 4648 Section 5). The + # decoded string + # must result in the `content_language~feed_label~offer_id` structure. + # This encoding MUST be used if any part of the product identifier (like + # `offer_id`) contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123` for + # `region` "region123", the `{product}` segment must be the + # unpadded base64url encoding of this string, which is + # `ZW5-VVN-c2t1LzEyMw`. The full resource name for the regional + # inventory would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw/regionalInventories/region123`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + 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..cc3d665700a7 --- /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 + c = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.insert_local_inventory({ parent: parent, local_inventory: local_inventory }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.insert_local_inventory parent: parent, local_inventory: local_inventory do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_local_inventory({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_local_inventory name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.delete_local_inventory({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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..2a97b2e734f2 --- /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 + c = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_local_inventory({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_local_inventory name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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..956e9efb879b --- /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 + c = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.insert_regional_inventory parent: parent, regional_inventory: regional_inventory do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_regional_inventory({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_regional_inventory name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.delete_regional_inventory({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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..5ab3fae5d3ec --- /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 + c = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_regional_inventory({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_regional_inventory name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +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..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.gitignore @@ -0,0 +1,20 @@ +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..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Gemfile @@ -0,0 +1,15 @@ +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-reporters", "~> 1.8.0", require: false +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..8a2908d49ce2 --- /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.2+. + +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..b37d62068b1a --- /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.3" + 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..2cb3128b8259 --- /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,713 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..6105a3089fc5 --- /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,649 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..8af0976307d7 --- /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,713 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..9c96e6a4e3fb --- /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,649 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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. + # + # Note: This field should not be used in most cases. + 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. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # 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..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 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..fc75a2ff3e0a --- /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 + c = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.insert_local_inventory({ parent: parent, local_inventory: local_inventory }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.insert_local_inventory parent: parent, local_inventory: local_inventory do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_local_inventory({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_local_inventory name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.delete_local_inventory({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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..b3f2fee3ed76 --- /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 + c = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_local_inventory({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_local_inventory name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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..edc58c92909e --- /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 + c = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.insert_regional_inventory parent: parent, regional_inventory: regional_inventory do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_regional_inventory({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_regional_inventory name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.delete_regional_inventory({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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..0551785ca15f --- /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 + c = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_regional_inventory({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_regional_inventory name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +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..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/.gitignore @@ -0,0 +1,20 @@ +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..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/Gemfile @@ -0,0 +1,15 @@ +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-reporters", "~> 1.8.0", require: false +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..0e55a1b6603e --- /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.2+. + +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..f388fc0cac34 --- /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.3" + 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..61ff156b018a --- /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,490 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..6e9ad4fb85f1 --- /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,440 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..eef0c55ca85f --- /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,490 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..482e0cbd2328 --- /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,440 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..a8406a9dec29 --- /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,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/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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..71278670c277 --- /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,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/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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..1bad7568af34 --- /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,790 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..56eb0e4cde57 --- /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,719 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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. + # + # Note: This field should not be used in most cases. + 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. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # 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..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 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..dcdf1cd1b083 --- /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 + c = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.insert_lfp_inventory parent: parent, lfp_inventory: lfp_inventory do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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..5c36ee191dfa --- /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 + c = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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..36156e43d1db --- /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 + c = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_lfp_merchant_state({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_lfp_merchant_state name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.get_lfp_merchant_state({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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..9d694596fd33 --- /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 + c = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_lfp_merchant_state({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_lfp_merchant_state name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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..da5baa8e268a --- /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 + c = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.insert_lfp_sale parent: parent, lfp_sale: lfp_sale do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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..2d324c4c2adf --- /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 + c = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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..6d6cbea7f0ba --- /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 + c = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_lfp_store({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_lfp_store name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.get_lfp_store({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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 + c = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.insert_lfp_store({ parent: parent, lfp_store: lfp_store }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.insert_lfp_store parent: parent, lfp_store: lfp_store do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_lfp_store({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_lfp_store name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.delete_lfp_store({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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 + c = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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..fa83999a569e --- /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 + c = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_lfp_store({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_lfp_store name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_lfp_store({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_lfp_store name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +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..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.gitignore @@ -0,0 +1,20 @@ +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..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Gemfile @@ -0,0 +1,15 @@ +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-reporters", "~> 1.8.0", require: false +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..36ee1b680f35 --- /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.2+. + +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..8322180154fd --- /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.3" + 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..58a25ac8b760 --- /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,490 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..695e9d0f9956 --- /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,440 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..63d2f1e2263d --- /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,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/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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..82c37093cb60 --- /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,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/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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..a78dda9291c3 --- /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,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/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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..35f2538fb657 --- /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,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/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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..5ada1ecaad0d --- /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,790 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..801305157379 --- /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,719 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `: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..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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. + # + # Note: This field should not be used in most cases. + 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. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # 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..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 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..1a89155b8838 --- /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 + c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.insert_lfp_inventory parent: parent, lfp_inventory: lfp_inventory do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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..e4619028814e --- /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 + c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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..7120754f821d --- /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 + c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_lfp_merchant_state({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_lfp_merchant_state name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.get_lfp_merchant_state({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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..5f3930141820 --- /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 + c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_lfp_merchant_state({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_lfp_merchant_state name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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..a13f00e79029 --- /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 + c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.insert_lfp_sale parent: parent, lfp_sale: lfp_sale do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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..0f7ebded18a3 --- /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 + c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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..d68255231ead --- /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 + c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_lfp_store({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_lfp_store name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.get_lfp_store({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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 + c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.insert_lfp_store({ parent: parent, lfp_store: lfp_store }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.insert_lfp_store parent: parent, lfp_store: lfp_store do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_lfp_store({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_lfp_store name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.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 + c.delete_lfp_store({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.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 + c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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..6d86669d5067 --- /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 + c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_lfp_store({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_lfp_store name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_lfp_store({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_lfp_store name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.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 + c.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 + c.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 + c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.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 + c.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 + c.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 + c.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 + c.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..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +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-products-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-products-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/.gitignore @@ -0,0 +1,20 @@ +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-products-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-products-v1/.repo-metadata.json new file mode 100644 index 000000000000..bc63d9fc9827 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1", + "distribution_name": "google-shopping-merchant-products-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-products-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-products 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-products-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-products-v1/.rubocop.yml new file mode 100644 index 000000000000..91f3efe88e94 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-products-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-products-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-products-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-products-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-products-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..48d9c7121a41 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-products-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-products-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/products/v1" + +client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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/products/v1" + +::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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-products-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/products/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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-products-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-products-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-products-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/Gemfile @@ -0,0 +1,15 @@ +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-reporters", "~> 1.8.0", require: false +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-products-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-products-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1/README.md b/owl-bot-staging/google-shopping-merchant-products-v1/README.md new file mode 100644 index 000000000000..75c9d80e5ef9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products](https://rubygems.org/gems/google-shopping-merchant-products). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-products-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/products/v1" + +client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new +request = ::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new # (request fields as keyword arguments...) +response = client.insert_product_input request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-products-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/products/v1" +require "logger" + +client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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.2+. + +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-products`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-products-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-products`. +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-products-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-products-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-products-v1/Rakefile new file mode 100644 index 000000000000..4a3b723c7342 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-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/products/v1/product_inputs_service/credentials" + ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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-products-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-products-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-products-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-products-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-products-v1" + header "google-shopping-merchant-products-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-products-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-products-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-products-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-products-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-products-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-products-v1/gapic_metadata.json new file mode 100644 index 000000000000..9fedefc193f1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/gapic_metadata.json @@ -0,0 +1,52 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.products.v1", + "libraryPackage": "::Google::Shopping::Merchant::Products::V1", + "services": { + "ProductInputsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client", + "rpcs": { + "InsertProductInput": { + "methods": [ + "insert_product_input" + ] + }, + "UpdateProductInput": { + "methods": [ + "update_product_input" + ] + }, + "DeleteProductInput": { + "methods": [ + "delete_product_input" + ] + } + } + } + } + }, + "ProductsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Products::V1::ProductsService::Client", + "rpcs": { + "GetProduct": { + "methods": [ + "get_product" + ] + }, + "ListProducts": { + "methods": [ + "list_products" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/google-shopping-merchant-products-v1.gemspec b/owl-bot-staging/google-shopping-merchant-products-v1/google-shopping-merchant-products-v1.gemspec new file mode 100644 index 000000000000..f60dc255c79c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/google-shopping-merchant-products-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/products/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-products-v1" + gem.version = Google::Shopping::Merchant::Products::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-products-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-products 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.3" + 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-products-v1/lib/google-shopping-merchant-products-v1.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google-shopping-merchant-products-v1.rb new file mode 100644 index 000000000000..03a904782651 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google-shopping-merchant-products-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/products/v1" diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1.rb new file mode 100644 index 000000000000..cbcaa48f9328 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/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/products/v1/product_inputs_service" +require "google/shopping/merchant/products/v1/products_service" +require "google/shopping/merchant/products/v1/version" + +module Google + module Shopping + module Merchant + module Products + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/products/v1" + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/products/v1" + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/products/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service.rb new file mode 100644 index 000000000000..35b9b48149cb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_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/products/v1/version" + +require "google/shopping/merchant/products/v1/product_inputs_service/credentials" +require "google/shopping/merchant/products/v1/product_inputs_service/paths" +require "google/shopping/merchant/products/v1/product_inputs_service/client" +require "google/shopping/merchant/products/v1/product_inputs_service/rest" + +module Google + module Shopping + module Merchant + module Products + module V1 + ## + # Service to use ProductInput resource. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/products/v1/product_inputs_service" + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/products/v1/product_inputs_service/rest" + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new + # + module ProductInputsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "product_inputs_service", "helpers.rb" +require "google/shopping/merchant/products/v1/product_inputs_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/client.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/client.rb new file mode 100644 index 000000000000..f801a523c825 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/client.rb @@ -0,0 +1,765 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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/products/v1/productinputs_pb" + +module Google + module Shopping + module Merchant + module Products + module V1 + module ProductInputsService + ## + # Client for the ProductInputsService service. + # + # Service to use ProductInput resource. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :product_inputs_service_stub + + ## + # Configure the ProductInputsService Client class. + # + # See {::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProductInputsService clients + # ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.configure do |config| + # config.timeout = 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", "Products", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.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 ProductInputsService Client instance. + # + # The configuration is set to the derived mode, meaning that values 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::Products::V1::ProductInputsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @product_inputs_service_stub.universe_domain + end + + ## + # Create a new ProductInputsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProductInputsService 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/products/v1/productinputs_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 + + @product_inputs_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @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 + @product_inputs_service_stub.logger + end + + # Service calls + + ## + # [Uploads a product input to your Merchant Center + # account](/merchant/api/guides/products/add-manage#add_a_product). You + # must have a products [data + # source](/merchant/api/guides/data-sources/api-sources#create-primary-data-source) + # to be able to insert a product. The unique identifier of the data source is + # passed as a query parameter in the request URL. + # + # If a product input with the same contentLanguage, offerId, and dataSource + # already exists, then the product input inserted by this method replaces + # that entry. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # @overload insert_product_input(request, options = nil) + # Pass arguments to `insert_product_input` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_product_input(parent: nil, product_input: nil, data_source: nil) + # Pass arguments to `insert_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 product will be inserted. + # Format: `accounts/{account}` + # @param product_input [::Google::Shopping::Merchant::Products::V1::ProductInput, ::Hash] + # Required. The product input to insert. + # @param data_source [::String] + # Required. The primary or supplemental product data source name. If the + # product already exists and data source provided is different, then the + # product will be moved to a new data source. For more information, see + # [Create a primary data + # source](/merchant/api/guides/data-sources/api-sources#create-primary-data-source). + # + # Only API data sources are supported. + # + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Products::V1::ProductInput] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new + # + # # Call the insert_product_input method. + # result = client.insert_product_input request + # + # # The returned object is of type Google::Shopping::Merchant::Products::V1::ProductInput. + # p result + # + def insert_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest + + # Converts hash and nil to 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_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::Merchant::Products::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_product_input.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_inputs_service_stub.call_rpc :insert_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 product input in your Merchant Center account. + # The name of the product input to update is taken from the `name` field + # within the `ProductInput` resource. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # @overload update_product_input(request, options = nil) + # Pass arguments to `update_product_input` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_product_input(product_input: nil, update_mask: nil, data_source: nil) + # Pass arguments to `update_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 product_input [::Google::Shopping::Merchant::Products::V1::ProductInput, ::Hash] + # Required. The product input resource to update. Information you submit will + # be applied to the processed product as well. The `name` field within this + # resource identifies the product input to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of 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 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 product replacement is not supported. + # @param data_source [::String] + # Required. The primary or supplemental product data source where + # `data_source` name identifies the product input to be updated. + # + # Only API data sources are supported. + # + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Products::V1::ProductInput] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new + # + # # Call the update_product_input method. + # result = client.update_product_input request + # + # # The returned object is of type Google::Shopping::Merchant::Products::V1::ProductInput. + # p result + # + def update_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_product_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::Merchant::Products::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.product_input&.name + header_params["product_input.name"] = request.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_product_input.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_inputs_service_stub.call_rpc :update_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 product input from your Merchant Center account. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # @overload delete_product_input(request, options = nil) + # Pass arguments to `delete_product_input` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_product_input(name: nil, data_source: nil) + # Pass arguments to `delete_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 product input to delete. + # Format: `accounts/{account}/productInputs/{productInput}` + # + # The \\{productInput} segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the \\{productInput} segment in the URL is automatically + # detected by the server, supporting two options: + # + # 1. **Encoded Format**: The `{productInput}` segment is an unpadded + # base64url + # encoded string (RFC 4648 Section 5). The decoded string must result + # in the `content_language~feed_label~offer_id` structure. This encoding + # MUST be used if any part of the product identifier (like `offer_id`) + # contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123`, the + # `{productInput}` segment must be the unpadded base64url encoding of + # this string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw`. + # + # 2. **Plain Format**: The `{productInput}` segment is the tilde-separated + # string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{productInput}` segment is used + # to differentiate between the two formats. + # @param data_source [::String] + # Required. The primary or supplemental data source from which the product + # input should be deleted. Format: + # `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::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/products/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new + # + # # Call the delete_product_input method. + # result = client.delete_product_input request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_product_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::Merchant::Products::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_product_input.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_inputs_service_stub.call_rpc :delete_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 ProductInputsService API. + # + # This class represents the configuration for ProductInputsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_product_input to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_product_input.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_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::Merchant::Products::V1::ProductInputsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ProductInputsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `insert_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_product_input + ## + # RPC-specific configuration for `update_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :update_product_input + ## + # RPC-specific configuration for `delete_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_product_input + + # @private + def initialize parent_rpcs = nil + insert_product_input_config = parent_rpcs.insert_product_input if parent_rpcs.respond_to? :insert_product_input + @insert_product_input = ::Gapic::Config::Method.new insert_product_input_config + update_product_input_config = parent_rpcs.update_product_input if parent_rpcs.respond_to? :update_product_input + @update_product_input = ::Gapic::Config::Method.new update_product_input_config + delete_product_input_config = parent_rpcs.delete_product_input if parent_rpcs.respond_to? :delete_product_input + @delete_product_input = ::Gapic::Config::Method.new delete_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-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/credentials.rb new file mode 100644 index 000000000000..2dab97788402 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_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 Products + module V1 + module ProductInputsService + # Credentials for the ProductInputsService 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-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/paths.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/paths.rb new file mode 100644 index 000000000000..b4569174dc31 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_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 Products + module V1 + module ProductInputsService + # Path helper methods for the ProductInputsService 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 ProductInput resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/productInputs/{productinput}` + # + # @param account [String] + # @param productinput [String] + # + # @return [::String] + def product_input_path account:, productinput: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/productInputs/#{productinput}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest.rb new file mode 100644 index 000000000000..c06b76bc7cc0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_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/products/v1/version" + +require "google/shopping/merchant/products/v1/product_inputs_service/credentials" +require "google/shopping/merchant/products/v1/product_inputs_service/paths" +require "google/shopping/merchant/products/v1/product_inputs_service/rest/client" + +module Google + module Shopping + module Merchant + module Products + module V1 + ## + # Service to use ProductInput resource. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/products/v1/product_inputs_service/rest" + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new + # + module ProductInputsService + # 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/products/v1/product_inputs_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/client.rb new file mode 100644 index 000000000000..7c00d8232192 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/client.rb @@ -0,0 +1,701 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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/products/v1/productinputs_pb" +require "google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Products + module V1 + module ProductInputsService + module Rest + ## + # REST client for the ProductInputsService service. + # + # Service to use ProductInput resource. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :product_inputs_service_stub + + ## + # Configure the ProductInputsService Client class. + # + # See {::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProductInputsService clients + # ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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", "Products", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.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 ProductInputsService Client instance. + # + # The configuration is set to the derived mode, meaning that values 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::Products::V1::ProductInputsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @product_inputs_service_stub.universe_domain + end + + ## + # Create a new ProductInputsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProductInputsService 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 + + @product_inputs_service_stub = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @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 + @product_inputs_service_stub.logger + end + + # Service calls + + ## + # [Uploads a product input to your Merchant Center + # account](/merchant/api/guides/products/add-manage#add_a_product). You + # must have a products [data + # source](/merchant/api/guides/data-sources/api-sources#create-primary-data-source) + # to be able to insert a product. The unique identifier of the data source is + # passed as a query parameter in the request URL. + # + # If a product input with the same contentLanguage, offerId, and dataSource + # already exists, then the product input inserted by this method replaces + # that entry. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # @overload insert_product_input(request, options = nil) + # Pass arguments to `insert_product_input` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_product_input(parent: nil, product_input: nil, data_source: nil) + # Pass arguments to `insert_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 product will be inserted. + # Format: `accounts/{account}` + # @param product_input [::Google::Shopping::Merchant::Products::V1::ProductInput, ::Hash] + # Required. The product input to insert. + # @param data_source [::String] + # Required. The primary or supplemental product data source name. If the + # product already exists and data source provided is different, then the + # product will be moved to a new data source. For more information, see + # [Create a primary data + # source](/merchant/api/guides/data-sources/api-sources#create-primary-data-source). + # + # Only API data sources are supported. + # + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Products::V1::ProductInput] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new + # + # # Call the insert_product_input method. + # result = client.insert_product_input request + # + # # The returned object is of type Google::Shopping::Merchant::Products::V1::ProductInput. + # p result + # + def insert_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest + + # Converts hash and nil to an 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_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::Merchant::Products::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_product_input.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_inputs_service_stub.insert_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 product input in your Merchant Center account. + # The name of the product input to update is taken from the `name` field + # within the `ProductInput` resource. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # @overload update_product_input(request, options = nil) + # Pass arguments to `update_product_input` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_product_input(product_input: nil, update_mask: nil, data_source: nil) + # Pass arguments to `update_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 product_input [::Google::Shopping::Merchant::Products::V1::ProductInput, ::Hash] + # Required. The product input resource to update. Information you submit will + # be applied to the processed product as well. The `name` field within this + # resource identifies the product input to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of 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 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 product replacement is not supported. + # @param data_source [::String] + # Required. The primary or supplemental product data source where + # `data_source` name identifies the product input to be updated. + # + # Only API data sources are supported. + # + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Products::V1::ProductInput] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new + # + # # Call the update_product_input method. + # result = client.update_product_input request + # + # # The returned object is of type Google::Shopping::Merchant::Products::V1::ProductInput. + # p result + # + def update_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_product_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::Merchant::Products::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_product_input.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_inputs_service_stub.update_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 product input from your Merchant Center account. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # @overload delete_product_input(request, options = nil) + # Pass arguments to `delete_product_input` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_product_input(name: nil, data_source: nil) + # Pass arguments to `delete_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 product input to delete. + # Format: `accounts/{account}/productInputs/{productInput}` + # + # The \\{productInput} segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the \\{productInput} segment in the URL is automatically + # detected by the server, supporting two options: + # + # 1. **Encoded Format**: The `{productInput}` segment is an unpadded + # base64url + # encoded string (RFC 4648 Section 5). The decoded string must result + # in the `content_language~feed_label~offer_id` structure. This encoding + # MUST be used if any part of the product identifier (like `offer_id`) + # contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123`, the + # `{productInput}` segment must be the unpadded base64url encoding of + # this string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw`. + # + # 2. **Plain Format**: The `{productInput}` segment is the tilde-separated + # string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{productInput}` segment is used + # to differentiate between the two formats. + # @param data_source [::String] + # Required. The primary or supplemental data source from which the product + # input should be deleted. Format: + # `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @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/products/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new + # + # # Call the delete_product_input method. + # result = client.delete_product_input request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_product_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::Merchant::Products::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_product_input.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_inputs_service_stub.delete_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 ProductInputsService REST API. + # + # This class represents the configuration for ProductInputsService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_product_input to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_product_input.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the ProductInputsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `insert_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_product_input + ## + # RPC-specific configuration for `update_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :update_product_input + ## + # RPC-specific configuration for `delete_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_product_input + + # @private + def initialize parent_rpcs = nil + insert_product_input_config = parent_rpcs.insert_product_input if parent_rpcs.respond_to? :insert_product_input + @insert_product_input = ::Gapic::Config::Method.new insert_product_input_config + update_product_input_config = parent_rpcs.update_product_input if parent_rpcs.respond_to? :update_product_input + @update_product_input = ::Gapic::Config::Method.new update_product_input_config + delete_product_input_config = parent_rpcs.delete_product_input if parent_rpcs.respond_to? :delete_product_input + @delete_product_input = ::Gapic::Config::Method.new delete_product_input_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-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub.rb new file mode 100644 index 000000000000..0fe81f05e2e3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub.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 "google/shopping/merchant/products/v1/productinputs_pb" + +module Google + module Shopping + module Merchant + module Products + module V1 + module ProductInputsService + module Rest + ## + # REST service stub for the ProductInputsService 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_product_input REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Products::V1::ProductInput] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] + # A result object deserialized from the server's reply + def insert_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_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_product_input", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Products::V1::ProductInput.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_product_input REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Products::V1::ProductInput] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] + # A result object deserialized from the server's reply + def update_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_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_product_input", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Products::V1::ProductInput.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_product_input REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_product_input request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_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_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_product_input REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest] + # 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_product_input_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/products/v1/{parent}/productInputs:insert", + body: "product_input", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_product_input REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_product_input_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/products/v1/{product_input.name}", + body: "product_input", + matches: [ + ["product_input.name", %r{^accounts/[^/]+/productInputs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_product_input REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_product_input_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/products/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/productInputs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/productinputs_pb.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/productinputs_pb.rb new file mode 100644 index 000000000000..e6c050a93886 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/productinputs_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/products/v1/productinputs.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/products/v1/products_common_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n8google/shopping/merchant/products/v1/productinputs.proto\x12$google.shopping.merchant.products.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/products/v1/products_common.proto\x1a google/shopping/type/types.proto\"\xc6\x04\n\x0cProductInput\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12 \n\x13\x62\x61se64_encoded_name\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07product\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16\x62\x61se64_encoded_product\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0clegacy_local\x18\n \x01(\x08\x42\x03\xe0\x41\x05\x12\x18\n\x08offer_id\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\x12\x1a\n\nfeed_label\x18\x06 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12#\n\x0eversion_number\x18\x07 \x01(\x03\x42\x06\xe0\x41\x01\xe0\x41\x05H\x00\x88\x01\x01\x12X\n\x12product_attributes\x18\x0b \x01(\x0b\x32\x37.google.shopping.merchant.products.v1.ProductAttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\t \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01:z\xea\x41w\n\'merchantapi.googleapis.com/ProductInput\x12/accounts/{account}/productInputs/{productinput}*\rproductInputs2\x0cproductInputB\x11\n\x0f_version_number\"\xc1\x01\n\x19InsertProductInputRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"merchantapi.googleapis.com/Product\x12N\n\rproduct_input\x18\x02 \x01(\x0b\x32\x32.google.shopping.merchant.products.v1.ProductInputB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xbb\x01\n\x19UpdateProductInputRequest\x12N\n\rproduct_input\x18\x01 \x01(\x0b\x32\x32.google.shopping.merchant.products.v1.ProductInputB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"t\n\x19\x44\x65leteProductInputRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'merchantapi.googleapis.com/ProductInput\x12\x18\n\x0b\x64\x61ta_source\x18\x02 \x01(\tB\x03\xe0\x41\x02\x32\xe5\x05\n\x14ProductInputsService\x12\xd7\x01\n\x12InsertProductInput\x12?.google.shopping.merchant.products.v1.InsertProductInputRequest\x1a\x32.google.shopping.merchant.products.v1.ProductInput\"L\x82\xd3\xe4\x93\x02\x46\"5/products/v1/{parent=accounts/*}/productInputs:insert:\rproduct_input\x12\xfa\x01\n\x12UpdateProductInput\x12?.google.shopping.merchant.products.v1.UpdateProductInputRequest\x1a\x32.google.shopping.merchant.products.v1.ProductInput\"o\xda\x41\x19product_input,update_mask\x82\xd3\xe4\x93\x02M2 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12L\n\x0fproduct_details\x18? \x03(\x0b\x32\x33.google.shopping.merchant.products.v1.ProductDetail\x12\x1a\n\x12product_highlights\x18@ \x03(\t\x12\x1b\n\x0e\x64isplay_ads_id\x18\x41 \x01(\tH\"\x88\x01\x01\x12\x1f\n\x17\x64isplay_ads_similar_ids\x18\x42 \x03(\t\x12\x1e\n\x11\x64isplay_ads_title\x18\x43 \x01(\tH#\x88\x01\x01\x12\x1d\n\x10\x64isplay_ads_link\x18\x44 \x01(\tH$\x88\x01\x01\x12\x1e\n\x11\x64isplay_ads_value\x18\x45 \x01(\x01H%\x88\x01\x01\x12\x15\n\rpromotion_ids\x18\x46 \x03(\t\x12N\n\rpickup_method\x18P \x01(\x0e\x32\x32.google.shopping.merchant.products.v1.PickupMethodH&\x88\x01\x01\x12H\n\npickup_sla\x18Q \x01(\x0e\x32/.google.shopping.merchant.products.v1.PickupSlaH\'\x88\x01\x01\x12P\n\x0bpickup_cost\x18\xac\x01 \x01(\x0b\x32\x30.google.shopping.merchant.products.v1.PickupCostB\x03\xe0\x41\x01H(\x88\x01\x01\x12\x1a\n\rlink_template\x18R \x01(\tH)\x88\x01\x01\x12!\n\x14mobile_link_template\x18S \x01(\tH*\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_0\x18G \x01(\tH+\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_1\x18H \x01(\tH,\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_2\x18I \x01(\tH-\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_3\x18J \x01(\tH.\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_4\x18K \x01(\tH/\x88\x01\x01\x12P\n\x15included_destinations\x18L \x03(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnum\x12P\n\x15\x65xcluded_destinations\x18M \x03(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnum\x12\'\n\x1fshopping_ads_excluded_countries\x18N \x03(\t\x12\x1f\n\x12\x65xternal_seller_id\x18\x01 \x01(\tH0\x88\x01\x01\x12?\n\x05pause\x18\r \x01(\x0e\x32+.google.shopping.merchant.products.v1.PauseH1\x88\x01\x01\x12\x1d\n\x15lifestyle_image_links\x18\x0e \x03(\t\x12q\n\"cloud_export_additional_properties\x18T \x03(\x0b\x32\x45.google.shopping.merchant.products.v1.CloudExportAdditionalProperties\x12 \n\x12virtual_model_link\x18\x82\x01 \x01(\tH2\x88\x01\x01\x12R\n\x0e\x63\x65rtifications\x18{ \x03(\x0b\x32:.google.shopping.merchant.products.v1.ProductCertification\x12U\n\x10structured_title\x18\x84\x01 \x01(\x0b\x32\x35.google.shopping.merchant.products.v1.StructuredTitleH3\x88\x01\x01\x12\x61\n\x16structured_description\x18\x85\x01 \x01(\x0b\x32;.google.shopping.merchant.products.v1.StructuredDescriptionH4\x88\x01\x01\x12;\n\x16\x61uto_pricing_min_price\x18| \x01(\x0b\x32\x1b.google.shopping.type.Price\x12h\n\x19sustainability_incentives\x18\x8a\x01 \x03(\x0b\x32\x44.google.shopping.merchant.products.v1.ProductSustainabilityIncentive\x12\x19\n\x0bvideo_links\x18\xa9\x01 \x03(\tB\x03\xe0\x41\x01\x12]\n\x14minimum_order_values\x18\x92\x01 \x03(\x0b\x32>.google.shopping.merchant.products.v1.ProductMinimumOrderValue\x12\x0c\n\x03vin\x18\x93\x01 \x01(\t\x12\x0e\n\x05model\x18\x94\x01 \x01(\t\x12\r\n\x04trim\x18\x95\x01 \x01(\t\x12]\n\nbody_style\x18\x96\x01 \x01(\x0e\x32H.google.shopping.merchant.products.v1.ProductAttributes.VehicleBodyStyle\x12\r\n\x04year\x18\x97\x01 \x01(\x03\x12Q\n\x07mileage\x18\x98\x01 \x01(\x0b\x32?.google.shopping.merchant.products.v1.ProductAttributes.Mileage\x12X\n\x0e\x65lectric_range\x18\x99\x01 \x01(\x0b\x32?.google.shopping.merchant.products.v1.ProductAttributes.Mileage\x12\x62\n\x10\x66uel_consumption\x18\x9a\x01 \x01(\x0b\x32G.google.shopping.merchant.products.v1.ProductAttributes.FuelConsumption\x12u\n#fuel_consumption_discharged_battery\x18\x9b\x01 \x01(\x0b\x32G.google.shopping.merchant.products.v1.ProductAttributes.FuelConsumption\x12\x66\n\x12\x65nergy_consumption\x18\x9c\x01 \x01(\x0b\x32I.google.shopping.merchant.products.v1.ProductAttributes.EnergyConsumption\x12\\\n\rco2_emissions\x18\x9d\x01 \x01(\x0b\x32\x44.google.shopping.merchant.products.v1.ProductAttributes.Co2Emissions\x12\x1e\n\x15\x64\x61te_first_registered\x18\x9e\x01 \x01(\t\x12S\n\x06\x65ngine\x18\x9f\x01 \x01(\x0e\x32\x42.google.shopping.merchant.products.v1.ProductAttributes.EngineType\x12\x66\n\x12\x65missions_standard\x18\xa0\x01 \x01(\x0e\x32I.google.shopping.merchant.products.v1.ProductAttributes.EmissionsStandard\x12\x1c\n\x13\x63\x65rtified_pre_owned\x18\xa1\x01 \x01(\x08\x12\x32\n\x0cvehicle_msrp\x18\xa2\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12:\n\x14vehicle_all_in_price\x18\xa3\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x65\n\x12vehicle_price_type\x18\xa4\x01 \x01(\x0e\x32H.google.shopping.merchant.products.v1.ProductAttributes.VehiclePriceType\x12.\n%vehicle_mandatory_inspection_included\x18\xa6\x01 \x01(\x08\x12\x36\n\x10vehicle_expenses\x18\xa7\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12S\n\x08warranty\x18\xa8\x01 \x01(\x0b\x32@.google.shopping.merchant.products.v1.ProductAttributes.Warranty\x12`\n\x0f\x64isplay_address\x18\xb3\x01 \x01(\x0b\x32\x46.google.shopping.merchant.products.v1.ProductAttributes.DisplayAddress\x12\x16\n\x08latitude\x18\xb4\x01 \x01(\x01H5\x88\x01\x01\x12\x17\n\tlongitude\x18\xb5\x01 \x01(\x01H6\x88\x01\x01\x12\x15\n\x0cneighborhood\x18\xb6\x01 \x01(\t\x12T\n\tunit_area\x18\xb7\x01 \x01(\x0b\x32@.google.shopping.merchant.products.v1.ProductAttributes.UnitArea\x12\x1d\n\x0fnumber_of_units\x18\xb8\x01 \x01(\x03H7\x88\x01\x01\x12\x16\n\rproperty_name\x18\xb9\x01 \x01(\t\x12 \n\x12number_of_bedrooms\x18\xba\x01 \x01(\x01H8\x88\x01\x01\x12!\n\x13number_of_bathrooms\x18\xbb\x01 \x01(\x01H9\x88\x01\x01\x12\\\n\rproperty_type\x18\xbc\x01 \x01(\x0e\x32\x44.google.shopping.merchant.products.v1.ProductAttributes.PropertyType\x12`\n\x0f\x61menity_feature\x18\xbd\x01 \x03(\x0e\x32\x46.google.shopping.merchant.products.v1.ProductAttributes.AmenityFeature\x12\x66\n\x12utilities_included\x18\xbe\x01 \x03(\x0e\x32I.google.shopping.merchant.products.v1.ProductAttributes.UtilitiesIncluded\x12V\n\npet_policy\x18\xbf\x01 \x01(\x0b\x32\x41.google.shopping.merchant.products.v1.ProductAttributes.PetPolicy\x12m\n\x16specialty_housing_type\x18\xc0\x01 \x01(\x0e\x32L.google.shopping.merchant.products.v1.ProductAttributes.SpecialtyHousingType\x12X\n\x0bproduct_fee\x18\xc1\x01 \x03(\x0b\x32\x42.google.shopping.merchant.products.v1.ProductAttributes.ProductFee\x12\x19\n\x0bshort_title\x18\xc2\x01 \x01(\tH:\x88\x01\x01\x12n\n\x15questions_and_answers\x18\xad\x01 \x03(\x0b\x32I.google.shopping.merchant.products.v1.ProductAttributes.QuestionAndAnswerB\x03\xe0\x41\x01\x12\x1d\n\x0fpopularity_rank\x18\xae\x01 \x01(\x02\x42\x03\xe0\x41\x01\x12\x1e\n\x10item_group_title\x18\xaf\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0e\x64ocument_links\x18\xb0\x01 \x03(\tB\x03\xe0\x41\x01\x12\x64\n\x0fvariant_options\x18\xb1\x01 \x03(\x0b\x32\x45.google.shopping.merchant.products.v1.ProductAttributes.VariantOptionB\x03\xe0\x41\x01\x12\x66\n\x10related_products\x18\xb2\x01 \x03(\x0b\x32\x46.google.shopping.merchant.products.v1.ProductAttributes.RelatedProductB\x03\xe0\x41\x01\x1al\n\x1aShippingBusinessDaysConfig\x12\x14\n\x07\x63ountry\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rbusiness_days\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\n\n\x08_countryB\x10\n\x0e_business_days\x1a\xa1\x07\n\x0f\x43\x61rrierShipping\x12\x14\n\x07\x63ountry\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06region\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0bpostal_code\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x12origin_postal_code\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x34\n\nflat_price\x18\x05 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x04\x88\x01\x01\x12\x66\n\rcarrier_price\x18\x06 \x01(\x0e\x32J.google.shopping.merchant.products.v1.ProductAttributes.CarrierPriceOptionH\x05\x88\x01\x01\x12G\n\x1d\x63\x61rrier_price_flat_adjustment\x18\x07 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x06\x88\x01\x01\x12\x30\n#carrier_price_percentage_adjustment\x18\x08 \x01(\x01H\x07\x88\x01\x01\x12\x1e\n\x11min_handling_time\x18\t \x01(\x03H\x08\x88\x01\x01\x12\x1e\n\x11max_handling_time\x18\n \x01(\x03H\t\x88\x01\x01\x12#\n\x16\x66ixed_min_transit_time\x18\x0b \x01(\x03H\n\x88\x01\x01\x12#\n\x16\x66ixed_max_transit_time\x18\x0c \x01(\x03H\x0b\x88\x01\x01\x12\x61\n\x14\x63\x61rrier_transit_time\x18\r \x01(\x0e\x32>.google.shopping.merchant.products.v1.CarrierTransitTimeOptionH\x0c\x88\x01\x01\x42\n\n\x08_countryB\t\n\x07_regionB\x0e\n\x0c_postal_codeB\x15\n\x13_origin_postal_codeB\r\n\x0b_flat_priceB\x10\n\x0e_carrier_priceB \n\x1e_carrier_price_flat_adjustmentB&\n$_carrier_price_percentage_adjustmentB\x14\n\x12_min_handling_timeB\x14\n\x12_max_handling_timeB\x19\n\x17_fixed_min_transit_timeB\x19\n\x17_fixed_max_transit_timeB\x17\n\x15_carrier_transit_time\x1a\xac\x01\n\x07Mileage\x12\x12\n\x05value\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12R\n\x04unit\x18\x02 \x01(\x0e\x32\x44.google.shopping.merchant.products.v1.ProductAttributes.Mileage.Unit\"/\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\t\n\x05MILES\x10\x01\x12\x06\n\x02KM\x10\x02\x42\x08\n\x06_value\x1a\xc8\x01\n\x0f\x46uelConsumption\x12\x12\n\x05value\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12Z\n\x04unit\x18\x02 \x01(\x0e\x32L.google.shopping.merchant.products.v1.ProductAttributes.FuelConsumption.Unit\";\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\r\n\tLPER100KM\x10\x01\x12\x0e\n\nKGPER100KM\x10\x02\x42\x08\n\x06_value\x1a\xbe\x01\n\x11\x45nergyConsumption\x12\x12\n\x05value\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12\\\n\x04unit\x18\x02 \x01(\x0e\x32N.google.shopping.merchant.products.v1.ProductAttributes.EnergyConsumption.Unit\"-\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\x0f\n\x0bKWHPER100KM\x10\x01\x42\x08\n\x06_value\x1a\xaf\x01\n\x0c\x43o2Emissions\x12\x12\n\x05value\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12W\n\x04unit\x18\x02 \x01(\x0e\x32I.google.shopping.merchant.products.v1.ProductAttributes.Co2Emissions.Unit\"(\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\n\n\x06GPERKM\x10\x01\x42\x08\n\x06_value\x1an\n\x08Warranty\x12\x10\n\x08\x64uration\x18\x01 \x01(\x03\x12P\n\x07mileage\x18\x02 \x01(\x0b\x32?.google.shopping.merchant.products.v1.ProductAttributes.Mileage\x1a\xf2\x01\n\nProductFee\x12X\n\x04type\x18\x01 \x01(\x0e\x32J.google.shopping.merchant.products.v1.ProductAttributes.ProductFee.FeeType\x12+\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\"]\n\x07\x46\x65\x65Type\x12\x18\n\x14\x46\x45\x45_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tADMIN_FEE\x10\x01\x12\x13\n\x0f\x41PPLICATION_FEE\x10\x02\x12\x14\n\x10SECURITY_DEPOSIT\x10\x03\x1ao\n\x0e\x44isplayAddress\x12\x15\n\rstreet_number\x18\x01 \x01(\t\x12\x13\n\x0bstreet_name\x18\x02 \x01(\t\x12\x0c\n\x04\x63ity\x18\x03 \x01(\t\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x13\n\x0bpostal_code\x18\x05 \x01(\t\x1a\xae\x01\n\x08UnitArea\x12\x12\n\x05value\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12S\n\x04unit\x18\x02 \x01(\x0e\x32\x45.google.shopping.merchant.products.v1.ProductAttributes.UnitArea.Unit\"/\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\x07\n\x03SQM\x10\x01\x12\x08\n\x04SQFT\x10\x02\x42\x08\n\x06_value\x1a\xce\x01\n\tPetPolicy\x12\x14\n\x0cpets_allowed\x18\x01 \x01(\x08\x12\\\n\tpet_types\x18\x02 \x03(\x0e\x32I.google.shopping.merchant.products.v1.ProductAttributes.PetPolicy.PetType\"M\n\x07PetType\x12\x18\n\x14PET_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x43\x41TS\x10\x01\x12\x0e\n\nLARGE_DOGS\x10\x02\x12\x0e\n\nSMALL_DOGS\x10\x03\x1a?\n\x11QuestionAndAnswer\x12\x15\n\x08question\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x61nswer\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\x36\n\rVariantOption\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\xdb\x03\n\x0eRelatedProduct\x12w\n\x11relationship_type\x18\x01 \x01(\x0e\x32W.google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.RelationshipTypeB\x03\xe0\x41\x02\x12\x63\n\x07id_type\x18\x02 \x01(\x0e\x32M.google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.IdTypeB\x03\xe0\x41\x02\x12\x0f\n\x02id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xa4\x01\n\x10RelationshipType\x12!\n\x1dRELATIONSHIP_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPART_OF_SET\x10\x01\x12\x11\n\rREQUIRED_PART\x10\x02\x12\x15\n\x11OFTEN_BOUGHT_WITH\x10\x03\x12\x0e\n\nSUBSTITUTE\x10\x04\x12\x13\n\x0f\x44IFFERENT_BRAND\x10\x05\x12\r\n\tACCESSORY\x10\x06\"3\n\x06IdType\x12\x17\n\x13ID_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04GTIN\x10\x01\x12\x06\n\x02ID\x10\x02\"\x88\x0c\n\x12\x43\x61rrierPriceOption\x12$\n CARRIER_PRICE_OPTION_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x41USTRALIA_POST_REGULAR\x10\x01\x12\x1a\n\x16\x41USTRALIA_POST_EXPRESS\x10\x02\x12\x1c\n\x18\x41USTRALIA_POST_REGULAR_S\x10\x03\x12\x1c\n\x18\x41USTRALIA_POST_REGULAR_M\x10\x04\x12\x1c\n\x18\x41USTRALIA_POST_REGULAR_L\x10\x05\x12\x1d\n\x19\x41USTRALIA_POST_REGULAR_XL\x10\x06\x12\x1c\n\x18\x41USTRALIA_POST_EXPRESS_S\x10\x07\x12\x1c\n\x18\x41USTRALIA_POST_EXPRESS_M\x10\x08\x12\x1c\n\x18\x41USTRALIA_POST_EXPRESS_L\x10\t\x12\x1d\n\x19\x41USTRALIA_POST_EXPRESS_XL\x10\n\x12\x14\n\x10TNT_ROAD_EXPRESS\x10\x0b\x12\x19\n\x15TNT_OVERNIGHT_EXPRESS\x10\x0c\x12\x16\n\x12TOLL_ROAD_DELIVERY\x10\r\x12\x1b\n\x17TOLL_OVERNIGHT_PRIORITY\x10\x0e\x12\r\n\tDHL_PAKET\x10\x0f\x12\x10\n\x0c\x44HL_PACKCHEN\x10\x10\x12\x12\n\x0e\x44PD_EXPRESS_12\x10\x11\x12\x0f\n\x0b\x44PD_EXPRESS\x10\x12\x12\x16\n\x12\x44PD_CLASSIC_PARCEL\x10\x13\x12\x13\n\x0fHERMES_PACKCHEN\x10\x14\x12\x18\n\x14HERMES_PAKETKLASSE_S\x10\x15\x12\x18\n\x14HERMES_PAKETKLASSE_M\x10\x16\x12\x18\n\x14HERMES_PAKETKLASSE_L\x10\x17\x12\x0f\n\x0bUPS_EXPRESS\x10\x18\x12\x15\n\x11UPS_EXPRESS_SAVER\x10\x19\x12\x18\n\x14UPS_EXPRESS_STANDARD\x10\x1a\x12\x0f\n\x0b\x44HL_EXPRESS\x10\x1b\x12\x12\n\x0e\x44HL_EXPRESS_12\x10\x1c\x12\x10\n\x0c\x44PD_NEXT_DAY\x10\x1d\x12\x19\n\x15\x44PD_STANDARD_NEXT_DAY\x10\x1e\x12\x18\n\x14\x44PD_STANDARD_TWO_DAY\x10\x1f\x12\x17\n\x13RMG_1ST_CLASS_SMALL\x10 \x12\x18\n\x14RMG_1ST_CLASS_MEDIUM\x10!\x12\x17\n\x13RMG_2ND_CLASS_SMALL\x10\"\x12\x18\n\x14RMG_2ND_CLASS_MEDIUM\x10#\x12\x0f\n\x0bTNT_EXPRESS\x10$\x12\x12\n\x0eTNT_EXPRESS_10\x10%\x12\x12\n\x0eTNT_EXPRESS_12\x10&\x12\x12\n\x0eYODEL_B2C_48HR\x10\'\x12\x12\n\x0eYODEL_B2C_72HR\x10(\x12\x14\n\x10YODEL_B2C_PACKET\x10)\x12\x10\n\x0c\x46\x45\x44\x45X_GROUND\x10*\x12\x17\n\x13\x46\x45\x44\x45X_HOME_DELIVERY\x10+\x12\x17\n\x13\x46\x45\x44\x45X_EXPRESS_SAVER\x10,\x12\x19\n\x15\x46\x45\x44\x45X_FIRST_OVERNIGHT\x10-\x12\x1c\n\x18\x46\x45\x44\x45X_PRIORITY_OVERNIGHT\x10.\x12\x1c\n\x18\x46\x45\x44\x45X_STANDARD_OVERNIGHT\x10/\x12\x0e\n\nFEDEX_2DAY\x10\x30\x12\x10\n\x0cUPS_STANDARD\x10\x31\x12\x13\n\x0fUPS_2ND_DAY_AIR\x10\x32\x12\x12\n\x0eUPS_2ND_DAY_AM\x10\x33\x12\x14\n\x10UPS_3_DAY_SELECT\x10\x34\x12\x0e\n\nUPS_GROUND\x10\x35\x12\x14\n\x10UPS_NEXT_DAY_AIR\x10\x36\x12\x1d\n\x19UPS_NEXT_DAY_AIR_EARLY_AM\x10\x37\x12\x1a\n\x16UPS_NEXT_DAY_AIR_SAVER\x10\x38\x12\x1e\n\x1aUSPS_PRIORITY_MAIL_EXPRESS\x10\x39\x12\x13\n\x0fUSPS_MEDIA_MAIL\x10:\x12 \n\x1cUSPS_GROUND_ADVANTAGE_RETAIL\x10;\x12\x16\n\x12USPS_PRIORITY_MAIL\x10<\x12$\n USPS_GROUND_ADVANTAGE_COMMERCIAL\x10=\"\xb6\x04\n\x10VehicleBodyStyle\x12\"\n\x1eVEHICLE_BODY_STYLE_UNSPECIFIED\x10\x00\x12\r\n\tATV_SPORT\x10\x01\x12\x0f\n\x0b\x41TV_TOURING\x10\x02\x12\x0f\n\x0b\x41TV_UTILITY\x10\x03\x12\r\n\tATV_YOUTH\x10\x04\x12\x0c\n\x08\x43ITY_CAR\x10\x05\x12\x15\n\x11\x43LASS_A_MOTORHOME\x10\x06\x12\x15\n\x11\x43LASS_B_MOTORHOME\x10\x07\x12\x15\n\x11\x43LASS_C_MOTORHOME\x10\x08\x12\x0f\n\x0b\x43OMPACT_SUV\x10\t\x12\x0f\n\x0b\x43ONVERTIBLE\x10\n\x12\t\n\x05\x43OUPE\x10\x0b\x12\r\n\tCROSSOVER\x10\x0c\x12\x0f\n\x0b\x46IFTH_WHEEL\x10\r\x12\x11\n\rFULL_SIZE_VAN\x10\x0e\x12\r\n\tHATCHBACK\x10\x0f\x12\r\n\tLIMOUSINE\x10\x10\x12\x0b\n\x07MINIVAN\x10\x11\x12\r\n\tNOTCHBACK\x10\x12\x12\x11\n\rPOP_UP_CAMPER\x10\x13\x12\t\n\x05SEDAN\x10\x14\x12\x10\n\x0cSIDE_BY_SIDE\x10\x15\x12\x11\n\rSTATION_WAGON\x10\x16\x12\x07\n\x03SUV\x10\x17\x12\x12\n\x0eTRAVEL_TRAILER\x10\x18\x12\t\n\x05TRUCK\x10\x19\x12\x10\n\x0cTRUCK_CAMPER\x10\x1a\x12\x07\n\x03UTE\x10\x1b\x12\x1c\n\x18UTV_RECREATIONAL_UTILITY\x10\x1c\x12\r\n\tUTV_SPORT\x10\x1d\x12\x0f\n\x0bUTV_UTILITY\x10\x1e\x12\r\n\tUTV_YOUTH\x10\x1f\"\xa3\x01\n\nEngineType\x12\x1b\n\x17\x45NGINE_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08GASOLINE\x10\x01\x12\n\n\x06\x44IESEL\x10\x02\x12\x0c\n\x08\x45LECTRIC\x10\x03\x12\n\n\x06HYBRID\x10\x04\x12\x12\n\x0ePLUG_IN_HYBRID\x10\x05\x12\x0f\n\x0bNATURAL_GAS\x10\x06\x12\x07\n\x03LPG\x10\x07\x12\x0b\n\x07METHANE\x10\x08\x12\t\n\x05OTHER\x10\t\"\xce\x01\n\x11\x45missionsStandard\x12\"\n\x1e\x45MISSIONS_STANDARD_UNSPECIFIED\x10\x00\x12\x12\n\x0eZERO_EMISSIONS\x10\x01\x12\t\n\x05\x45URO1\x10\x02\x12\t\n\x05\x45URO2\x10\x03\x12\t\n\x05\x45URO3\x10\x04\x12\t\n\x05\x45URO4\x10\x05\x12\t\n\x05\x45URO5\x10\x06\x12\n\n\x06\x45URO5B\x10\x07\x12\t\n\x05\x45URO6\x10\x08\x12\n\n\x06\x45URO6C\x10\t\x12\n\n\x06\x45URO6D\x10\n\x12\x0f\n\x0b\x45URO6D_TEMP\x10\x0b\x12\n\n\x06\x45URO6E\x10\x0c\"\xbe\x01\n\x10VehiclePriceType\x12\"\n\x1eVEHICLE_PRICE_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41LL_IN_PRICE\x10\x01\x12\x14\n\x10\x44RIVE_AWAY_PRICE\x10\x02\x12\x1e\n\x1a\x45STIMATED_DRIVE_AWAY_PRICE\x10\x03\x12&\n\"EXCLUDING_GOVERNMENT_CHARGES_PRICE\x10\x04\x12\x16\n\x12VEHICLE_BASE_PRICE\x10\x05\"\xb4\x01\n\x0cPropertyType\x12\x1d\n\x19PROPERTY_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAPARTMENT\x10\x01\x12\t\n\x05\x43ONDO\x10\x02\x12\x08\n\x04LOFT\x10\x03\x12\x15\n\x11MULTI_FAMILY_HOME\x10\x04\x12\r\n\tPENTHOUSE\x10\x05\x12\x08\n\x04ROOM\x10\x06\x12\x16\n\x12SINGLE_FAMILY_HOME\x10\x07\x12\n\n\x06STUDIO\x10\x08\x12\r\n\tTOWNHOUSE\x10\t\"\x90\x05\n\x0e\x41menityFeature\x12\x1f\n\x1b\x41MENITY_FEATURE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x42\x41LCONY\x10\x01\x12\x0c\n\x08\x42\x41SEMENT\x10\x02\x12\x14\n\x10\x42\x41SKETBALL_COURT\x10\x03\x12\x10\n\x0c\x42IKE_STORAGE\x10\x04\x12\x0e\n\nCENTRAL_AC\x10\x05\x12\x0e\n\nDISHWASHER\x10\x06\x12\x0c\n\x08\x44OG_PARK\x10\x07\x12\x0c\n\x08\x45LEVATOR\x10\x08\x12\x0f\n\x0b\x45V_CHARGING\x10\t\x12\x0e\n\nFENCED_LOT\x10\n\x12\r\n\tFIREPLACE\x10\x0b\x12\x12\n\x0e\x46ITNESS_CENTER\x10\x0c\x12\x16\n\x12\x46ORCED_AIR_HEATING\x10\r\x12\x13\n\x0f\x46ULLY_FURNISHED\x10\x0e\x12\n\n\x06GARAGE\x10\x0f\x12\x13\n\x0fGATED_COMMUNITY\x10\x10\x12\x13\n\x0fHARDWOOD_FLOORS\x10\x11\x12\x17\n\x13HIGH_SPEED_INTERNET\x10\x12\x12\x0c\n\x08INTERCOM\x10\x13\x12\x18\n\x14IN_UNIT_WASHER_DRYER\x10\x14\x12\x0b\n\x07KITCHEN\x10\x15\x12\x11\n\rLARGE_CLOSETS\x10\x16\x12\x14\n\x10MULTISPORT_COURT\x10\x17\x12\x12\n\x0eONSITE_LAUNDRY\x10\x18\x12\x12\n\x0eOUTDOOR_LOUNGE\x10\x19\x12\x0b\n\x07PARKING\x10\x1a\x12\t\n\x05PATIO\x10\x1b\x12\x14\n\x10PICKLEBALL_COURT\x10\x1c\x12\x08\n\x04POOL\x10\x1d\x12\x10\n\x0cREFRIGERATOR\x10\x1e\x12\x10\n\x0cSOCCER_FIELD\x10\x1f\x12\x10\n\x0cTENNIS_COURT\x10 \x12\x13\n\x0fWALK_IN_CLOSETS\x10!\x12\x15\n\x11WHEELCHAIR_ACCESS\x10\"\"u\n\x11UtilitiesIncluded\x12\"\n\x1eUTILITIES_INCLUDED_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x45LECTRICITY\x10\x01\x12\x07\n\x03GAS\x10\x02\x12\x0c\n\x08INTERNET\x10\x03\x12\t\n\x05TRASH\x10\x04\x12\t\n\x05WATER\x10\x05\"\x94\x01\n\x14SpecialtyHousingType\x12&\n\"SPECIALTY_HOUSING_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tCORPORATE\x10\x01\x12\x0e\n\nLOW_INCOME\x10\x02\x12\x0c\n\x08MILITARY\x10\x03\x12\n\n\x06SENIOR\x10\x04\x12\x0e\n\nSHORT_TERM\x10\x05\x12\x0b\n\x07STUDENT\x10\x06\x42\x14\n\x12_identifier_existsB\x0c\n\n_is_bundleB\x08\n\x06_titleB\x0e\n\x0c_descriptionB\x07\n\x05_linkB\x0e\n\x0c_mobile_linkB\x11\n\x0f_canonical_linkB\r\n\x0b_image_linkB\x08\n\x06_adultB\x0c\n\n_age_groupB\x0f\n\r_availabilityB\x08\n\x06_brandB\x08\n\x06_colorB\x0c\n\n_conditionB\t\n\x07_genderB\x1a\n\x18_google_product_categoryB\x10\n\x0e_item_group_idB\x0b\n\t_materialB\x06\n\x04_mpnB\n\n\x08_patternB\x1a\n\x18_sell_on_google_quantityB\x14\n\x12_max_handling_timeB\x14\n\x12_min_handling_timeB\x11\n\x0f_shipping_labelB\x16\n\x14_return_policy_labelB\x15\n\x13_transit_time_labelB\x07\n\x05_sizeB\x0e\n\x0c_size_systemB\x1a\n\x18_energy_efficiency_classB\x1e\n\x1c_min_energy_efficiency_classB\x1e\n\x1c_max_energy_efficiency_classB\x0c\n\n_multipackB\x0f\n\r_ads_groupingB\x0f\n\r_ads_redirectB\x11\n\x0f_display_ads_idB\x14\n\x12_display_ads_titleB\x13\n\x11_display_ads_linkB\x14\n\x12_display_ads_valueB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\x0e\n\x0c_pickup_costB\x10\n\x0e_link_templateB\x17\n\x15_mobile_link_templateB\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\x15\n\x13_external_seller_idB\x08\n\x06_pauseB\x15\n\x13_virtual_model_linkB\x13\n\x11_structured_titleB\x19\n\x17_structured_descriptionB\x0b\n\t_latitudeB\x0c\n\n_longitudeB\x12\n\x10_number_of_unitsB\x15\n\x13_number_of_bedroomsB\x16\n\x14_number_of_bathroomsB\x0e\n\x0c_short_title\"-\n\x0eShippingWeight\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"0\n\x11ShippingDimension\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"5\n\x16UnitPricingBaseMeasure\x12\r\n\x05value\x18\x01 \x01(\x03\x12\x0c\n\x04unit\x18\x02 \x01(\t\"1\n\x12UnitPricingMeasure\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"\xa0\x01\n\x10SubscriptionCost\x12H\n\x06period\x18\x01 \x01(\x0e\x32\x38.google.shopping.merchant.products.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\"\x87\x03\n\x12ProductInstallment\x12\x0e\n\x06months\x18\x01 \x01(\x03\x12+\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x35\n\x0b\x64ownpayment\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x88\x01\x01\x12J\n\x0b\x63redit_type\x18\x04 \x01(\x0e\x32\x30.google.shopping.merchant.products.v1.CreditTypeH\x01\x88\x01\x01\x12(\n\x16\x61nnual_percentage_rate\x18\x05 \x01(\x01\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12;\n\x0ctotal_amount\x18\x06 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01H\x03\x88\x01\x01\x42\x0e\n\x0c_downpaymentB\x0e\n\x0c_credit_typeB\x19\n\x17_annual_percentage_rateB\x0f\n\r_total_amount\"B\n\rLoyaltyPoints\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cpoints_value\x18\x02 \x01(\x03\x12\r\n\x05ratio\x18\x03 \x01(\x01\"\xc1\x03\n\x0eLoyaltyProgram\x12\x1a\n\rprogram_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ntier_label\x18\x02 \x01(\tH\x01\x88\x01\x01\x12/\n\x05price\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x02\x88\x01\x01\x12\x41\n\x17\x63\x61shback_for_future_use\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x03\x88\x01\x01\x12\x1b\n\x0eloyalty_points\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12?\n\x1bmember_price_effective_date\x18\x06 \x01(\x0b\x32\x15.google.type.IntervalH\x05\x88\x01\x01\x12\x1b\n\x0eshipping_label\x18\x07 \x01(\tH\x06\x88\x01\x01\x42\x10\n\x0e_program_labelB\r\n\x0b_tier_labelB\x08\n\x06_priceB\x1a\n\x18_cashback_for_future_useB\x11\n\x0f_loyalty_pointsB\x1e\n\x1c_member_price_effective_dateB\x11\n\x0f_shipping_label\"\xc8\x04\n\x08Shipping\x12*\n\x05price\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x0f\n\x07\x63ountry\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\t\x12\x0f\n\x07service\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\x03\x12\x1b\n\x13location_group_name\x18\x06 \x01(\t\x12\x13\n\x0bpostal_code\x18\x07 \x01(\t\x12\x1e\n\x11min_handling_time\x18\x08 \x01(\x03H\x00\x88\x01\x01\x12\x1e\n\x11max_handling_time\x18\t \x01(\x03H\x01\x88\x01\x01\x12\x1d\n\x10min_transit_time\x18\n \x01(\x03H\x02\x88\x01\x01\x12\x1d\n\x10max_transit_time\x18\x0b \x01(\x03H\x03\x88\x01\x01\x12!\n\x14handling_cutoff_time\x18\x0c \x01(\tH\x04\x88\x01\x01\x12%\n\x18handling_cutoff_timezone\x18\r \x01(\tH\x05\x88\x01\x01\x12\"\n\x15loyalty_program_label\x18\x0e \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12loyalty_tier_label\x18\x0f \x01(\tB\x03\xe0\x41\x01\x42\x14\n\x12_min_handling_timeB\x14\n\x12_max_handling_timeB\x13\n\x11_min_transit_timeB\x13\n\x11_max_transit_timeB\x17\n\x15_handling_cutoff_timeB\x1b\n\x19_handling_cutoff_timezone\"\x88\x01\n\x15\x46reeShippingThreshold\x12\x14\n\x07\x63ountry\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x39\n\x0fprice_threshold\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x01\x88\x01\x01\x42\n\n\x08_countryB\x12\n\x10_price_threshold\"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\"\xf9\x02\n\x14ProductCertification\x12\x62\n\x17\x63\x65rtification_authority\x18\x01 \x01(\x0e\x32<.google.shopping.merchant.products.v1.CertificationAuthorityH\x00\x88\x01\x01\x12X\n\x12\x63\x65rtification_name\x18\x02 \x01(\x0e\x32\x37.google.shopping.merchant.products.v1.CertificationNameH\x01\x88\x01\x01\x12\x1f\n\x12\x63\x65rtification_code\x18\x03 \x01(\tH\x02\x88\x01\x01\x12 \n\x13\x63\x65rtification_value\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x1a\n\x18_certification_authorityB\x15\n\x13_certification_nameB\x15\n\x13_certification_codeB\x16\n\x14_certification_value\"\xa6\x01\n\x0fStructuredTitle\x12Y\n\x13\x64igital_source_type\x18\x01 \x01(\x0e\x32\x37.google.shopping.merchant.products.v1.DigitalSourceTypeH\x00\x88\x01\x01\x12\x14\n\x07\x63ontent\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x16\n\x14_digital_source_typeB\n\n\x08_content\"\xac\x01\n\x15StructuredDescription\x12Y\n\x13\x64igital_source_type\x18\x01 \x01(\x0e\x32\x37.google.shopping.merchant.products.v1.DigitalSourceTypeH\x00\x88\x01\x01\x12\x14\n\x07\x63ontent\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x16\n\x14_digital_source_typeB\n\n\x08_content\"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\"\xeb\x07\n\rProductStatus\x12\x63\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32\x45.google.shopping.merchant.products.v1.ProductStatus.DestinationStatus\x12]\n\x11item_level_issues\x18\x04 \x03(\x0b\x32\x42.google.shopping.merchant.products.v1.ProductStatus.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\xc1\x01\n\x11\x44\x65stinationStatus\x12V\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnum\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\xac\x03\n\x0eItemLevelIssue\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12]\n\x08severity\x18\x02 \x01(\x0e\x32K.google.shopping.merchant.products.v1.ProductStatus.ItemLevelIssue.Severity\x12\x12\n\nresolution\x18\x03 \x01(\t\x12\x11\n\tattribute\x18\x04 \x01(\t\x12V\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnum\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\"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\"\xa5\x02\n\x1f\x43loudExportAdditionalProperties\x12\x1a\n\rproperty_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\ntext_value\x18\x02 \x03(\t\x12\x17\n\nbool_value\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12\x11\n\tint_value\x18\x04 \x03(\x03\x12\x13\n\x0b\x66loat_value\x18\x05 \x03(\x02\x12\x16\n\tmin_value\x18\x06 \x01(\x02H\x02\x88\x01\x01\x12\x16\n\tmax_value\x18\x07 \x01(\x02H\x03\x88\x01\x01\x12\x16\n\tunit_code\x18\x08 \x01(\tH\x04\x88\x01\x01\x42\x10\n\x0e_property_nameB\r\n\x0b_bool_valueB\x0c\n\n_min_valueB\x0c\n\n_max_valueB\x0c\n\n_unit_code\"\x9d\x02\n\x1eProductSustainabilityIncentive\x12-\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x12\x14\n\npercentage\x18\x03 \x01(\x01H\x00\x12\\\n\x04type\x18\x01 \x01(\x0e\x32I.google.shopping.merchant.products.v1.ProductSustainabilityIncentive.TypeH\x01\x88\x01\x01\"F\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rEV_TAX_CREDIT\x10\x01\x12\x15\n\x11\x45V_PRICE_DISCOUNT\x10\x02\x42\x07\n\x05valueB\x07\n\x05_type\"\xb4\x01\n\x12\x41utomatedDiscounts\x12\x30\n\x0bprior_price\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12<\n\x17prior_price_progressive\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12.\n\tgad_price\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price\"\xa6\x01\n\nPickupCost\x12\x38\n\tflat_rate\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12=\n\x0e\x66ree_threshold\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x0c\n\n_flat_rateB\x11\n\x0f_free_threshold\"\xe0\x01\n\x12HandlingCutoffTime\x12\x14\n\x07\x63ountry\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0b\x63utoff_time\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0f\x63utoff_timezone\x18\x03 \x01(\tH\x02\x88\x01\x01\x12*\n\x1d\x64isable_delivery_after_cutoff\x18\x04 \x01(\x08H\x03\x88\x01\x01\x42\n\n\x08_countryB\x0e\n\x0c_cutoff_timeB\x12\n\x10_cutoff_timezoneB \n\x1e_disable_delivery_after_cutoff\"\xda\x02\n\x18ProductMinimumOrderValue\x12\x19\n\x07\x63ountry\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x14\n\x07service\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\\\n\x07surface\x18\x03 \x01(\x0e\x32\x46.google.shopping.merchant.products.v1.ProductMinimumOrderValue.SurfaceH\x02\x88\x01\x01\x12\x34\n\x05price\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x02H\x03\x88\x01\x01\"K\n\x07Surface\x12\x17\n\x13SURFACE_UNSPECIFIED\x10\x00\x12\n\n\x06ONLINE\x10\x01\x12\t\n\x05LOCAL\x10\x02\x12\x10\n\x0cONLINE_LOCAL\x10\x03\x42\n\n\x08_countryB\n\n\x08_serviceB\n\n\x08_surfaceB\x08\n\x06_price*X\n\x12SubscriptionPeriod\x12#\n\x1fSUBSCRIPTION_PERIOD_UNSPECIFIED\x10\x00\x12\t\n\x05MONTH\x10\x01\x12\x08\n\x04YEAR\x10\x02\x12\x08\n\x04WEEK\x10\x03*`\n\x08\x41geGroup\x12\x19\n\x15\x41GE_GROUP_UNSPECIFIED\x10\x00\x12\t\n\x05\x41\x44ULT\x10\x01\x12\x08\n\x04KIDS\x10\x02\x12\x0b\n\x07TODDLER\x10\x03\x12\n\n\x06INFANT\x10\x04\x12\x0b\n\x07NEWBORN\x10\x05*\x83\x01\n\x0c\x41vailability\x12\x1c\n\x18\x41VAILABILITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08IN_STOCK\x10\x01\x12\x10\n\x0cOUT_OF_STOCK\x10\x02\x12\x0c\n\x08PREORDER\x10\x03\x12\x18\n\x14LIMITED_AVAILABILITY\x10\x04\x12\r\n\tBACKORDER\x10\x05*J\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x08\n\x04USED\x10\x02\x12\x0f\n\x0bREFURBISHED\x10\x03*B\n\x06Gender\x12\x16\n\x12GENDER_UNSPECIFIED\x10\x00\x12\x08\n\x04MALE\x10\x01\x12\n\n\x06\x46\x45MALE\x10\x02\x12\n\n\x06UNISEX\x10\x03*A\n\nCreditType\x12\x1b\n\x17\x43REDIT_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46INANCE\x10\x01\x12\t\n\x05LEASE\x10\x02*\x82\x01\n\nSizeSystem\x12\x1b\n\x17SIZE_SYSTEM_UNSPECIFIED\x10\x00\x12\x06\n\x02\x41U\x10\x01\x12\x06\n\x02\x42R\x10\x02\x12\x06\n\x02\x43N\x10\x03\x12\x06\n\x02\x44\x45\x10\x04\x12\x06\n\x02\x45U\x10\x05\x12\x06\n\x02\x46R\x10\x06\x12\x06\n\x02IT\x10\x07\x12\x06\n\x02JP\x10\x08\x12\x07\n\x03MEX\x10\t\x12\x06\n\x02UK\x10\n\x12\x06\n\x02US\x10\x0b*j\n\x08SizeType\x12\x19\n\x15SIZE_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07REGULAR\x10\x01\x12\n\n\x06PETITE\x10\x02\x12\r\n\tMATERNITY\x10\x03\x12\x07\n\x03\x42IG\x10\x04\x12\x08\n\x04TALL\x10\x05\x12\x08\n\x04PLUS\x10\x06*\x8c\x01\n\x15\x45nergyEfficiencyClass\x12\'\n#ENERGY_EFFICIENCY_CLASS_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41PPP\x10\x01\x12\x07\n\x03\x41PP\x10\x02\x12\x06\n\x02\x41P\x10\x03\x12\x05\n\x01\x41\x10\x04\x12\x05\n\x01\x42\x10\x05\x12\x05\n\x01\x43\x10\x06\x12\x05\n\x01\x44\x10\x07\x12\x05\n\x01\x45\x10\x08\x12\x05\n\x01\x46\x10\t\x12\x05\n\x01G\x10\n*i\n\x0cPickupMethod\x12\x1d\n\x19PICKUP_METHOD_UNSPECIFIED\x10\x00\x12\x11\n\rNOT_SUPPORTED\x10\x01\x12\x07\n\x03\x42UY\x10\x02\x12\x0b\n\x07RESERVE\x10\x03\x12\x11\n\rSHIP_TO_STORE\x10\x04*\x98\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\x0e\n\nMULTI_WEEK\x10\x08*0\n\x05Pause\x12\x15\n\x11PAUSE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44S\x10\x01\x12\x07\n\x03\x41LL\x10\x02*g\n\x16\x43\x65rtificationAuthority\x12\'\n#CERTIFICATION_AUTHORITY_UNSPECIFIED\x10\x00\x12\t\n\x05\x41\x44\x45ME\x10\x01\x12\x08\n\x04\x42MWK\x10\x02\x12\x07\n\x03\x45PA\x10\x03\x12\x06\n\x02\x45\x43\x10\x04*\xd5\x01\n\x11\x43\x65rtificationName\x12\"\n\x1e\x43\x45RTIFICATION_NAME_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x45NERGY_STAR\x10\x01\x12\x1e\n\x1a\x45NERGY_STAR_MOST_EFFICIENT\x10\x02\x12\t\n\x05\x45PREL\x10\x03\x12\x0f\n\x0b\x45U_ECOLABEL\x10\x04\x12\x1d\n\x19VEHICLE_ENERGY_EFFICIENCY\x10\x05\x12\x30\n,VEHICLE_ENERGY_EFFICIENCY_DISCHARGED_BATTERY\x10\x06*d\n\x11\x44igitalSourceType\x12#\n\x1f\x44IGITAL_SOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19TRAINED_ALGORITHMIC_MEDIA\x10\x01\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x02*\xc8\x07\n\x18\x43\x61rrierTransitTimeOption\x12+\n\'CARRIER_TRANSIT_TIME_OPTION_UNSPECIFIED\x10\x00\x12\r\n\tDHL_PAKET\x10\x01\x12\x10\n\x0c\x44HL_PACKCHEN\x10\x02\x12\x13\n\x0f\x44HL_EXPRESSEASY\x10\x03\x12\x0f\n\x0b\x44PD_EXPRESS\x10\x04\x12\x16\n\x12\x44PD_CLASSIC_PARCEL\x10\x05\x12\x12\n\x0eHERMES_HAUSTUR\x10\x06\x12\x14\n\x10HERMES_PAKETSHOP\x10\x07\x12\x10\n\x0cGLS_BUSINESS\x10\x08\x12\x0f\n\x0bGLS_EXPRESS\x10\t\x12\x0f\n\x0bGLS_PRIVATE\x10\n\x12\x16\n\x12\x43OLISSIMO_DOMICILE\x10\x0b\x12\x14\n\x10\x44HL_EXPRESS_12AM\x10\x0c\x12\x13\n\x0f\x44HL_EXPRESS_9AM\x10\r\x12\x12\n\x0eGEODIS_EXPRESS\x10\x0e\x12\x12\n\x0eGEODIS_PACK_30\x10\x0f\x12\x13\n\x0fGEODIS_SAME_DAY\x10\x10\x12\x11\n\rGEODIS_TOP_24\x10\x11\x12\x15\n\x11TNT_ESSENTIEL_24H\x10\x12\x12\x1d\n\x19TNT_ESSENTIEL_FLEXIBILITE\x10\x13\x12\x10\n\x0c\x46\x45\x44\x45X_GROUND\x10\x14\x12\x17\n\x13\x46\x45\x44\x45X_HOME_DELIVERY\x10\x15\x12\x17\n\x13\x46\x45\x44\x45X_EXPRESS_SAVER\x10\x16\x12\x19\n\x15\x46\x45\x44\x45X_FIRST_OVERNIGHT\x10\x17\x12\x1c\n\x18\x46\x45\x44\x45X_PRIORITY_OVERNIGHT\x10\x18\x12\x1c\n\x18\x46\x45\x44\x45X_STANDARD_OVERNIGHT\x10\x19\x12\x0e\n\nFEDEX_2DAY\x10\x1a\x12\x13\n\x0fUPS_2ND_DAY_AIR\x10\x1b\x12\x12\n\x0eUPS_2ND_DAY_AM\x10\x1c\x12\x14\n\x10UPS_3_DAY_SELECT\x10\x1d\x12\x0e\n\nUPS_GROUND\x10\x1e\x12\x14\n\x10UPS_NEXT_DAY_AIR\x10\x1f\x12\x1d\n\x19UPS_NEXT_DAY_AIR_EARLY_AM\x10 \x12\x1a\n\x16UPS_NEXT_DAY_AIR_SAVER\x10!\x12\x1e\n\x1aUSPS_PRIORITY_MAIL_EXPRESS\x10\"\x12\x13\n\x0fUSPS_MEDIA_MAIL\x10#\x12 \n\x1cUSPS_GROUND_ADVANTAGE_RETAIL\x10$\x12\x16\n\x12USPS_PRIORITY_MAIL\x10%\x12$\n USPS_GROUND_ADVANTAGE_COMMERCIAL\x10&\x12\x19\n\x15USPS_FIRST_CLASS_MAIL\x10\'B\x86\x02\n(com.google.shopping.merchant.products.v1B\x13ProductsCommonProtoP\x01ZJcloud.google.com/go/shopping/merchant/products/apiv1/productspb;productspb\xaa\x02$Google.Shopping.Merchant.Products.V1\xca\x02$Google\\Shopping\\Merchant\\Products\\V1\xea\x02(Google::Shopping::Merchant::Products::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Products + module V1 + ProductAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes").msgclass + ProductAttributes::ShippingBusinessDaysConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.ShippingBusinessDaysConfig").msgclass + ProductAttributes::CarrierShipping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.CarrierShipping").msgclass + ProductAttributes::Mileage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.Mileage").msgclass + ProductAttributes::Mileage::Unit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.Mileage.Unit").enummodule + ProductAttributes::FuelConsumption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.FuelConsumption").msgclass + ProductAttributes::FuelConsumption::Unit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.FuelConsumption.Unit").enummodule + ProductAttributes::EnergyConsumption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.EnergyConsumption").msgclass + ProductAttributes::EnergyConsumption::Unit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.EnergyConsumption.Unit").enummodule + ProductAttributes::Co2Emissions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.Co2Emissions").msgclass + ProductAttributes::Co2Emissions::Unit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.Co2Emissions.Unit").enummodule + ProductAttributes::Warranty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.Warranty").msgclass + ProductAttributes::ProductFee = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.ProductFee").msgclass + ProductAttributes::ProductFee::FeeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.ProductFee.FeeType").enummodule + ProductAttributes::DisplayAddress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.DisplayAddress").msgclass + ProductAttributes::UnitArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.UnitArea").msgclass + ProductAttributes::UnitArea::Unit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.UnitArea.Unit").enummodule + ProductAttributes::PetPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.PetPolicy").msgclass + ProductAttributes::PetPolicy::PetType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.PetPolicy.PetType").enummodule + ProductAttributes::QuestionAndAnswer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.QuestionAndAnswer").msgclass + ProductAttributes::VariantOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.VariantOption").msgclass + ProductAttributes::RelatedProduct = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct").msgclass + ProductAttributes::RelatedProduct::RelationshipType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.RelationshipType").enummodule + ProductAttributes::RelatedProduct::IdType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.IdType").enummodule + ProductAttributes::CarrierPriceOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.CarrierPriceOption").enummodule + ProductAttributes::VehicleBodyStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.VehicleBodyStyle").enummodule + ProductAttributes::EngineType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.EngineType").enummodule + ProductAttributes::EmissionsStandard = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.EmissionsStandard").enummodule + ProductAttributes::VehiclePriceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.VehiclePriceType").enummodule + ProductAttributes::PropertyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.PropertyType").enummodule + ProductAttributes::AmenityFeature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.AmenityFeature").enummodule + ProductAttributes::UtilitiesIncluded = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.UtilitiesIncluded").enummodule + ProductAttributes::SpecialtyHousingType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.SpecialtyHousingType").enummodule + ShippingWeight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ShippingWeight").msgclass + ShippingDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ShippingDimension").msgclass + UnitPricingBaseMeasure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.UnitPricingBaseMeasure").msgclass + UnitPricingMeasure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.UnitPricingMeasure").msgclass + SubscriptionCost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.SubscriptionCost").msgclass + ProductInstallment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductInstallment").msgclass + LoyaltyPoints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.LoyaltyPoints").msgclass + LoyaltyProgram = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.LoyaltyProgram").msgclass + Shipping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.Shipping").msgclass + FreeShippingThreshold = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.FreeShippingThreshold").msgclass + ProductDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductDetail").msgclass + ProductCertification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductCertification").msgclass + StructuredTitle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.StructuredTitle").msgclass + StructuredDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.StructuredDescription").msgclass + ProductDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductDimension").msgclass + ProductWeight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductWeight").msgclass + ProductStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductStatus").msgclass + ProductStatus::DestinationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductStatus.DestinationStatus").msgclass + ProductStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductStatus.ItemLevelIssue").msgclass + ProductStatus::ItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductStatus.ItemLevelIssue.Severity").enummodule + CloudExportAdditionalProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.CloudExportAdditionalProperties").msgclass + ProductSustainabilityIncentive = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductSustainabilityIncentive").msgclass + ProductSustainabilityIncentive::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductSustainabilityIncentive.Type").enummodule + AutomatedDiscounts = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.AutomatedDiscounts").msgclass + PickupCost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.PickupCost").msgclass + HandlingCutoffTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.HandlingCutoffTime").msgclass + ProductMinimumOrderValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductMinimumOrderValue").msgclass + ProductMinimumOrderValue::Surface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductMinimumOrderValue.Surface").enummodule + SubscriptionPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.SubscriptionPeriod").enummodule + AgeGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.AgeGroup").enummodule + Availability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.Availability").enummodule + Condition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.Condition").enummodule + Gender = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.Gender").enummodule + CreditType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.CreditType").enummodule + SizeSystem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.SizeSystem").enummodule + SizeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.SizeType").enummodule + EnergyEfficiencyClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.EnergyEfficiencyClass").enummodule + PickupMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.PickupMethod").enummodule + PickupSla = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.PickupSla").enummodule + Pause = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.Pause").enummodule + CertificationAuthority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.CertificationAuthority").enummodule + CertificationName = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.CertificationName").enummodule + DigitalSourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.DigitalSourceType").enummodule + CarrierTransitTimeOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.CarrierTransitTimeOption").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_pb.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_pb.rb new file mode 100644 index 000000000000..129d79605e94 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/products/v1/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/merchant/products/v1/products_common_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n3google/shopping/merchant/products/v1/products.proto\x12$google.shopping.merchant.products.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/products/v1/products_common.proto\x1a google/shopping/type/types.proto\"\xa8\x05\n\x07Product\x12\x0c\n\x04name\x18\x01 \x01(\t\x12 \n\x13\x62\x61se64_encoded_name\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0clegacy_local\x18\x0b \x01(\x08\x42\x03\xe0\x41\x03\x12\x15\n\x08offer_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63ontent_language\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nfeed_label\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x61ta_source\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12 \n\x0eversion_number\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12X\n\x12product_attributes\x18\r \x01(\x0b\x32\x37.google.shopping.merchant.products.v1.ProductAttributesB\x03\xe0\x41\x03\x12\x45\n\x11\x63ustom_attributes\x18\t \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x03\x12P\n\x0eproduct_status\x18\n \x01(\x0b\x32\x33.google.shopping.merchant.products.v1.ProductStatusB\x03\xe0\x41\x03\x12Z\n\x13\x61utomated_discounts\x18\x0c \x01(\x0b\x32\x38.google.shopping.merchant.products.v1.AutomatedDiscountsB\x03\xe0\x41\x03\x12\x15\n\x08\x61rchived\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03:N\xea\x41K\n\"merchantapi.googleapis.com/Product\x12%accounts/{account}/products/{product}B\x11\n\x0f_version_number\"M\n\x11GetProductRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Product\"x\n\x13ListProductsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"merchantapi.googleapis.com/Product\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"p\n\x14ListProductsResponse\x12?\n\x08products\x18\x01 \x03(\x0b\x32-.google.shopping.merchant.products.v1.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xcf\x03\n\x0fProductsService\x12\xae\x01\n\nGetProduct\x12\x37.google.shopping.merchant.products.v1.GetProductRequest\x1a-.google.shopping.merchant.products.v1.Product\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/products/v1/{name=accounts/*/products/*}\x12\xc1\x01\n\x0cListProducts\x12\x39.google.shopping.merchant.products.v1.ListProductsRequest\x1a:.google.shopping.merchant.products.v1.ListProductsResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/products/v1/{parent=accounts/*}/products\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xbb\x02\n(com.google.shopping.merchant.products.v1B\rProductsProtoP\x01ZJcloud.google.com/go/shopping/merchant/products/apiv1/productspb;productspb\xaa\x02$Google.Shopping.Merchant.Products.V1\xca\x02$Google\\Shopping\\Merchant\\Products\\V1\xea\x02(Google::Shopping::Merchant::Products::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 Products + module V1 + Product = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.Product").msgclass + GetProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.GetProductRequest").msgclass + ListProductsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ListProductsRequest").msgclass + ListProductsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ListProductsResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service.rb new file mode 100644 index 000000000000..64476f45cd43 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_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/products/v1/version" + +require "google/shopping/merchant/products/v1/products_service/credentials" +require "google/shopping/merchant/products/v1/products_service/paths" +require "google/shopping/merchant/products/v1/products_service/client" +require "google/shopping/merchant/products/v1/products_service/rest" + +module Google + module Shopping + module Merchant + module Products + module V1 + ## + # Service to use Product resource. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/products/v1/products_service" + # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/products/v1/products_service/rest" + # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new + # + module ProductsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "products_service", "helpers.rb" +require "google/shopping/merchant/products/v1/products_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/client.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/client.rb new file mode 100644 index 000000000000..b77959106caf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/client.rb @@ -0,0 +1,636 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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/products/v1/products_pb" + +module Google + module Shopping + module Merchant + module Products + module V1 + module ProductsService + ## + # Client for the ProductsService service. + # + # Service to use Product resource. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :products_service_stub + + ## + # Configure the ProductsService Client class. + # + # See {::Google::Shopping::Merchant::Products::V1::ProductsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProductsService clients + # ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.configure do |config| + # config.timeout = 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", "Products", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.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 ProductsService Client instance. + # + # The configuration is set to the derived mode, meaning that values 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::Products::V1::ProductsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @products_service_stub.universe_domain + end + + ## + # Create a new ProductsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProductsService 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/products/v1/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 + + @products_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Products::V1::ProductsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @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 + @products_service_stub.logger + end + + # Service calls + + ## + # Retrieves the processed product from your Merchant 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_product(request, options = nil) + # Pass arguments to `get_product` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1::GetProductRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1::GetProductRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_product(name: nil) + # Pass arguments to `get_product` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the product. + # Format: `accounts/{account}/products/{product}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url + # encoded string (RFC 4648 Section 5). The decoded string must result + # in the `content_language~feed_label~offer_id` structure. This encoding + # MUST be used if any part of the product identifier (like `offer_id`) + # contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123`, the + # `{product}` segment must be the unpadded base64url encoding of this + # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + # + # Note: For calls to the v1beta version, the plain format is + # `channel~content_language~feed_label~offer_id`, for example: + # `accounts/123/products/online~en~US~sku123`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Products::V1::Product] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Products::V1::Product] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1::ProductsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1::GetProductRequest.new + # + # # Call the get_product method. + # result = client.get_product request + # + # # The returned object is of type Google::Shopping::Merchant::Products::V1::Product. + # p result + # + def get_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::GetProductRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_product.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Products::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_product.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @products_service_stub.call_rpc :get_product, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the processed products in your Merchant 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 product input, it may take several + # minutes before the updated processed product can be retrieved. + # + # @overload list_products(request, options = nil) + # Pass arguments to `list_products` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1::ListProductsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1::ListProductsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_products(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_products` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to list processed products for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # The maximum number of 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 default page size of 25 products will be returned. + # @param page_token [::String] + # A page token, received from a previous `ListProducts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListProducts` 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::Products::V1::Product>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Products::V1::Product>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1::ProductsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1::ListProductsRequest.new + # + # # Call the list_products method. + # result = client.list_products request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Products::V1::Product. + # p item + # end + # + def list_products request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::ListProductsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_products.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Products::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_products.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @products_service_stub.call_rpc :list_products, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @products_service_stub, :list_products, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ProductsService API. + # + # This class represents the configuration for ProductsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Products::V1::ProductsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_product to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_product.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_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::Merchant::Products::V1::ProductsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ProductsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_product` + # @return [::Gapic::Config::Method] + # + attr_reader :get_product + ## + # RPC-specific configuration for `list_products` + # @return [::Gapic::Config::Method] + # + attr_reader :list_products + + # @private + def initialize parent_rpcs = nil + get_product_config = parent_rpcs.get_product if parent_rpcs.respond_to? :get_product + @get_product = ::Gapic::Config::Method.new get_product_config + list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products + @list_products = ::Gapic::Config::Method.new list_products_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/credentials.rb new file mode 100644 index 000000000000..452534d75641 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_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 Products + module V1 + module ProductsService + # Credentials for the ProductsService 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-products-v1/lib/google/shopping/merchant/products/v1/products_service/paths.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/paths.rb new file mode 100644 index 000000000000..e94269725235 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_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 Products + module V1 + module ProductsService + # Path helper methods for the ProductsService 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-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest.rb new file mode 100644 index 000000000000..0a338c0d900e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_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/products/v1/version" + +require "google/shopping/merchant/products/v1/products_service/credentials" +require "google/shopping/merchant/products/v1/products_service/paths" +require "google/shopping/merchant/products/v1/products_service/rest/client" + +module Google + module Shopping + module Merchant + module Products + module V1 + ## + # Service to use Product resource. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/products/v1/products_service/rest" + # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new + # + module ProductsService + # 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/products/v1/products_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/client.rb new file mode 100644 index 000000000000..99fb8c0c1a03 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/client.rb @@ -0,0 +1,579 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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/products/v1/products_pb" +require "google/shopping/merchant/products/v1/products_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Products + module V1 + module ProductsService + module Rest + ## + # REST client for the ProductsService service. + # + # Service to use Product resource. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :products_service_stub + + ## + # Configure the ProductsService Client class. + # + # See {::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProductsService clients + # ::Google::Shopping::Merchant::Products::V1::ProductsService::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", "Products", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.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 ProductsService Client instance. + # + # The configuration is set to the derived mode, meaning that values 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::Products::V1::ProductsService::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 + @products_service_stub.universe_domain + end + + ## + # Create a new ProductsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProductsService 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 + + @products_service_stub = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @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 + @products_service_stub.logger + end + + # Service calls + + ## + # Retrieves the processed product from your Merchant 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_product(request, options = nil) + # Pass arguments to `get_product` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1::GetProductRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1::GetProductRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_product(name: nil) + # Pass arguments to `get_product` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the product. + # Format: `accounts/{account}/products/{product}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url + # encoded string (RFC 4648 Section 5). The decoded string must result + # in the `content_language~feed_label~offer_id` structure. This encoding + # MUST be used if any part of the product identifier (like `offer_id`) + # contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123`, the + # `{product}` segment must be the unpadded base64url encoding of this + # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + # + # Note: For calls to the v1beta version, the plain format is + # `channel~content_language~feed_label~offer_id`, for example: + # `accounts/123/products/online~en~US~sku123`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Products::V1::Product] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1::Product] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1::GetProductRequest.new + # + # # Call the get_product method. + # result = client.get_product request + # + # # The returned object is of type Google::Shopping::Merchant::Products::V1::Product. + # p result + # + def get_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::GetProductRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_product.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Products::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_product.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @products_service_stub.get_product request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the processed products in your Merchant 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 product input, it may take several + # minutes before the updated processed product can be retrieved. + # + # @overload list_products(request, options = nil) + # Pass arguments to `list_products` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1::ListProductsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1::ListProductsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_products(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_products` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to list processed products for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # The maximum number of 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 default page size of 25 products will be returned. + # @param page_token [::String] + # A page token, received from a previous `ListProducts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListProducts` 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::Products::V1::Product>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Products::V1::Product>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1::ListProductsRequest.new + # + # # Call the list_products method. + # result = client.list_products request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Products::V1::Product. + # p item + # end + # + def list_products request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::ListProductsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_products.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Products::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_products.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @products_service_stub.list_products request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @products_service_stub, :list_products, "products", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ProductsService REST API. + # + # This class represents the configuration for ProductsService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_product to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_product.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the ProductsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_product` + # @return [::Gapic::Config::Method] + # + attr_reader :get_product + ## + # RPC-specific configuration for `list_products` + # @return [::Gapic::Config::Method] + # + attr_reader :list_products + + # @private + def initialize parent_rpcs = nil + get_product_config = parent_rpcs.get_product if parent_rpcs.respond_to? :get_product + @get_product = ::Gapic::Config::Method.new get_product_config + list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products + @list_products = ::Gapic::Config::Method.new list_products_config + + 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-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/service_stub.rb new file mode 100644 index 000000000000..31581fcf3077 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_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/products/v1/products_pb" + +module Google + module Shopping + module Merchant + module Products + module V1 + module ProductsService + module Rest + ## + # REST service stub for the ProductsService 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_product REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1::GetProductRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Products::V1::Product] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1::Product] + # A result object deserialized from the server's reply + def get_product request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_product_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_product", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Products::V1::Product.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_products REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1::ListProductsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Products::V1::ListProductsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1::ListProductsResponse] + # A result object deserialized from the server's reply + def list_products request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_products_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_products", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Products::V1::ListProductsResponse.decode_json response.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_product REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1::GetProductRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_product_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/products/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_products REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1::ListProductsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_products_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/products/v1/{parent}/products", + 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-products-v1/lib/google/shopping/merchant/products/v1/products_services_pb.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_services_pb.rb new file mode 100644 index 000000000000..21a0bd234222 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_services_pb.rb @@ -0,0 +1,57 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/products/v1/products.proto for package 'Google.Shopping.Merchant.Products.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/products/v1/products_pb' + +module Google + module Shopping + module Merchant + module Products + module V1 + module ProductsService + # Service to use Product resource. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.products.v1.ProductsService' + + # Retrieves the processed product from your Merchant Center account. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the updated final product can be retrieved. + rpc :GetProduct, ::Google::Shopping::Merchant::Products::V1::GetProductRequest, ::Google::Shopping::Merchant::Products::V1::Product + # Lists the processed products in your Merchant 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 product input, it may take several + # minutes before the updated processed product can be retrieved. + rpc :ListProducts, ::Google::Shopping::Merchant::Products::V1::ListProductsRequest, ::Google::Shopping::Merchant::Products::V1::ListProductsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/rest.rb new file mode 100644 index 000000000000..35efbd477133 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/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/products/v1/product_inputs_service/rest" +require "google/shopping/merchant/products/v1/products_service/rest" +require "google/shopping/merchant/products/v1/version" + +module Google + module Shopping + module Merchant + module Products + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/products/v1/rest" + # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/version.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/version.rb new file mode 100644 index 000000000000..8daac29a337a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/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 Products + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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. + # + # Note: This field should not be used in most cases. + 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. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # 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-products-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 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-products-v1/proto_docs/google/shopping/merchant/products/v1/productinputs.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/productinputs.rb new file mode 100644 index 000000000000..852b9c4e5e01 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/productinputs.rb @@ -0,0 +1,297 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Products + module V1 + # This resource represents input data you submit for a product, not the + # processed product that you see in Merchant Center, in Shopping ads, or + # across Google surfaces. Product inputs, rules and supplemental data source + # data are combined to create the processed + # {::Google::Shopping::Merchant::Products::V1::Product Product}. For more + # information, see [Manage products](/merchant/api/guides/products/overview). + # + # Required product input attributes to pass data validation checks are + # primarily defined in the [Products Data + # Specification](https://support.google.com/merchants/answer/188494). + # + # The following attributes are required: + # {::Google::Shopping::Merchant::Products::V1::Product#feed_label feedLabel}, + # {::Google::Shopping::Merchant::Products::V1::Product#content_language contentLanguage} + # and {::Google::Shopping::Merchant::Products::V1::Product#offer_id offerId}. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # All fields in the product input and its sub-messages match the English name + # of their corresponding attribute in the [Products Data + # Specification](https://support.google.com/merchants/answer/188494) with + # [some exceptions](https://support.google.com/merchants/answer/7052112). + # The following reference documentation lists the field names in the + # **camelCase** casing style while the Products Data Specification lists the + # names in the **snake_case** casing style. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the product. + # Format: `accounts/{account}/productInputs/{productinput}` + # + # The \\{productinput} segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the \\{productinput} segment in the URL is automatically + # detected by the server, supporting two options: + # + # 1. **Encoded Format**: The `{productinput}` segment is an unpadded + # base64url + # encoded string (RFC 4648 Section 5). The decoded string must result + # in the `content_language~feed_label~offer_id` structure. This encoding + # MUST be used if any part of the product identifier (like `offer_id`) + # contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123`, the + # `{productinput}` segment must be the unpadded base64url encoding of + # this string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw`. + # + # 2. **Plain Format**: The `{productinput}` segment is the tilde-separated + # string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{productinput}` segment is used + # to differentiate between the two formats. + # @!attribute [r] base64_encoded_name + # @return [::String] + # Output only. The **unpadded base64url encoded name** of the product input. + # Format: + # `accounts/{account}/productInputs/{productinput}` where the last + # section `productinput` is the unpadded base64url encoding of the + # `content_language~feed_label~offer_id` name. + # Example: `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw` for the decoded + # product input name `accounts/123/productInputs/en~US~sku/123`. This field + # can be used directly as input to the API methods that require the product + # input name to be encoded if it contains special characters, for example + # [`GetProductInput`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.productInputs/get). + # @!attribute [r] product + # @return [::String] + # Output only. The name of the processed product. + # Format: `accounts/{account}/products/{product}` + # @!attribute [r] base64_encoded_product + # @return [::String] + # Output only. The **unpadded base64url encoded name** of the processed + # product. Format: `accounts/{account}/products/{product}` where the last + # section `product` is the unpadded base64url encoding of the + # `content_language~feed_label~offer_id` name. + # Example: `accounts/123/products/ZW5-VVN-c2t1LzEyMw` for the decoded + # product name `accounts/123/products/en~US~sku/123`. This field can be used + # directly as input to the API methods that require the product name to be + # encoded if it contains special characters, for example + # [`GetProduct`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.products/get). + # @!attribute [rw] legacy_local + # @return [::Boolean] + # Immutable. Determines whether the product is **only** targeting + # local destinations and whether the product name should be distinguished + # with a `local~` prefix. For example, + # `accounts/123/productInputs/local~en~US~sku123`. If a product that is not + # `legacy_local` is already targeting local destinations, + # creating a `legacy_local` product with an otherwise matching name will + # fail. + # @!attribute [rw] offer_id + # @return [::String] + # Required. Immutable. Your unique identifier for the product. This is the + # same for the product input and processed product. Leading and trailing + # whitespaces are stripped and multiple whitespaces are replaced by a single + # whitespace upon submission. See the [products data + # specification](https://support.google.com/merchants/answer/188494#id) for + # details. + # @!attribute [rw] content_language + # @return [::String] + # Required. Immutable. The two-letter [ISO + # 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the + # product. + # @!attribute [rw] feed_label + # @return [::String] + # Required. Immutable. The feed label that lets you categorize and identify + # your products. The maximum allowed characters are 20, and the supported + # characters are `A-Z`, `0-9`, hyphen, and underscore. The feed label must + # not include any spaces. For more information, see [Using feed + # labels](//support.google.com/merchants/answer/14994087). + # @!attribute [rw] version_number + # @return [::Integer] + # Optional. Immutable. Represents the existing version (freshness) of the + # product, which can be used to preserve the right order when multiple + # updates are done at the same time. + # + # If set, the insertion is prevented when version number is lower than + # the current version number of the existing product. Re-insertion (for + # example, product refresh after 30 days) can be performed with the current + # `version_number`. + # + # Only supported for insertions into primary data sources. + # Do not set this field for updates. + # Do not set this field for insertions into supplemental data sources. + # + # If the operation is prevented, the aborted exception will be + # thrown. + # @!attribute [rw] product_attributes + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes] + # Optional. A list of strongly-typed product attributes. + # @!attribute [rw] custom_attributes + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Optional. A list of custom (merchant-provided) attributes. It can also be + # used for submitting any attribute of the data specification in its generic + # form (for example, + # `{ "name": "size type", "value": "regular" }`). + # This is useful for submitting attributes not explicitly exposed by the + # API. + # Maximum allowed number of characters for each + # custom attribute is 10240 (represents sum of characters for name and + # value). Maximum 2500 custom attributes can be set per product, with total + # size of 102.4kB. Underscores in custom attribute names are replaced by + # spaces upon insertion. + class ProductInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the InsertProductInput method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account where this product will be inserted. + # Format: `accounts/{account}` + # @!attribute [rw] product_input + # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] + # Required. The product input to insert. + # @!attribute [rw] data_source + # @return [::String] + # Required. The primary or supplemental product data source name. If the + # product already exists and data source provided is different, then the + # product will be moved to a new data source. For more information, see + # [Create a primary data + # source](/merchant/api/guides/data-sources/api-sources#create-primary-data-source). + # + # Only API data sources are supported. + # + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + class InsertProductInputRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateProductInput method. + # The product (primary input) must exist for the update to succeed. + # If the update is for a primary product input, the existing primary product + # input must be from the same data source. + # @!attribute [rw] product_input + # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] + # Required. The product input resource to update. Information you submit will + # be applied to the processed product as well. The `name` field within this + # resource identifies the product input to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of 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 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 product replacement is not supported. + # @!attribute [rw] data_source + # @return [::String] + # Required. The primary or supplemental product data source where + # `data_source` name identifies the product input to be updated. + # + # Only API data sources are supported. + # + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + class UpdateProductInputRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteProductInput method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the product input to delete. + # Format: `accounts/{account}/productInputs/{productInput}` + # + # The \\{productInput} segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the \\{productInput} segment in the URL is automatically + # detected by the server, supporting two options: + # + # 1. **Encoded Format**: The `{productInput}` segment is an unpadded + # base64url + # encoded string (RFC 4648 Section 5). The decoded string must result + # in the `content_language~feed_label~offer_id` structure. This encoding + # MUST be used if any part of the product identifier (like `offer_id`) + # contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123`, the + # `{productInput}` segment must be the unpadded base64url encoding of + # this string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw`. + # + # 2. **Plain Format**: The `{productInput}` segment is the tilde-separated + # string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{productInput}` segment is used + # to differentiate between the two formats. + # @!attribute [rw] data_source + # @return [::String] + # Required. The primary or supplemental data source from which the product + # input should be deleted. Format: + # `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + class DeleteProductInputRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products.rb new file mode 100644 index 000000000000..d83cd354ded6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products.rb @@ -0,0 +1,221 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Products + module V1 + # The processed product, built from multiple [product + # inputs][google.shopping.merchant.products.v1main.ProductInput] + # after applying rules and supplemental data sources. This processed product + # matches what is shown in your Merchant Center account. Each product is built + # from exactly one primary data source product input, and multiple supplemental + # data source inputs. After inserting, updating, or deleting a product input, + # it may take several minutes before the updated processed product can be + # retrieved. + # + # All fields in the processed product and its sub-messages match the name of + # their corresponding attribute in the [Product data + # specification](https://support.google.com/merchants/answer/7052112) with some + # exceptions. + # @!attribute [rw] name + # @return [::String] + # The name of the product. + # Format: + # `accounts/{account}/products/{product}` where the last + # section `product` consists of: + # `content_language~feed_label~offer_id` + # example for product name is `accounts/123/products/en~US~sku123`. A legacy + # local product name would be `accounts/123/products/local~en~US~sku123`. + # Note: For calls to the v1beta version, the `product` section consists + # of: `channel~content_language~feed_label~offer_id`, for example: + # `accounts/123/products/online~en~US~sku123`. + # @!attribute [r] base64_encoded_name + # @return [::String] + # Output only. The **unpadded base64url encoded name** of the product. + # Format: + # `accounts/{account}/products/{product}` where the last + # section `product` is the unpadded base64url encoding of the + # `content_language~feed_label~offer_id` name. + # Example: `accounts/123/products/ZW5-VVN-c2t1LzEyMw` for the decoded product + # name `accounts/123/products/en~US~sku/123`. This field can be used directly + # as input to the API methods that require the product name to be encoded if + # it contains special characters, for example + # [`GetProduct`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.products/get). + # @!attribute [r] legacy_local + # @return [::Boolean] + # Output only. Determines whether the product is **only** targeting + # local destinations and whether the product name should be distinguished + # with a `local~` prefix. For example, + # `accounts/123/products/local~en~US~sku123`. + # @!attribute [r] offer_id + # @return [::String] + # Output only. Your unique identifier for the product. This is the same for + # the product input and processed product. Leading and trailing whitespaces + # are stripped and multiple whitespaces are replaced by a single whitespace + # upon submission. See the [product data + # specification](https://support.google.com/merchants/answer/188494#id) for + # details. + # @!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 lets you categorize and identify your products. + # The maximum allowed characters is 20 and the supported characters are`A-Z`, + # `0-9`, hyphen and underscore. The feed label must not include any spaces. + # For more information, see [Using feed + # labels](//support.google.com/merchants/answer/14994087) + # @!attribute [r] data_source + # @return [::String] + # Output only. The primary data source of the product. + # @!attribute [r] version_number + # @return [::Integer] + # Output only. Represents the existing version (freshness) of the product, + # which can be used to preserve the right order when multiple updates are + # done at the same time. + # + # If set, the insertion is prevented when version number is lower than + # the current version number of the existing product. Re-insertion (for + # example, product refresh after 30 days) can be performed with the current + # `version_number`. + # + # Only supported for insertions into primary data sources. + # + # If the operation is prevented, the aborted exception will be + # thrown. + # @!attribute [r] product_attributes + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes] + # Output only. A list of strongly-typed product attributes. + # @!attribute [r] custom_attributes + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Output only. A list of custom (merchant-provided) attributes. It can also + # be used to submit any attribute of the data 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] product_status + # @return [::Google::Shopping::Merchant::Products::V1::ProductStatus] + # Output only. The status of a product, data validation issues, that is, + # information about a product computed asynchronously. + # @!attribute [r] automated_discounts + # @return [::Google::Shopping::Merchant::Products::V1::AutomatedDiscounts] + # Output only. The automated discounts information for the product. + # @!attribute [r] archived + # @return [::Boolean] + # Output only. Determines whether the product is + # [archived](https://support.google.com/merchants/answer/11909930). + # + # To archive or restore your product, visit Merchant Center products page. + # Learn also more about [offer + # visibility](https://support.google.com/merchants/answer/12488713). + class Product + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the GetProduct method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the product. + # Format: `accounts/{account}/products/{product}` + # + # The `{product}` segment is a unique identifier for the product. + # This identifier must be unique within a merchant account and generally + # follows the structure: `content_language~feed_label~offer_id`. Example: + # `en~US~sku123` For legacy local products, the structure is: + # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` + # + # The format of the `{product}` segment in the URL is automatically detected + # by the server, supporting two options: + # + # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url + # encoded string (RFC 4648 Section 5). The decoded string must result + # in the `content_language~feed_label~offer_id` structure. This encoding + # MUST be used if any part of the product identifier (like `offer_id`) + # contains characters such as `/`, `%`, or `~`. + # * Example: To represent the product ID `en~US~sku/123`, the + # `{product}` segment must be the unpadded base64url encoding of this + # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. + # + # 2. **Plain Format**: The `{product}` segment is the tilde-separated string + # `content_language~feed_label~offer_id`. This format is suitable only + # when `content_language`, `feed_label`, and `offer_id` do not contain + # URL-problematic characters like `/`, `%`, or `~`. + # + # We recommend using the **Encoded Format** for all product IDs to ensure + # correct parsing, especially those containing special characters. The + # presence of tilde (`~`) characters in the `{product}` segment is used to + # differentiate between the two formats. + # + # Note: For calls to the v1beta version, the plain format is + # `channel~content_language~feed_label~offer_id`, for example: + # `accounts/123/products/online~en~US~sku123`. + class GetProductRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListProducts method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to list processed products for. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of 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 default page size of 25 products will be returned. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListProducts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListProducts` must + # match the call that provided the page token. + class ListProductsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListProducts method. + # @!attribute [rw] products + # @return [::Array<::Google::Shopping::Merchant::Products::V1::Product>] + # The processed products from the specified account. These are your processed + # products after applying rules and supplemental data sources. + # @!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 ListProductsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products_common.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products_common.rb new file mode 100644 index 000000000000..f2889cd30f1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products_common.rb @@ -0,0 +1,2786 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Products + module V1 + # Product attributes. + # @!attribute [rw] identifier_exists + # @return [::Boolean] + # Set this value to false when the item does not have unique product + # identifiers appropriate to its category, such as GTIN, MPN, and brand. + # Defaults to true, if not provided. + # @!attribute [rw] is_bundle + # @return [::Boolean] + # Whether the item is a business-defined sub-API. A [sub-API] + # (https://support.google.com/merchants/answer/6324449) is a custom + # grouping of different products sold by a business for a single price. + # @!attribute [rw] title + # @return [::String] + # Title of the item. + # @!attribute [rw] description + # @return [::String] + # Description of the item. + # @!attribute [rw] link + # @return [::String] + # URL directly linking to your item's page on your online store. + # @!attribute [rw] mobile_link + # @return [::String] + # URL for the mobile-optimized version of your item's landing page. + # @!attribute [rw] canonical_link + # @return [::String] + # URL for the canonical version of your item's landing page. + # @!attribute [rw] image_link + # @return [::String] + # URL of an image of the item. + # @!attribute [rw] additional_image_links + # @return [::Array<::String>] + # Additional URLs of images of the item. + # @!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. + # @!attribute [rw] disclosure_date + # @return [::Google::Protobuf::Timestamp] + # The date time when an offer becomes visible in search results across + # Google’s YouTube surfaces, in [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + # See [Disclosure date](https://support.google.com/merchants/answer/13034208) + # for more information. + # @!attribute [rw] adult + # @return [::Boolean] + # Set to true if the item is targeted towards adults. + # @!attribute [rw] age_group + # @return [::Google::Shopping::Merchant::Products::V1::AgeGroup] + # Target [age group](https://support.google.com/merchants/answer/6324463) of + # the item. + # @!attribute [rw] availability + # @return [::Google::Shopping::Merchant::Products::V1::Availability] + # [Availability](https://support.google.com/merchants/answer/6324448) status + # of the item. + # @!attribute [rw] availability_date + # @return [::Google::Protobuf::Timestamp] + # The day a pre-ordered product becomes available for delivery, in [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + # @!attribute [rw] brand + # @return [::String] + # [Brand](https://support.google.com/merchants/answer/6324351) of the item. + # For example, "Google". + # @!attribute [rw] color + # @return [::String] + # [Color](https://support.google.com/merchants/answer/6324487) of the item. + # For example, "red". + # @!attribute [rw] condition + # @return [::Google::Shopping::Merchant::Products::V1::Condition] + # [Condition](https://support.google.com/merchants/answer/6324469) or state + # of the item. + # @!attribute [rw] gender + # @return [::Google::Shopping::Merchant::Products::V1::Gender] + # Target [gender](https://support.google.com/merchants/answer/6324479) of the + # item. + # @!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] gtins + # @return [::Array<::String>] + # Global Trade Item Numbers + # ([GTIN](https://support.google.com/merchants/answer/6324461)) of the + # item. + # You can provide up to 10 GTINs. + # @!attribute [rw] item_group_id + # @return [::String] + # Shared identifier for all variants of the same product. + # @!attribute [rw] material + # @return [::String] + # The [material](https://support.google.com/merchants/answer/6324410) of + # which the item is made. For example, "Leather" or "Cotton". + # @!attribute [rw] mpn + # @return [::String] + # Manufacturer Part Number + # ([MPN](https://support.google.com/merchants/answer/6324482)) of the + # item. + # @!attribute [rw] pattern + # @return [::String] + # The item's [pattern](https://support.google.com/merchants/answer/6324483). + # For example, polka dots. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Price of the item. + # @!attribute [rw] maximum_retail_price + # @return [::Google::Shopping::Type::Price] + # Maximum retail price (MRP) of the item. Applicable to India only. + # @!attribute [rw] installment + # @return [::Google::Shopping::Merchant::Products::V1::ProductInstallment] + # Number and amount of installments to pay for an item. + # @!attribute [rw] subscription_cost + # @return [::Google::Shopping::Merchant::Products::V1::SubscriptionCost] + # Number of periods (weeks, months or years) and amount of payment per period + # for an item with an associated subscription contract. + # @!attribute [rw] loyalty_points + # @return [::Google::Shopping::Merchant::Products::V1::LoyaltyPoints] + # Loyalty points that users receive after purchasing the item. Japan only. + # @!attribute [rw] loyalty_programs + # @return [::Array<::Google::Shopping::Merchant::Products::V1::LoyaltyProgram>] + # A list of loyalty program information that is used to surface loyalty + # benefits (for example, better pricing, points, etc) to the user of this + # item. + # @!attribute [rw] product_types + # @return [::Array<::String>] + # Categories of the item (formatted as in [product data + # specification](https://support.google.com/merchants/answer/7052112#product_category)). + # @!attribute [rw] sale_price + # @return [::Google::Shopping::Type::Price] + # Advertised sale price of the item. + # @!attribute [rw] sale_price_effective_date + # @return [::Google::Type::Interval] + # Date range during which the item is on sale, see [product data + # specification](https://support.google.com/merchants/answer/7052112#price_and_availability). + # @!attribute [rw] sell_on_google_quantity + # @return [::Integer] + # The quantity of the product that is available for selling on Google. + # Supported only for online products. + # @!attribute [rw] product_height + # @return [::Google::Shopping::Merchant::Products::V1::ProductDimension] + # The height of the product in the units provided. The value must be + # between + # 0 (exclusive) and 3000 (inclusive). + # @!attribute [rw] product_length + # @return [::Google::Shopping::Merchant::Products::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::Merchant::Products::V1::ProductDimension] + # The width of the product in the units provided. The value must be between + # 0 (exclusive) and 3000 (inclusive). + # @!attribute [rw] product_weight + # @return [::Google::Shopping::Merchant::Products::V1::ProductWeight] + # The weight of the product in the units provided. The value must be + # between 0 (exclusive) and 2000 (inclusive). + # @!attribute [rw] shipping + # @return [::Array<::Google::Shopping::Merchant::Products::V1::Shipping>] + # Shipping rules. + # @!attribute [rw] carrier_shipping + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping>] + # Rules for carrier-based shipping. + # @!attribute [rw] free_shipping_threshold + # @return [::Array<::Google::Shopping::Merchant::Products::V1::FreeShippingThreshold>] + # Conditions to be met for a product to have free shipping. + # @!attribute [rw] shipping_weight + # @return [::Google::Shopping::Merchant::Products::V1::ShippingWeight] + # Weight of the item for shipping. + # @!attribute [rw] shipping_length + # @return [::Google::Shopping::Merchant::Products::V1::ShippingDimension] + # Length of the item for shipping. + # @!attribute [rw] shipping_width + # @return [::Google::Shopping::Merchant::Products::V1::ShippingDimension] + # Width of the item for shipping. + # @!attribute [rw] shipping_height + # @return [::Google::Shopping::Merchant::Products::V1::ShippingDimension] + # Height of the item for shipping. + # @!attribute [rw] max_handling_time + # @return [::Integer] + # Maximal product handling time (in business days). + # @!attribute [rw] min_handling_time + # @return [::Integer] + # Minimal product handling time (in business days). + # @!attribute [rw] shipping_handling_business_days + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductAttributes::ShippingBusinessDaysConfig>] + # The business days during which orders can be handled. If not provided, + # Monday to Friday business days will be assumed. + # @!attribute [rw] shipping_transit_business_days + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductAttributes::ShippingBusinessDaysConfig>] + # The business days during which orders are in transit. + # If not provided, Monday to Friday business days will be assumed. + # @!attribute [rw] handling_cutoff_times + # @return [::Array<::Google::Shopping::Merchant::Products::V1::HandlingCutoffTime>] + # The handling cutoff times for shipping. + # @!attribute [rw] shipping_label + # @return [::String] + # The shipping label of the product, used to group products in account-level + # shipping rules. Max. 100 characters. For more information, see + # [Shipping label](https://support.google.com/merchants/answer/6324504). + # @!attribute [rw] return_policy_label + # @return [::String] + # The return label of the product, used to group products in account-level + # return policies. Max. 100 characters. For more information, see + # [Return policy label](https://support.google.com/merchants/answer/9445425). + # @!attribute [rw] transit_time_label + # @return [::String] + # The transit time label of the product, used to group product in + # account-level transit time tables. + # @!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 + # [Size](https://support.google.com/merchants/answer/6324492). + # @!attribute [rw] size_system + # @return [::Google::Shopping::Merchant::Products::V1::SizeSystem] + # System in which the size is specified. Recommended for apparel items. + # For more information, see + # [Size system](https://support.google.com/merchants/answer/6324502). + # @!attribute [rw] size_types + # @return [::Array<::Google::Shopping::Merchant::Products::V1::SizeType>] + # 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] energy_efficiency_class + # @return [::Google::Shopping::Merchant::Products::V1::EnergyEfficiencyClass] + # The [energy efficiency + # class](https://support.google.com/merchants/answer/7562785) as defined in + # EU directive 2010/30/EU. + # @!attribute [rw] min_energy_efficiency_class + # @return [::Google::Shopping::Merchant::Products::V1::EnergyEfficiencyClass] + # The [energy efficiency + # class](https://support.google.com/merchants/answer/7562785) as defined in + # EU directive 2010/30/EU. + # @!attribute [rw] max_energy_efficiency_class + # @return [::Google::Shopping::Merchant::Products::V1::EnergyEfficiencyClass] + # The [energy efficiency + # class](https://support.google.com/merchants/answer/7562785) as defined in + # EU directive 2010/30/EU. + # @!attribute [rw] unit_pricing_measure + # @return [::Google::Shopping::Merchant::Products::V1::UnitPricingMeasure] + # The measure and dimension of an item. + # @!attribute [rw] unit_pricing_base_measure + # @return [::Google::Shopping::Merchant::Products::V1::UnitPricingBaseMeasure] + # The preference of the denominator of the unit price. + # @!attribute [rw] multipack + # @return [::Integer] + # The number of identical products in a business-defined multipack. + # @!attribute [rw] ads_grouping + # @return [::String] + # Used to group items in an arbitrary way. Only for CPA%, discouraged + # otherwise. For more information, see + # [Display ads + # attribute](https://support.google.com/merchants/answer/6069387). + # @!attribute [rw] ads_labels + # @return [::Array<::String>] + # Similar to ads_grouping, but only works on CPC. + # @!attribute [rw] ads_redirect + # @return [::String] + # Allows advertisers to override the item URL when the product is shown + # within the context of Product ads. + # @!attribute [rw] cost_of_goods_sold + # @return [::Google::Shopping::Type::Price] + # Cost of goods sold. Used for gross profit reporting. + # @!attribute [rw] product_details + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductDetail>] + # Technical specification or additional product details. + # @!attribute [rw] product_highlights + # @return [::Array<::String>] + # Bullet points describing the most relevant [product + # highlights](https://support.google.com/merchants/answer/9216100). + # @!attribute [rw] display_ads_id + # @return [::String] + # An identifier for an item for dynamic remarketing campaigns. + # @!attribute [rw] display_ads_similar_ids + # @return [::Array<::String>] + # Advertiser-specified recommendations. For more information, see + # [Display ads attribute + # specification](https://support.google.com/merchants/answer/6069387). + # @!attribute [rw] display_ads_title + # @return [::String] + # Title of an item for dynamic remarketing campaigns. + # @!attribute [rw] display_ads_link + # @return [::String] + # URL directly to your item's landing page for dynamic remarketing + # campaigns. + # @!attribute [rw] display_ads_value + # @return [::Float] + # Offer margin for dynamic remarketing campaigns. For more information, see + # [Display ads + # attribute](https://support.google.com/merchants/answer/6069387). + # @!attribute [rw] promotion_ids + # @return [::Array<::String>] + # The unique ID of a promotion. + # @!attribute [rw] pickup_method + # @return [::Google::Shopping::Merchant::Products::V1::PickupMethod] + # The [pickup](https://support.google.com/merchants/answer/14634021) option + # for the item. + # @!attribute [rw] pickup_sla + # @return [::Google::Shopping::Merchant::Products::V1::PickupSla] + # Item store pickup timeline. For more information, see + # [Pickup SLA](https://support.google.com/merchants/answer/14635400). + # @!attribute [rw] pickup_cost + # @return [::Google::Shopping::Merchant::Products::V1::PickupCost] + # Optional. The [pickup + # cost](https://support.google.com/merchants/answer/16988704) for an item + # when a customer buys it online and picks it up at a store. + # @!attribute [rw] link_template + # @return [::String] + # [Link template](https://support.google.com/merchants/answer/13871172) for + # business hosted local storefront. + # @!attribute [rw] mobile_link_template + # @return [::String] + # [Link template](https://support.google.com/merchants/answer/13870216) for + # business hosted local storefront optimized for mobile + # devices. + # @!attribute [rw] custom_label_0 + # @return [::String] + # [Custom label 0](https://support.google.com/merchants/answer/6324473) for + # custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_1 + # @return [::String] + # [Custom label 1](https://support.google.com/merchants/answer/6324473) + # for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_2 + # @return [::String] + # [Custom label 2](https://support.google.com/merchants/answer/6324473) + # for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_3 + # @return [::String] + # [Custom label 3](https://support.google.com/merchants/answer/6324473) + # for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_4 + # @return [::String] + # [Custom label 4](https://support.google.com/merchants/answer/6324473) for + # custom grouping of items in a Shopping campaign. + # @!attribute [rw] included_destinations + # @return [::Array<::Google::Shopping::Type::Destination::DestinationEnum>] + # 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`. + # + # For more information, see + # [Included + # destination](https://support.google.com/merchants/answer/7501026). + # + # Note: We recommend setting destinations on datasources level for most use + # cases. Use this field within products to only setup exceptions. + # @!attribute [rw] excluded_destinations + # @return [::Array<::Google::Shopping::Type::Destination::DestinationEnum>] + # The list of destinations to exclude for this target (corresponds to + # unchecked check boxes in Merchant Center). + # + # For more information, see + # [Excluded + # destination](https://support.google.com/merchants/answer/6324486). + # + # Note: We recommend setting destinations on datasources level for most use + # cases. Use this field within products to only setup exceptions. + # @!attribute [rw] shopping_ads_excluded_countries + # @return [::Array<::String>] + # List of country codes [(ISO 3166-1 + # alpha-2)](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) to exclude the + # offer from Shopping Ads destination. Countries from this list are removed + # from countries configured in data source settings. + # @!attribute [rw] external_seller_id + # @return [::String] + # Required for multi-seller accounts. Use this attribute if you're a + # marketplace uploading products for various sellers to your multi-seller + # account. + # @!attribute [rw] pause + # @return [::Google::Shopping::Merchant::Products::V1::Pause] + # Publication of this item will be temporarily + # [paused](https://support.google.com/merchants/answer/11909930). + # @!attribute [rw] lifestyle_image_links + # @return [::Array<::String>] + # Additional URLs of lifestyle images of the item, used to explicitly + # identify images that showcase your item in a real-world context. See the + # [Help Center article](https://support.google.com/merchants/answer/9103186) + # for more information. + # @!attribute [rw] cloud_export_additional_properties + # @return [::Array<::Google::Shopping::Merchant::Products::V1::CloudExportAdditionalProperties>] + # Extra fields to export to the Cloud Retail program. + # @!attribute [rw] virtual_model_link + # @return [::String] + # URL of the 3D image of the item. See the + # [Help Center article](https://support.google.com/merchants/answer/13674896) + # for more information. + # @!attribute [rw] certifications + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductCertification>] + # Product Certifications, for example for energy efficiency labeling of + # products recorded in the [EU EPREL](https://eprel.ec.europa.eu/screen/home) + # database. See the [Help + # Center](https://support.google.com/merchants/answer/13528839) + # article for more information. + # @!attribute [rw] structured_title + # @return [::Google::Shopping::Merchant::Products::V1::StructuredTitle] + # Structured title, for algorithmically (AI)-generated titles. + # @!attribute [rw] structured_description + # @return [::Google::Shopping::Merchant::Products::V1::StructuredDescription] + # Structured description, for algorithmically (AI)-generated descriptions. + # @!attribute [rw] auto_pricing_min_price + # @return [::Google::Shopping::Type::Price] + # A safeguard in the [automated discounts] + # (https://support.google.com/merchants/answer/10295759) and + # "Dynamic Promotions" + # (https://support.google.com/merchants/answer/13949249) projects, + # ensuring that discounts on business offers do not fall below this value, + # thereby preserving the offer's value and profitability. + # @!attribute [rw] sustainability_incentives + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductSustainabilityIncentive>] + # The list of sustainability incentive programs. + # @!attribute [rw] video_links + # @return [::Array<::String>] + # Optional. A list of video URLs for the item. Use this attribute to provide + # more visuals for your product beyond your image attributes. See the [Help + # Center article](https://support.google.com/merchants/answer/15216925) for + # more information. + # @!attribute [rw] minimum_order_values + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductMinimumOrderValue>] + # The [minimum value](https://support.google.com/merchants/answer/16989009) + # in the cart before a customer can initiate checkout. Supports multiple + # minimum order values. Different minimum order values can be specified per + # country, service and surface. Maximum entries: 100. + # @!attribute [rw] vin + # @return [::String] + # The [Vehicle Identification Number + # (VIN)](https://support.google.com/google-ads/answer/14154510) of the + # vehicle. + # @!attribute [rw] model + # @return [::String] + # The [Model](https://support.google.com/google-ads/answer/14154511) of the + # vehicle, such as `LX`, `EX`, and others. + # @!attribute [rw] trim + # @return [::String] + # The [Trim](https://support.google.com/google-ads/answer/14154176) of the + # vehicle model, such as `S`, `SV`, `SL` and others. + # @!attribute [rw] body_style + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::VehicleBodyStyle] + # The [body style](https://support.google.com/google-ads/answer/14157085) of + # the vehicle. + # @!attribute [rw] year + # @return [::Integer] + # The [Year](https://support.google.com/google-ads/answer/14152816) of the + # vehicle model. + # @!attribute [rw] mileage + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::Mileage] + # The number of miles/kms on the vehicle. See the + # [Mileage](https://support.google.com/google-ads/answer/14156166) for more + # information. + # @!attribute [rw] electric_range + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::Mileage] + # The [electric range](https://support.google.com/google-ads/answer/15162232) + # of the vehicle in miles/kms. + # @!attribute [rw] fuel_consumption + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::FuelConsumption] + # The [fuel + # consumption](https://support.google.com/google-ads/answer/14543580) of the + # vehicle. + # @!attribute [rw] fuel_consumption_discharged_battery + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::FuelConsumption] + # The fuel consumption of the vehicle when the hybrid battery is discharged. + # See the [Help Center + # article](https://support.google.com/google-ads/answer/15162033) for more + # information. + # @!attribute [rw] energy_consumption + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::EnergyConsumption] + # The [energy + # consumption](https://support.google.com/google-ads/answer/14546149) of the + # vehicle. + # @!attribute [rw] co2_emissions + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::Co2Emissions] + # The [co2 emission](https://support.google.com/google-ads/answer/14546146) + # of the vehicle. + # @!attribute [rw] date_first_registered + # @return [::String] + # The date the vehicle was first registered. Format: `YYYY-MM`. See the + # [Date first + # registered](https://support.google.com/google-ads/answer/14546138) for more + # information. + # @!attribute [rw] engine + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::EngineType] + # The [engine](https://support.google.com/google-ads/answer/14156068) type of + # the vehicle. + # @!attribute [rw] emissions_standard + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::EmissionsStandard] + # The [emission + # standard](https://support.google.com/google-ads/answer/14869021) of the + # vehicle. + # @!attribute [rw] certified_pre_owned + # @return [::Boolean] + # Whether the vehicle is OEM [certified + # pre-owned](https://support.google.com/google-ads/answer/14156475). + # @!attribute [rw] vehicle_msrp + # @return [::Google::Shopping::Type::Price] + # The MSRP (Manufacturer Suggested Retail Price) for the vehicle in its + # current configuration. See the [Vehicle + # MSRP](https://support.google.com/google-ads/answer/14154171) for more + # information. + # @!attribute [rw] vehicle_all_in_price + # @return [::Google::Shopping::Type::Price] + # The all-in advertised price for a vehicle, which includes costs for the + # following – any accessories attached to the vehicle, environmental levies, + # extra warranty, fuel, freight, pre-delivery inspection (PDI), dealer fees + # for handling licensing, provincial regulatory fees, miscellaneous dealer + # charges for security etching and nitrogen tire fill, and + # factory-to-customer or dealer-to-customer discounts or incentives. See the + # [Vehicle all-in + # price](https://support.google.com/google-ads/answer/14156981) for more + # information. + # @!attribute [rw] vehicle_price_type + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::VehiclePriceType] + # The [price type](https://support.google.com/google-ads/answer/14592783) of + # the vehicle. + # @!attribute [rw] vehicle_mandatory_inspection_included + # @return [::Boolean] + # Whether the vehicle is sold with mandatory inspection and maintenance + # performed before delivery. See the [Vehicle mandatory inspection + # included](https://support.google.com/google-ads/answer/15956630) for more + # information.` + # @!attribute [rw] vehicle_expenses + # @return [::Google::Shopping::Type::Price] + # The miscellaneous expenses like insurance and registration fees of the + # vehicle. See the [Vehicle + # expenses](https://support.google.com/google-ads/answer/15957154) for more + # information. + # @!attribute [rw] warranty + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::Warranty] + # The [warranty](https://support.google.com/google-ads/answer/15957626) of + # the vehicle. + # @!attribute [rw] display_address + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::DisplayAddress] + # The display address of the property. + # @!attribute [rw] latitude + # @return [::Float] + # The latitude of the property. The value must be between -90 (inclusive) and + # 90 (inclusive), up to 6 decimal places. + # @!attribute [rw] longitude + # @return [::Float] + # The longitude of the property. The value must be between -180 (inclusive) + # and 180 (inclusive), up to 6 decimal places. + # @!attribute [rw] neighborhood + # @return [::String] + # The neighborhood (locality) of the property, such as `Wallingford`, + # `Greenwood`, etc. + # @!attribute [rw] unit_area + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::UnitArea] + # The unit area of the property, such as `1000 sqft`. + # @!attribute [rw] number_of_units + # @return [::Integer] + # The number of units available for a specific floor plan of the property. + # The value must be greater than 0. + # @!attribute [rw] property_name + # @return [::String] + # The name of the property. + # @!attribute [rw] number_of_bedrooms + # @return [::Float] + # The number of bedrooms in the property. The value must be greater than or + # equal to 0 and a multiple of 1.0. + # @!attribute [rw] number_of_bathrooms + # @return [::Float] + # The number of bathrooms in the property. The value must be greater than 0 + # and a multiple of 0.5. + # @!attribute [rw] property_type + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::PropertyType] + # The type of property. + # @!attribute [rw] amenity_feature + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductAttributes::AmenityFeature>] + # The amenity features for the property. + # @!attribute [rw] utilities_included + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductAttributes::UtilitiesIncluded>] + # The utilities included for the property. + # @!attribute [rw] pet_policy + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::PetPolicy] + # The pet policy for the property. + # @!attribute [rw] specialty_housing_type + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::SpecialtyHousingType] + # The specialty housing type for the property. + # @!attribute [rw] product_fee + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductAttributes::ProductFee>] + # The product fee for the property. + # @!attribute [rw] short_title + # @return [::String] + # The short title of the item. + # @!attribute [rw] questions_and_answers + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductAttributes::QuestionAndAnswer>] + # Optional. Contains user-, merchant-, and manufacturer-authored [questions + # and answers](https://support.google.com/merchants/answer/17085211) about + # the product. Max 30 question and answer pairs. Max 10000 characters total. + # Each question can have max 1000 characters. Each answer can have max 1000 + # characters. + # @!attribute [rw] popularity_rank + # @return [::Float] + # Optional. Indicates the + # [popularity](https://support.google.com/merchants/answer/17085297) of the + # product in a merchant's inventory. Using a scale of 0.0 (lowest) to 100.0 + # (highest). + # @!attribute [rw] item_group_title + # @return [::String] + # Optional. Represents the [title of the product + # group](https://support.google.com/merchants/answer/17085146) to which + # this variant product belongs. This can be used along with the [item group + # id](https://support.google.com/merchants/answer/6324507) attribute. + # It lets you perform better grouping of variant products, and helps + # identifying common product characteristics more efficiently. + # @!attribute [rw] document_links + # @return [::Array<::String>] + # Optional. Contains a list of PDF [document + # URLs](https://support.google.com/merchants/answer/17084656) for the + # product. Examples are training manuals, user guides, assembly instructions, + # package inserts, etc. Must start with "http://" or "https://"), ASCII + # characters only, and RFC 3986 compliant. + # @!attribute [rw] variant_options + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductAttributes::VariantOption>] + # Optional. Contains the [list of all variant-identifying + # options](https://support.google.com/merchants/answer/17085214) of this + # product. + # @!attribute [rw] related_products + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductAttributes::RelatedProduct>] + # Optional. Specifies how other [products are + # related](https://support.google.com/merchants/answer/17085213) to this + # product. + class ProductAttributes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The business days during which orders are on their path to fulfillment. + # If not provided, Monday to Friday business days will be assumed. + # @!attribute [rw] country + # @return [::String] + # The [CLDR territory + # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # of the country to which an item will ship. + # @!attribute [rw] business_days + # @return [::String] + # Effective days of the week considered for the delivery time calculation. + # May not be empty. The more business days included the faster the + # delivery. Can be set through individual days (e.g. `MTWRF`), or day + # ranges (e.g. `Mon-Fri`). For more information about accepted formats, + # see [Shipping handling business + # days](https://support.google.com/merchants/answer/16072859). + class ShippingBusinessDaysConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Carrier-based shipping configuration. Allows for setting shipping speed or + # shipping cost based on a carrier's provided info. + # @!attribute [rw] country + # @return [::String] + # The [CLDR territory + # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # of the country to which an item will ship. + # @!attribute [rw] region + # @return [::String] + # The geographic region to which a shipping rate applies. + # See [region](https://support.google.com/merchants/answer/6324484) for + # more information. + # @!attribute [rw] postal_code + # @return [::String] + # The postal code range that the shipping rate applies to, represented by + # a postal code (eg. `94043`), a postal code prefix followed by a * + # wildcard (eg. `94*`), a range between two postal codes (eg. + # `94043-98033`) or two postal code prefixes of equal length (eg. + # `94*-98*`). + # @!attribute [rw] origin_postal_code + # @return [::String] + # The source location postal code from which this offer ships. Represented + # only by a full-length postal code. + # @!attribute [rw] flat_price + # @return [::Google::Shopping::Type::Price] + # Fixed shipping price, represented as a number with currency. Cannot be + # set together with + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#carrier_price carrierPrice} + # or its adjustments + # ({::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#carrier_price_flat_adjustment carrierPriceFlatAdjustment}, + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#carrier_price_percentage_adjustment carrierPricePercentageAdjustment}). + # @!attribute [rw] carrier_price + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierPriceOption] + # Selected carrier to calculate the shipping price from. Select a carrier + # from the [available carriers + # list](https://support.google.com/merchants/answer/15449142#Supported), + # for example `AUSTRALIA_POST_REGULAR`. Price will be calculated by this + # selected carrier, the location expressed in + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#origin_postal_code originPostalCode}, + # along with the user location to determine the accurate shipping price. + # Carrier is represented by a carrier service name or a carrier service ID. + # Cannot be set together with + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#flat_price flatPrice}. + # @!attribute [rw] carrier_price_flat_adjustment + # @return [::Google::Shopping::Type::Price] + # A flat adjustment on the carrier price. Can be either positive or + # negative. Cannot be zero. Requires `carrier_price` to be present. Cannot + # be set together with + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#flat_price flatPrice} + # and + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#carrier_price_percentage_adjustment carrierPricePercentageAdjustment}. + # @!attribute [rw] carrier_price_percentage_adjustment + # @return [::Float] + # A percentual adjustment on the carrier price. Can be either positive or + # negative. Cannot be zero. Requires `carrier_price` to be present. Cannot + # be set together with + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#flat_price flatPrice} + # and + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#carrier_price_flat_adjustment carrierPriceFlatAdjustment}. + # @!attribute [rw] min_handling_time + # @return [::Integer] + # Minimum handling time (inclusive) between when the order is received and + # shipped in business days. 0 means that the order is shipped on the same + # day as it is received if it happens before the cut-off time. + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#min_handling_time minHandlingTime} + # can only be set if + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#max_handling_time maxHandlingTime} + # is also set. + # @!attribute [rw] max_handling_time + # @return [::Integer] + # Maximum handling time (inclusive) between when the order is received and + # shipped in business days. 0 means that the order is shipped on the same + # day as it is received if it happens before the cut-off time. Both + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#max_handling_time maxHandlingTime} + # and + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#fixed_max_transit_time fixedMaxTransitTime} + # or + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#carrier_transit_time carrierTransitTime} + # are required if providing shipping speeds. + # @!attribute [rw] fixed_min_transit_time + # @return [::Integer] + # Minimum transit time (inclusive) between when the order has shipped and + # when it is delivered in business days. 0 means that the order is + # delivered on the same day as it ships. + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#fixed_min_transit_time fixedMinTransitTime} + # can only be set if + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#fixed_max_transit_time fixedMaxTransitTime} + # is set. Cannot be set if + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#carrier_transit_time carrierTransitTime} + # is present. + # @!attribute [rw] fixed_max_transit_time + # @return [::Integer] + # Maximum transit time (inclusive) between when the order has shipped and + # when it is delivered in business days. 0 means that the order is + # delivered on the same day as it ships. Needs to be provided together with + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#max_handling_time maxHandlingTime}. + # Cannot be set if + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#carrier_transit_time carrierTransitTime} + # is present. + # @!attribute [rw] carrier_transit_time + # @return [::Google::Shopping::Merchant::Products::V1::CarrierTransitTimeOption] + # Selected carrier to calculate the shipping speed from. Select a carrier + # from the [available carriers + # list](https://support.google.com/merchants/answer/15449142#Supported), + # for example `AUSTRALIA_POST_REGULAR`. Speed will be calculated by this + # selected carrier, the location expressed in + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#origin_postal_code originPostalCode}, + # along with the user location to determine the accurate delivery speed. + # Carrier is represented by a carrier service name or a carrier service ID. + # Cannot be set together with + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#fixed_max_transit_time fixedMaxTransitTime} + # or + # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#fixed_min_transit_time fixedMinTransitTime}. + class CarrierShipping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The mileage of the vehicle. + # @!attribute [rw] value + # @return [::Integer] + # The distance value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::Mileage::Unit] + # The unit of the mileage. + class Mileage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The unit of the mileage. + module Unit + # Unspecified unit. + UNIT_UNSPECIFIED = 0 + + # Miles. + MILES = 1 + + # Kilometers. + KM = 2 + end + end + + # The fuel consumption of the vehicle. + # @!attribute [rw] value + # @return [::Float] + # The fuel consumption value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::FuelConsumption::Unit] + # The unit of the fuel consumption. + class FuelConsumption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The unit of the fuel consumption. + module Unit + # Unspecified unit. + UNIT_UNSPECIFIED = 0 + + # Liter per 100 kilometers. + LPER100KM = 1 + + # Kilograms per 100 kilometers. + KGPER100KM = 2 + end + end + + # The energy consumption of the vehicle. + # @!attribute [rw] value + # @return [::Float] + # The energy consumption value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::EnergyConsumption::Unit] + # The unit of the energy consumption. + class EnergyConsumption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The unit of the energy consumption. + module Unit + # Unspecified unit. + UNIT_UNSPECIFIED = 0 + + # Kilowatt hours per 100 kilometers. + KWHPER100KM = 1 + end + end + + # The co2 emission of the vehicle. + # @!attribute [rw] value + # @return [::Integer] + # The co2 emission value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::Co2Emissions::Unit] + # The unit of the co2 emission. + class Co2Emissions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The unit of the co2 emission. + module Unit + # Unspecified unit. + UNIT_UNSPECIFIED = 0 + + # Grams per kilometer. + GPERKM = 1 + end + end + + # The warranty of the vehicle. + # @!attribute [rw] duration + # @return [::Integer] + # The warranty duration in months. + # @!attribute [rw] mileage + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::Mileage] + # The warranty mileage. + class Warranty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The product fee attribute containing type and amount. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::ProductFee::FeeType] + # The type of product fee. + # @!attribute [rw] amount + # @return [::Google::Shopping::Type::Price] + # The amount of product fee. + class ProductFee + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of product fee. + module FeeType + # Unspecified fee type. + FEE_TYPE_UNSPECIFIED = 0 + + # Admin fee. + ADMIN_FEE = 1 + + # Application fee. + APPLICATION_FEE = 2 + + # Security deposit. + SECURITY_DEPOSIT = 3 + end + end + + # The display address of the property. + # @!attribute [rw] street_number + # @return [::String] + # The street number. + # @!attribute [rw] street_name + # @return [::String] + # The street name. + # @!attribute [rw] city + # @return [::String] + # The city such as Seattle, New York, etc. + # @!attribute [rw] region + # @return [::String] + # The region(state), such as WA, OH, etc. + # @!attribute [rw] postal_code + # @return [::String] + # The postal code, such as 94043. + class DisplayAddress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The unit area of the property. + # @!attribute [rw] value + # @return [::Float] + # The area value. + # @!attribute [rw] unit + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::UnitArea::Unit] + # The unit of area. + class UnitArea + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The unit of area. + module Unit + # Unspecified unit. + UNIT_UNSPECIFIED = 0 + + # Square meters. + SQM = 1 + + # Square feet. + SQFT = 2 + end + end + + # The pet policy of the property. + # @!attribute [rw] pets_allowed + # @return [::Boolean] + # Whether pets are allowed. + # @!attribute [rw] pet_types + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductAttributes::PetPolicy::PetType>] + # The pet types allowed. + class PetPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The pet types. + module PetType + # Unspecified pet type. + PET_TYPE_UNSPECIFIED = 0 + + # Cats. + CATS = 1 + + # Large dogs. + LARGE_DOGS = 2 + + # Small dogs. + SMALL_DOGS = 3 + end + end + + # The question and answer for the product. + # @!attribute [rw] question + # @return [::String] + # Required. The question text. + # @!attribute [rw] answer + # @return [::String] + # Required. The answer text. + class QuestionAndAnswer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Additional product variants for the product. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the variant. For example, "Color", "Memory", + # "Size", "Length" + # @!attribute [rw] value + # @return [::String] + # Required. The value of the variant. For example, "Red", "128GB", "XL", + # "100cm" + class VariantOption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies how other products are related to this product. + # @!attribute [rw] relationship_type + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::RelatedProduct::RelationshipType] + # Required. The type of the relationship between this product and the + # related product. + # @!attribute [rw] id_type + # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::RelatedProduct::IdType] + # Required. The type of the identifier of the related product. + # For example, [GTIN](https://support.google.com/merchants/answer/6219078) + # or [product ID](https://support.google.com/merchants/answer/6324405). + # @!attribute [rw] id + # @return [::String] + # Required. The identifier of the related product. + class RelatedProduct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The various types of the relationships between this product and the + # related product. + module RelationshipType + # The relationship type is unspecified. + RELATIONSHIP_TYPE_UNSPECIFIED = 0 + + # Part of a set of products that are often purchased together. + PART_OF_SET = 1 + + # Part that is necessary for the product to function, for example a + # battery for a battery-operated lamp. + REQUIRED_PART = 2 + + # A product that this product is often purchased together with, for + # example a phone case with a phone. + OFTEN_BOUGHT_WITH = 3 + + # Product that this product can be substituted for. For example a printer + # comparable in function to another printer. + SUBSTITUTE = 4 + + # An identical product sold under a different brand, for example a + # cheaper house brand. + DIFFERENT_BRAND = 5 + + # An accessory to this product, for example a side table that matches the + # style of a couch. + ACCESSORY = 6 + end + + # The type of the identifier of the related product. + module IdType + # The identifier type is unspecified. + ID_TYPE_UNSPECIFIED = 0 + + # The identifier is a GTIN. + GTIN = 1 + + # The identifier is a product ID in the feed. + ID = 2 + end + end + + # Possible carrier where price is coming from. + module CarrierPriceOption + # Carrier price option is unspecified. + CARRIER_PRICE_OPTION_UNSPECIFIED = 0 + + # Australia Post Regular shipping service. + AUSTRALIA_POST_REGULAR = 1 + + # Australia Post Express shipping service. + AUSTRALIA_POST_EXPRESS = 2 + + # Australia Post Regular Small shipping service. + AUSTRALIA_POST_REGULAR_S = 3 + + # Australia Post Regular Medium shipping service. + AUSTRALIA_POST_REGULAR_M = 4 + + # Australia Post Regular Large shipping service. + AUSTRALIA_POST_REGULAR_L = 5 + + # Australia Post Regular XL shipping service. + AUSTRALIA_POST_REGULAR_XL = 6 + + # Australia Post Express Small shipping service. + AUSTRALIA_POST_EXPRESS_S = 7 + + # Australia Post Express Medium shipping service. + AUSTRALIA_POST_EXPRESS_M = 8 + + # Australia Post Express Large shipping service. + AUSTRALIA_POST_EXPRESS_L = 9 + + # Australia Post Express XL shipping service. + AUSTRALIA_POST_EXPRESS_XL = 10 + + # TNT Road Express shipping service. + TNT_ROAD_EXPRESS = 11 + + # TNT Overnight Express shipping service. + TNT_OVERNIGHT_EXPRESS = 12 + + # Toll Road Delivery shipping service. + TOLL_ROAD_DELIVERY = 13 + + # Toll Overnight Priority shipping service. + TOLL_OVERNIGHT_PRIORITY = 14 + + # DHL Paket shipping service. + DHL_PAKET = 15 + + # DHL Packchen shipping service. + DHL_PACKCHEN = 16 + + # DPD Express 12 shipping service. + DPD_EXPRESS_12 = 17 + + # DPD Express shipping service. + DPD_EXPRESS = 18 + + # DPD Classic Parcel shipping service. + DPD_CLASSIC_PARCEL = 19 + + # Hermes Packchen shipping service. + HERMES_PACKCHEN = 20 + + # Hermes Paketklasse S shipping service. + HERMES_PAKETKLASSE_S = 21 + + # Hermes Paketklasse M shipping service. + HERMES_PAKETKLASSE_M = 22 + + # Hermes Paketklasse L shipping service. + HERMES_PAKETKLASSE_L = 23 + + # UPS Express shipping service. + UPS_EXPRESS = 24 + + # UPS Express Saver shipping service. + UPS_EXPRESS_SAVER = 25 + + # UPS Express Standard shipping service. + UPS_EXPRESS_STANDARD = 26 + + # DHL Express shipping service. + DHL_EXPRESS = 27 + + # DHL Express 12 shipping service. + DHL_EXPRESS_12 = 28 + + # DPD Next Day shipping service. + DPD_NEXT_DAY = 29 + + # DPD Standard Next Day shipping service. + DPD_STANDARD_NEXT_DAY = 30 + + # DPD Standard Two Day shipping service. + DPD_STANDARD_TWO_DAY = 31 + + # RMG 1st Class Small shipping service. + RMG_1ST_CLASS_SMALL = 32 + + # RMG 1st Class Medium shipping service. + RMG_1ST_CLASS_MEDIUM = 33 + + # RMG 2nd Class Small shipping service. + RMG_2ND_CLASS_SMALL = 34 + + # RMG 2nd Class Medium shipping service. + RMG_2ND_CLASS_MEDIUM = 35 + + # TNT Express shipping service. + TNT_EXPRESS = 36 + + # TNT Express 10 shipping service. + TNT_EXPRESS_10 = 37 + + # TNT Express 12 shipping service. + TNT_EXPRESS_12 = 38 + + # Yodel B2C 48HR shipping service. + YODEL_B2C_48HR = 39 + + # Yodel B2C 72HR shipping service. + YODEL_B2C_72HR = 40 + + # Yodel B2C Packet shipping service. + YODEL_B2C_PACKET = 41 + + # FedEx Ground shipping service. + FEDEX_GROUND = 42 + + # FedEx Home Delivery shipping service. + FEDEX_HOME_DELIVERY = 43 + + # FedEx Express Saver shipping service. + FEDEX_EXPRESS_SAVER = 44 + + # FedEx First Overnight shipping service. + FEDEX_FIRST_OVERNIGHT = 45 + + # FedEx Priority Overnight shipping service. + FEDEX_PRIORITY_OVERNIGHT = 46 + + # FedEx Standard Overnight shipping service. + FEDEX_STANDARD_OVERNIGHT = 47 + + # FedEx 2Day shipping service. + FEDEX_2DAY = 48 + + # UPS Standard shipping service. + UPS_STANDARD = 49 + + # UPS 2nd Day Air shipping service. + UPS_2ND_DAY_AIR = 50 + + # UPS 2nd Day AM shipping service. + UPS_2ND_DAY_AM = 51 + + # UPS 3 Day Select shipping service. + UPS_3_DAY_SELECT = 52 + + # UPS Ground shipping service. + UPS_GROUND = 53 + + # UPS Next Day Air shipping service. + UPS_NEXT_DAY_AIR = 54 + + # UPS Next Day Air Early AM shipping service. + UPS_NEXT_DAY_AIR_EARLY_AM = 55 + + # UPS Next Day Air Saver shipping service. + UPS_NEXT_DAY_AIR_SAVER = 56 + + # USPS Priority Mail Express shipping service. + USPS_PRIORITY_MAIL_EXPRESS = 57 + + # USPS Media Mail shipping service. + USPS_MEDIA_MAIL = 58 + + # USPS Ground Advantage Retail shipping service. + USPS_GROUND_ADVANTAGE_RETAIL = 59 + + # USPS Priority Mail shipping service. + USPS_PRIORITY_MAIL = 60 + + # USPS Ground Advantage Commercial shipping service. + USPS_GROUND_ADVANTAGE_COMMERCIAL = 61 + end + + # The vehicle body style. See the [Body + # style](https://support.google.com/google-ads/answer/14157085) for more + # information. + module VehicleBodyStyle + # Unspecified vehicle body style. + VEHICLE_BODY_STYLE_UNSPECIFIED = 0 + + # ATV Sport. + ATV_SPORT = 1 + + # ATV Touring. + ATV_TOURING = 2 + + # ATV Utility. + ATV_UTILITY = 3 + + # ATV Youth. + ATV_YOUTH = 4 + + # City car. + CITY_CAR = 5 + + # Class A motorhome. + CLASS_A_MOTORHOME = 6 + + # Class B motorhome. + CLASS_B_MOTORHOME = 7 + + # Class C motorhome. + CLASS_C_MOTORHOME = 8 + + # Compact SUV. + COMPACT_SUV = 9 + + # Convertible. + CONVERTIBLE = 10 + + # Coupe. + COUPE = 11 + + # Crossover. + CROSSOVER = 12 + + # Fifth wheel. + FIFTH_WHEEL = 13 + + # Full size van. + FULL_SIZE_VAN = 14 + + # Hatchback. + HATCHBACK = 15 + + # Limousine. + LIMOUSINE = 16 + + # Minivan. + MINIVAN = 17 + + # Notchback. + NOTCHBACK = 18 + + # Pop up camper. + POP_UP_CAMPER = 19 + + # Sedan. + SEDAN = 20 + + # Side by side. + SIDE_BY_SIDE = 21 + + # Station wagon. + STATION_WAGON = 22 + + # SUV. + SUV = 23 + + # Travel trailer. + TRAVEL_TRAILER = 24 + + # Truck. + TRUCK = 25 + + # Truck camper. + TRUCK_CAMPER = 26 + + # Ute. + UTE = 27 + + # UTV Recreational utility. + UTV_RECREATIONAL_UTILITY = 28 + + # UTV Sport. + UTV_SPORT = 29 + + # UTV Utility. + UTV_UTILITY = 30 + + # UTV Youth. + UTV_YOUTH = 31 + end + + # The engine type of the vehicle. + module EngineType + # Unspecified engine type. + ENGINE_TYPE_UNSPECIFIED = 0 + + # Gasoline. + GASOLINE = 1 + + # Diesel. + DIESEL = 2 + + # Electric. + ELECTRIC = 3 + + # Hybrid. + HYBRID = 4 + + # Plug-in hybrid. + PLUG_IN_HYBRID = 5 + + # Natural gas. + NATURAL_GAS = 6 + + # LPG. + LPG = 7 + + # Methane. + METHANE = 8 + + # Other. + OTHER = 9 + end + + # The emission standard of the vehicle. + module EmissionsStandard + # Unspecified emission standard. + EMISSIONS_STANDARD_UNSPECIFIED = 0 + + # Zero emissions. + ZERO_EMISSIONS = 1 + + # Euro 1. + EURO1 = 2 + + # Euro 2. + EURO2 = 3 + + # Euro 3. + EURO3 = 4 + + # Euro 4. + EURO4 = 5 + + # Euro 5. + EURO5 = 6 + + # Euro 5b. + EURO5B = 7 + + # Euro 6. + EURO6 = 8 + + # Euro 6c. + EURO6C = 9 + + # Euro 6d. + EURO6D = 10 + + # Euro 6d-TEMP. + EURO6D_TEMP = 11 + + # Euro 6e. + EURO6E = 12 + end + + # The vehicle price type. + module VehiclePriceType + # Unspecified vehicle price type. + VEHICLE_PRICE_TYPE_UNSPECIFIED = 0 + + # All in price. + ALL_IN_PRICE = 1 + + # Drive away price. + DRIVE_AWAY_PRICE = 2 + + # Estimated drive away price. + ESTIMATED_DRIVE_AWAY_PRICE = 3 + + # Excluding government charges price. + EXCLUDING_GOVERNMENT_CHARGES_PRICE = 4 + + # Vehicle base price. + VEHICLE_BASE_PRICE = 5 + end + + # The property type. + module PropertyType + # Unspecified property type. + PROPERTY_TYPE_UNSPECIFIED = 0 + + # Apartment. + APARTMENT = 1 + + # Condo. + CONDO = 2 + + # Loft. + LOFT = 3 + + # Multi-family home. + MULTI_FAMILY_HOME = 4 + + # Penthouse. + PENTHOUSE = 5 + + # Room. + ROOM = 6 + + # Single-family home. + SINGLE_FAMILY_HOME = 7 + + # Studio. + STUDIO = 8 + + # Townhouse. + TOWNHOUSE = 9 + end + + # The amenity features for the property. + module AmenityFeature + # Unspecified amenity feature. + AMENITY_FEATURE_UNSPECIFIED = 0 + + # Balcony. + BALCONY = 1 + + # Basement. + BASEMENT = 2 + + # Basketball court. + BASKETBALL_COURT = 3 + + # Bike storage. + BIKE_STORAGE = 4 + + # Central air conditioning. + CENTRAL_AC = 5 + + # Dishwasher. + DISHWASHER = 6 + + # Dog park. + DOG_PARK = 7 + + # Elevator. + ELEVATOR = 8 + + # EV charging. + EV_CHARGING = 9 + + # Fenced lot. + FENCED_LOT = 10 + + # Fireplace. + FIREPLACE = 11 + + # Fitness center. + FITNESS_CENTER = 12 + + # Forced air heating. + FORCED_AIR_HEATING = 13 + + # Fully furnished. + FULLY_FURNISHED = 14 + + # Garage. + GARAGE = 15 + + # Gated community. + GATED_COMMUNITY = 16 + + # Hardwood floors. + HARDWOOD_FLOORS = 17 + + # High speed internet. + HIGH_SPEED_INTERNET = 18 + + # Intercom. + INTERCOM = 19 + + # In-unit washer and dryer. + IN_UNIT_WASHER_DRYER = 20 + + # Kitchen. + KITCHEN = 21 + + # Large closets. + LARGE_CLOSETS = 22 + + # Multisport court. + MULTISPORT_COURT = 23 + + # Onsite laundry. + ONSITE_LAUNDRY = 24 + + # Outdoor lounge. + OUTDOOR_LOUNGE = 25 + + # Parking. + PARKING = 26 + + # Patio. + PATIO = 27 + + # Pickleball court. + PICKLEBALL_COURT = 28 + + # Pool. + POOL = 29 + + # Refrigerator. + REFRIGERATOR = 30 + + # Soccer field. + SOCCER_FIELD = 31 + + # Tennis court. + TENNIS_COURT = 32 + + # Walk-in closets. + WALK_IN_CLOSETS = 33 + + # Wheelchair accessibility. + WHEELCHAIR_ACCESS = 34 + end + + # The utilities included for the property. + module UtilitiesIncluded + # Unspecified utilities included. + UTILITIES_INCLUDED_UNSPECIFIED = 0 + + # Electricity. + ELECTRICITY = 1 + + # Gas. + GAS = 2 + + # Internet. + INTERNET = 3 + + # Trash. + TRASH = 4 + + # Water. + WATER = 5 + end + + # The specialty housing type for the property. + module SpecialtyHousingType + # Unspecified specialty housing type. + SPECIALTY_HOUSING_TYPE_UNSPECIFIED = 0 + + # Corporate housing. + CORPORATE = 1 + + # Low income housing. + LOW_INCOME = 2 + + # Military housing. + MILITARY = 3 + + # Senior housing. + SENIOR = 4 + + # Short term housing. + SHORT_TERM = 5 + + # Student housing. + STUDENT = 6 + end + end + + # The ShippingWeight of the product. + # @!attribute [rw] value + # @return [::Float] + # The weight of the product used to calculate the shipping cost of the + # item. + # @!attribute [rw] unit + # @return [::String] + # The unit of value. + class ShippingWeight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The ShippingDimension of the product. + # @!attribute [rw] value + # @return [::Float] + # The dimension of the product used to calculate the shipping cost of the + # item. + # @!attribute [rw] unit + # @return [::String] + # The unit of value. + class ShippingDimension + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The UnitPricingBaseMeasure of the product. + # @!attribute [rw] value + # @return [::Integer] + # The denominator of the unit price. + # @!attribute [rw] unit + # @return [::String] + # The unit of the denominator. + class UnitPricingBaseMeasure + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The UnitPricingMeasure of the product. + # @!attribute [rw] value + # @return [::Float] + # The measure of an item. + # @!attribute [rw] unit + # @return [::String] + # The unit of the measure. + class UnitPricingMeasure + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The SubscriptionCost of the product. + # @!attribute [rw] period + # @return [::Google::Shopping::Merchant::Products::V1::SubscriptionPeriod] + # The type of subscription period. + # Supported values are: + # * "`month`" + # * "`year`" + # * "`week`" + # @!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 SubscriptionCost + 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. + # @!attribute [rw] credit_type + # @return [::Google::Shopping::Merchant::Products::V1::CreditType] + # Type of installment payments. + # @!attribute [rw] annual_percentage_rate + # @return [::Float] + # Optional. Annual percentage rate for `credit_type` finance + # @!attribute [rw] total_amount + # @return [::Google::Shopping::Type::Price] + # Optional. Total amount the buyer has to pay, including interest. + class ProductInstallment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents loyalty points. + # @!attribute [rw] name + # @return [::String] + # Name of loyalty points program. It is recommended to limit the name to + # 12 full-width characters or 24 Roman characters. + # @!attribute [rw] points_value + # @return [::Integer] + # The retailer's loyalty points in absolute value. + # @!attribute [rw] ratio + # @return [::Float] + # The ratio of a point when converted to currency. Google assumes currency + # based on Merchant Center settings. If ratio is left out, it defaults to + # 1.0. + class LoyaltyPoints + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents loyalty program. + # @!attribute [rw] program_label + # @return [::String] + # The label of the loyalty program. This is an internal label that uniquely + # identifies the relationship between a business entity and a loyalty + # program entity. The label must be provided so that the system can associate + # the assets below (for example, price and points) with a business. The + # corresponding program must be linked to the Merchant Center account. + # @!attribute [rw] tier_label + # @return [::String] + # The label of the tier within the loyalty program. + # Must match one of the labels within the program. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # The price for members of the given tier, that is, the instant discount + # price. Must be smaller or equal to the regular price. + # @!attribute [rw] cashback_for_future_use + # @return [::Google::Shopping::Type::Price] + # The cashback that can be used for future purchases. + # @!attribute [rw] loyalty_points + # @return [::Integer] + # The amount of loyalty points earned on a purchase. + # @!attribute [rw] member_price_effective_date + # @return [::Google::Type::Interval] + # A date range during which the item is eligible for member price. If not + # specified, the member price is always applicable. The date range is + # represented by a pair of ISO 8601 dates separated by a space, + # comma, or slash. + # @!attribute [rw] shipping_label + # @return [::String] + # The label of the shipping benefit. If the field has value, this offer has + # loyalty shipping benefit. If the field value isn't provided, the item is + # not eligible for loyalty shipping for the given loyalty tier. + class LoyaltyProgram + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Shipping of the product. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Fixed shipping price, represented as a number. + # @!attribute [rw] country + # @return [::String] + # The [CLDR territory + # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # of the country to which an item will ship. + # @!attribute [rw] region + # @return [::String] + # The geographic region to which a shipping rate applies. + # See [region](https://support.google.com/merchants/answer/6324484) for more + # information. + # @!attribute [rw] service + # @return [::String] + # A free-form description of the service class or delivery speed. + # @!attribute [rw] location_id + # @return [::Integer] + # The numeric ID of a location that the shipping rate applies to as + # defined in the [AdWords + # API](https://developers.google.com/adwords/api/docs/appendix/geotargeting). + # @!attribute [rw] location_group_name + # @return [::String] + # The location where the shipping is applicable, represented by a + # location group name. + # @!attribute [rw] postal_code + # @return [::String] + # The postal code range that the shipping rate applies to, represented by + # a postal code, a postal code prefix followed by a * wildcard, a range + # between two postal codes or two postal code prefixes of equal length. + # @!attribute [rw] min_handling_time + # @return [::Integer] + # Minimum handling time (inclusive) between when the order is received and + # shipped in business days. 0 means that the order is shipped on the same + # day as it is received if it happens before the cut-off time. + # {::Google::Shopping::Merchant::Products::V1::Shipping#min_handling_time minHandlingTime} + # can only be present together with + # {::Google::Shopping::Merchant::Products::V1::Shipping#max_handling_time maxHandlingTime}; + # but it is not required if + # {::Google::Shopping::Merchant::Products::V1::Shipping#max_handling_time maxHandlingTime} + # is present. + # @!attribute [rw] max_handling_time + # @return [::Integer] + # Maximum handling time (inclusive) between when the order is received and + # shipped in business days. 0 means that the order is shipped on the same + # day as it is received if it happens before the cut-off time. Both + # {::Google::Shopping::Merchant::Products::V1::Shipping#max_handling_time maxHandlingTime} + # and + # {::Google::Shopping::Merchant::Products::V1::Shipping#max_transit_time maxTransitTime} + # are required if providing shipping speeds. + # {::Google::Shopping::Merchant::Products::V1::Shipping#min_handling_time minHandlingTime} + # is optional if + # {::Google::Shopping::Merchant::Products::V1::Shipping#max_handling_time maxHandlingTime} + # is present. + # @!attribute [rw] min_transit_time + # @return [::Integer] + # Minimum transit time (inclusive) between when the order has shipped and + # when it is delivered in business days. 0 means that the order is + # delivered on the same day as it ships. + # {::Google::Shopping::Merchant::Products::V1::Shipping#min_transit_time minTransitTime} + # can only be present together with + # {::Google::Shopping::Merchant::Products::V1::Shipping#max_transit_time maxTransitTime}; + # but it is not required if + # {::Google::Shopping::Merchant::Products::V1::Shipping#max_transit_time maxTransitTime} + # is present. + # @!attribute [rw] max_transit_time + # @return [::Integer] + # Maximum transit time (inclusive) between when the order has shipped and + # when it is delivered in business days. 0 means that the order is + # delivered on the same day as it ships. Both + # {::Google::Shopping::Merchant::Products::V1::Shipping#max_handling_time maxHandlingTime} + # and + # {::Google::Shopping::Merchant::Products::V1::Shipping#max_transit_time maxTransitTime} + # are required if providing shipping speeds. + # {::Google::Shopping::Merchant::Products::V1::Shipping#min_transit_time minTransitTime} + # is optional if + # {::Google::Shopping::Merchant::Products::V1::Shipping#max_transit_time maxTransitTime} + # is present. + # @!attribute [rw] handling_cutoff_time + # @return [::String] + # The handling cutoff time until which an order has to be placed to be + # processed in the same day. This is a string in format of HHMM (e.g. + # `1530`) for 3:30 PM. If not configured, the cutoff time will be defaulted + # to 8AM PST and `handling_cutoff_timezone` will be ignored. + # @!attribute [rw] handling_cutoff_timezone + # @return [::String] + # [Timezone + # identifier](https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids) + # For example `Europe/Zurich`. This field only applies if + # `handling_cutoff_time` is set. If `handling_cutoff_time` is set but this + # field is not set, the shipping destination timezone will be used. If both + # fields are not set, the handling cutoff time will default to 8AM PST. + # @!attribute [rw] loyalty_program_label + # @return [::String] + # Optional. The label of the [loyalty + # program](https://support.google.com/merchants/answer/6324484). + # Must match one of the program labels set in + # {::Google::Shopping::Merchant::Products::V1::LoyaltyProgram loyalty_programs}. + # When set (in combination with + # [loyalty_tier_label](https://support.google.com/merchants/answer/6324484)), + # this shipping option is only applicable to loyalty program members of the + # specified tier. + # @!attribute [rw] loyalty_tier_label + # @return [::String] + # Optional. The label of the [loyalty + # tier](https://support.google.com/merchants/answer/6324484) within the + # loyalty program. Must match one of the tiers set in the + # {::Google::Shopping::Merchant::Products::V1::LoyaltyProgram loyalty_programs}. + # When set (in combination with + # [loyalty_program_label](https://support.google.com/merchants/answer/6324484)), + # this shipping option is only applicable to loyalty program members of the + # specified tier. + class Shipping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Conditions to be met for a product to have free shipping. + # @!attribute [rw] country + # @return [::String] + # The [CLDR territory + # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # of the country to which an item will ship. + # @!attribute [rw] price_threshold + # @return [::Google::Shopping::Type::Price] + # The minimum product price for the shipping cost to become free. Represented + # as a number. + class FreeShippingThreshold + 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 + + # Product + # [certification](https://support.google.com/merchants/answer/13528839), + # initially introduced for EU energy efficiency labeling compliance using the + # EU EPREL database. + # @!attribute [rw] certification_authority + # @return [::Google::Shopping::Merchant::Products::V1::CertificationAuthority] + # The certification authority. + # @!attribute [rw] certification_name + # @return [::Google::Shopping::Merchant::Products::V1::CertificationName] + # The name of the certification. + # @!attribute [rw] certification_code + # @return [::String] + # The certification code. + # Maximum length is 2000 characters. + # @!attribute [rw] certification_value + # @return [::String] + # The certification value (also known as class, level or grade), for + # example "A+", "C", "gold". Maximum length is 2000 characters. + class ProductCertification + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Structured title, for algorithmically (AI)-generated titles. + # @!attribute [rw] digital_source_type + # @return [::Google::Shopping::Merchant::Products::V1::DigitalSourceType] + # The digital source type. + # Following [IPTC](https://cv.iptc.org/newscodes/digitalsourcetype). + # @!attribute [rw] content + # @return [::String] + # The title text + # Maximum length is 150 characters + class StructuredTitle + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Structured description, for algorithmically (AI)-generated descriptions. + # @!attribute [rw] digital_source_type + # @return [::Google::Shopping::Merchant::Products::V1::DigitalSourceType] + # The digital source type. + # Following [IPTC](https://cv.iptc.org/newscodes/digitalsourcetype). + # @!attribute [rw] content + # @return [::String] + # The description text + # Maximum length is 5000 characters + class StructuredDescription + 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 a product, data validation issues, that is, information about + # a product computed asynchronously. + # @!attribute [rw] destination_statuses + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductStatus::DestinationStatus>] + # The intended destinations for the product. + # @!attribute [rw] item_level_issues + # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductStatus::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 ProductStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The destination status of the product status. + # + # Equivalent to + # [`StatusPerReportingContext`][google.shopping.merchant.reports.v1.ProductView.StatusPerReportingContext] + # in Reports API. + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # The name of the reporting context. + # @!attribute [rw] approved_countries + # @return [::Array<::String>] + # List of country codes (ISO 3166-1 alpha-2) where the offer is approved. + # @!attribute [rw] pending_countries + # @return [::Array<::String>] + # List of country codes (ISO 3166-1 alpha-2) where the offer is pending + # approval. + # @!attribute [rw] disapproved_countries + # @return [::Array<::String>] + # List of country codes (ISO 3166-1 alpha-2) where the offer 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] severity + # @return [::Google::Shopping::Merchant::Products::V1::ProductStatus::ItemLevelIssue::Severity] + # How this issue affects serving of the offer. + # @!attribute [rw] resolution + # @return [::String] + # Whether the issue can be resolved by the business. + # @!attribute [rw] attribute + # @return [::String] + # The attribute's name, if the issue is caused by a single attribute. + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # The reporting context 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 + # offer. + 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 + end + end + + # Product property for the Cloud Retail API. + # For example, properties for a TV product could be "Screen-Resolution" or + # "Screen-Size". + # @!attribute [rw] property_name + # @return [::String] + # Name of the given property. For example, + # "Screen-Resolution" for a TV product. Maximum string size is 256 + # characters. + # @!attribute [rw] text_value + # @return [::Array<::String>] + # Text value of the given property. For example, + # "8K(UHD)" could be a text value for a TV product. Maximum + # repeatedness of this value is 400. Values are stored in an arbitrary but + # consistent order. Maximum string size is 256 characters. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Boolean value of the given property. For example for a TV product, + # "True" or "False" if the screen is UHD. + # @!attribute [rw] int_value + # @return [::Array<::Integer>] + # Integer values of the given property. For example, 1080 for a TV + # product's Screen Resolution. Maximum repeatedness of this value + # is 400. Values are stored in an arbitrary but consistent order. + # @!attribute [rw] float_value + # @return [::Array<::Float>] + # Float values of the given property. For example for a TV product + # 1.2345. Maximum repeatedness of this value is 400. Values + # are stored in an arbitrary but consistent order. + # @!attribute [rw] min_value + # @return [::Float] + # Minimum float value of the given property. For example for a TV + # product 1.00. + # @!attribute [rw] max_value + # @return [::Float] + # Maximum float value of the given property. For example for a TV + # product 100.00. + # @!attribute [rw] unit_code + # @return [::String] + # Unit of the given property. For example, "Pixels" for a TV product. Maximum + # string size is 256B. + class CloudExportAdditionalProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information regarding sustainability-related incentive programs such as + # rebates or tax relief. + # @!attribute [rw] amount + # @return [::Google::Shopping::Type::Price] + # The fixed amount of the incentive. + # + # Note: The following fields are mutually exclusive: `amount`, `percentage`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] percentage + # @return [::Float] + # The percentage of the sale price that the incentive is applied to. + # + # Note: The following fields are mutually exclusive: `percentage`, `amount`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::Products::V1::ProductSustainabilityIncentive::Type] + # Sustainability incentive program. + class ProductSustainabilityIncentive + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Types of supported sustainability incentive programs. + module Type + # Unspecified or unknown sustainability incentive type. + TYPE_UNSPECIFIED = 0 + + # Program offering tax liability reductions for electric vehicles and, in + # some countries, plug-in hybrids. These reductions can be based on a + # specific amount or a percentage of the sale price. + EV_TAX_CREDIT = 1 + + # A subsidy program, often called an environmental bonus, provides a + # purchase grant for electric vehicles and, in some countries, plug-in + # hybrids. The grant amount may be a fixed sum or a percentage of the sale + # price. + EV_PRICE_DISCOUNT = 2 + end + end + + # Information regarding Automated Discounts. + # @!attribute [rw] prior_price + # @return [::Google::Shopping::Type::Price] + # The price prior to the application of the first price reduction. + # Absent if the information about the prior price of the product is not + # available. + # @!attribute [rw] prior_price_progressive + # @return [::Google::Shopping::Type::Price] + # The price prior to the application of consecutive price reductions. + # Absent if the information about the prior price of the product is not + # available. + # @!attribute [rw] gad_price + # @return [::Google::Shopping::Type::Price] + # The current sale price for products with a price optimized using Google + # Automated Discounts (GAD). Absent if the information about the GAD_price of + # the product is not available. + class AutomatedDiscounts + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The pickup cost of the item. + # @!attribute [rw] flat_rate + # @return [::Google::Shopping::Type::Price] + # Required. The flat rate pickup cost of the item. + # @!attribute [rw] free_threshold + # @return [::Google::Shopping::Type::Price] + # Optional. The price threshold above which pickup is free of charge. + class PickupCost + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for offer or offer-country level shipping handling cutoff time. + # @!attribute [rw] country + # @return [::String] + # The [CLDR territory + # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # of the country to which the handling cutoff time applies. + # @!attribute [rw] cutoff_time + # @return [::String] + # The handling cutoff time until which an order has to be placed to be + # processed in the same day. This is a string in format of HHMM (e.g. `1530`) + # for 3:30 PM. + # If not configured, the cutoff time will be defaulted to 8AM PST. + # @!attribute [rw] cutoff_timezone + # @return [::String] + # [Timezone + # identifier](https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids) + # For example 'Europe/Zurich'. If not set, the shipping destination + # timezone will be used. + # @!attribute [rw] disable_delivery_after_cutoff + # @return [::Boolean] + # This field only applies to same-day delivery. If true, prevents next-day + # delivery from being shown for this offer after the cutoff time. This field + # only applies to same-day delivery offers, for merchants who want to + # explicitly disable it. + class HandlingCutoffTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The minimum order value in the cart before the checkout is permitted. + # @!attribute [rw] country + # @return [::String] + # Required. The [CLDR territory + # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # of the country to which an item will ship. + # @!attribute [rw] service + # @return [::String] + # A free-form description of the service class or delivery speed. + # This should match the service value set for the Shipping attribute. + # See {::Google::Shopping::Merchant::Products::V1::Shipping#service service}. + # @!attribute [rw] surface + # @return [::Google::Shopping::Merchant::Products::V1::ProductMinimumOrderValue::Surface] + # The surface to which the minimum order value applies. + # Defaults to `ONLINE_LOCAL` if not configured. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Required. The minimum cart or basket value before the checkout is + # permitted. + class ProductMinimumOrderValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The surface values to which the minimum order value applies. + module Surface + # Surface is unspecified. + SURFACE_UNSPECIFIED = 0 + + # Surface value to indicate online purchases. + ONLINE = 1 + + # Surface value to indicate local purchases. + LOCAL = 2 + + # Surface value to indicate online and local purchases. + ONLINE_LOCAL = 3 + end + 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 + + # Indicates that the subscription period is week. + WEEK = 3 + end + + # Target [age group](https://support.google.com/merchants/answer/6324463) of + # the item. + module AgeGroup + # Age group is not specified. + AGE_GROUP_UNSPECIFIED = 0 + + # Teens or older. + ADULT = 1 + + # 5-13 years old. + KIDS = 2 + + # 1-5 years old. + TODDLER = 3 + + # 3-12 months old. + INFANT = 4 + + # 0-3 months old. + NEWBORN = 5 + end + + # [Availability](https://support.google.com/merchants/answer/6324448) status + # of the item. + module Availability + # Availability is not specified. + AVAILABILITY_UNSPECIFIED = 0 + + # In stock. + IN_STOCK = 1 + + # Out of stock. + OUT_OF_STOCK = 2 + + # Pre-order. + PREORDER = 3 + + # Limited availability. + LIMITED_AVAILABILITY = 4 + + # Backorder. + BACKORDER = 5 + end + + # [Condition](https://support.google.com/merchants/answer/6324469) or state + # of the item. + module Condition + # Default value. This value is unused. + CONDITION_UNSPECIFIED = 0 + + # Brand new, original, unopened packaging. + NEW = 1 + + # Previously used, original packaging opened or missing. + USED = 2 + + # Professionally restored to working order, comes with a warranty, may or + # may not have the original packaging. + REFURBISHED = 3 + end + + # Target [gender](https://support.google.com/merchants/answer/6324479) of the + # item. + module Gender + # Gender is not specified. + GENDER_UNSPECIFIED = 0 + + # Male. + MALE = 1 + + # Female. + FEMALE = 2 + + # Unisex. + UNISEX = 3 + end + + # Type of installment payments. + module CreditType + # Default value. This value is unused. + CREDIT_TYPE_UNSPECIFIED = 0 + + # Finance. + FINANCE = 1 + + # Lease. + LEASE = 2 + end + + # System in which the size is specified. Recommended for apparel items. + # For more information, see + # [Size system](https://support.google.com/merchants/answer/6324502). + module SizeSystem + # Unspecified size system. + SIZE_SYSTEM_UNSPECIFIED = 0 + + # AU. + AU = 1 + + # BR. + BR = 2 + + # CN. + CN = 3 + + # DE. + DE = 4 + + # EU. + EU = 5 + + # FR. + FR = 6 + + # IT. + IT = 7 + + # JP. + JP = 8 + + # MEX. + MEX = 9 + + # UK. + UK = 10 + + # US. + US = 11 + end + + # 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). + module SizeType + # The size type is not specified. + SIZE_TYPE_UNSPECIFIED = 0 + + # Regular size. + REGULAR = 1 + + # Petite size. + PETITE = 2 + + # Maternity size. + MATERNITY = 3 + + # Big size. + BIG = 4 + + # Tall size. + TALL = 5 + + # Plus size. + PLUS = 6 + end + + # The [energy efficiency + # class](https://support.google.com/merchants/answer/7562785) as defined in EU + # directive 2010/30/EU. + module EnergyEfficiencyClass + # The energy efficiency class is unspecified. + ENERGY_EFFICIENCY_CLASS_UNSPECIFIED = 0 + + # A+++. + APPP = 1 + + # A++. + APP = 2 + + # A+. + AP = 3 + + # A. + A = 4 + + # B. + B = 5 + + # C. + C = 6 + + # D. + D = 7 + + # E. + E = 8 + + # F. + F = 9 + + # G. + G = 10 + end + + # The [pickup](https://support.google.com/merchants/answer/14634021) option + # for the item. + module PickupMethod + # Pickup method is not specified. + PICKUP_METHOD_UNSPECIFIED = 0 + + # The item is not available for store pickup. + NOT_SUPPORTED = 1 + + # The entire transaction occurs online. + BUY = 2 + + # The item is reserved online and the transaction occurs in-store. + RESERVE = 3 + + # The item is purchased online and shipped to a local store for the customer + # to pick up. + SHIP_TO_STORE = 4 + end + + # Item store pickup timeline. For more information, see + # [Pickup SLA](https://support.google.com/merchants/answer/14635400). + module PickupSla + # Pickup SLA is not specified. + PICKUP_SLA_UNSPECIFIED = 0 + + # Indicates that the product is available for pickup the same day that the + # order is placed, subject to cut off times. + SAME_DAY = 1 + + # Indicates that the product is available for pickup the following day that + # the order is placed. + NEXT_DAY = 2 + + # Indicates that the product will be shipped to a store for a customer to + # pick up in 2 days. + TWO_DAY = 3 + + # Indicates that the product will be shipped to a store for a customer to + # pick up in 3 days. + THREE_DAY = 4 + + # Indicates that the product will be shipped to a store for a customer to + # pick up in 4 days + FOUR_DAY = 5 + + # Indicates that the product will be shipped to a store for a customer to + # pick up in 5 days. + FIVE_DAY = 6 + + # Indicates that the product will be shipped to a store for a customer to + # pick up in 6 days. + SIX_DAY = 7 + + # Indicates that the product will be shipped to a store for a customer to + # pick up in one week or more. + MULTI_WEEK = 8 + end + + # Publication of this item will be temporarily + # [paused](https://support.google.com/merchants/answer/11909930). + module Pause + # The pause is unspecified. + PAUSE_UNSPECIFIED = 0 + + # You’re currently pausing your product for all ads locations (including + # Shopping Ads, Display Ads, and local inventory ads). + ADS = 1 + + # You’re currently pausing your product for all Shopping locations + # (including Shopping Ads, Display Ads, local inventory ads, Buy on Google, + # and free listings). + ALL = 2 + end + + # The certification authority. + module CertificationAuthority + # Certification authority is not specified. + CERTIFICATION_AUTHORITY_UNSPECIFIED = 0 + + # For the French CO2 emissions class for vehicles. + ADEME = 1 + + # For the German CO2 emissions classes for vehicles. + BMWK = 2 + + # Environment Protection Agency. + EPA = 3 + + # European Commission for energy labels in the EU. + EC = 4 + end + + # The name of the certification. + module CertificationName + # Certification name is not specified. + CERTIFICATION_NAME_UNSPECIFIED = 0 + + # Energy Star. + ENERGY_STAR = 1 + + # Energy Star Most Efficient. + ENERGY_STAR_MOST_EFFICIENT = 2 + + # Represents energy efficiency certifications in the EU European + # Registry for Energy Labeling (EPREL) database. + EPREL = 3 + + # EU Ecolabel. + EU_ECOLABEL = 4 + + # The overall CO2 class of a vehicle + VEHICLE_ENERGY_EFFICIENCY = 5 + + # For the CO2 class of a vehicle with a discharged battery. + VEHICLE_ENERGY_EFFICIENCY_DISCHARGED_BATTERY = 6 + end + + # The digital source type. + # Following [IPTC](https://cv.iptc.org/newscodes/digitalsourcetype). + module DigitalSourceType + # Digital source type is unspecified. + DIGITAL_SOURCE_TYPE_UNSPECIFIED = 0 + + # Text created algorithmically using a model derived from sampled + # content. + TRAINED_ALGORITHMIC_MEDIA = 1 + + # Text NOT created algorithmically using a model derived from sampled + # content (the default) + DEFAULT = 2 + end + + # Possible carrier where transit time is coming from. + module CarrierTransitTimeOption + # Carrier transit time option is unspecified. + CARRIER_TRANSIT_TIME_OPTION_UNSPECIFIED = 0 + + # DHL Paket shipping service. + DHL_PAKET = 1 + + # DHL Packchen shipping service. + DHL_PACKCHEN = 2 + + # DHL Express Easy shipping service. + DHL_EXPRESSEASY = 3 + + # DPD Express shipping service. + DPD_EXPRESS = 4 + + # DPD Classic Parcel shipping service. + DPD_CLASSIC_PARCEL = 5 + + # Hermes Haustur shipping service. + HERMES_HAUSTUR = 6 + + # Hermes Paketshop shipping service. + HERMES_PAKETSHOP = 7 + + # GLS Business shipping service. + GLS_BUSINESS = 8 + + # GLS Express shipping service. + GLS_EXPRESS = 9 + + # GLS Private shipping service. + GLS_PRIVATE = 10 + + # Colissimo Domicile shipping service. + COLISSIMO_DOMICILE = 11 + + # DHL Express 12 AM shipping service. + DHL_EXPRESS_12AM = 12 + + # DHL Express 9 AM shipping service. + DHL_EXPRESS_9AM = 13 + + # GEODIS Express shipping service. + GEODIS_EXPRESS = 14 + + # GEODIS Pack 30 shipping service. + GEODIS_PACK_30 = 15 + + # GEODIS Same Day shipping service. + GEODIS_SAME_DAY = 16 + + # GEODIS Top 24 shipping service. + GEODIS_TOP_24 = 17 + + # TNT Essentiel 24H shipping service. + TNT_ESSENTIEL_24H = 18 + + # TNT Essentiel Flexibilite shipping service. + TNT_ESSENTIEL_FLEXIBILITE = 19 + + # FedEx Ground shipping service. + FEDEX_GROUND = 20 + + # FedEx Home Delivery shipping service. + FEDEX_HOME_DELIVERY = 21 + + # FedEx Express Saver shipping service. + FEDEX_EXPRESS_SAVER = 22 + + # FedEx First Overnight shipping service. + FEDEX_FIRST_OVERNIGHT = 23 + + # FedEx Priority Overnight shipping service. + FEDEX_PRIORITY_OVERNIGHT = 24 + + # FedEx Standard Overnight shipping service. + FEDEX_STANDARD_OVERNIGHT = 25 + + # FedEx 2Day shipping service. + FEDEX_2DAY = 26 + + # UPS 2nd Day Air shipping service. + UPS_2ND_DAY_AIR = 27 + + # UPS 2nd Day AM shipping service. + UPS_2ND_DAY_AM = 28 + + # UPS 3 Day Select shipping service. + UPS_3_DAY_SELECT = 29 + + # UPS Ground shipping service. + UPS_GROUND = 30 + + # UPS Next Day Air shipping service. + UPS_NEXT_DAY_AIR = 31 + + # UPS Next Day Air Early AM shipping service. + UPS_NEXT_DAY_AIR_EARLY_AM = 32 + + # UPS Next Day Air Saver shipping service. + UPS_NEXT_DAY_AIR_SAVER = 33 + + # USPS Priority Mail Express shipping service. + USPS_PRIORITY_MAIL_EXPRESS = 34 + + # USPS Media Mail shipping service. + USPS_MEDIA_MAIL = 35 + + # USPS Ground Advantage Retail shipping service. + USPS_GROUND_ADVANTAGE_RETAIL = 36 + + # USPS Priority Mail shipping service. + USPS_PRIORITY_MAIL = 37 + + # USPS Ground Advantage Commercial shipping service. + USPS_GROUND_ADVANTAGE_COMMERCIAL = 38 + + # USPS First Class Mail shipping service. + USPS_FIRST_CLASS_MAIL = 39 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1/proto_docs/google/type/interval.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/type/interval.rb new file mode 100644 index 000000000000..9350ca479005 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-products-v1/snippets/Gemfile new file mode 100644 index 000000000000..476b0913359f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1", path: "../" +else + gem "google-shopping-merchant-products-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-products-v1/snippets/product_inputs_service/delete_product_input.rb b/owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/delete_product_input.rb new file mode 100644 index 000000000000..fed58bf376e9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/delete_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 merchantapi_v1_generated_ProductInputsService_DeleteProductInput_sync] +require "google/shopping/merchant/products/v1" + +## +# Snippet for the delete_product_input call in the ProductInputsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#delete_product_input. +# +def delete_product_input + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new + + # Call the delete_product_input method. + result = client.delete_product_input request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1_generated_ProductInputsService_DeleteProductInput_sync] diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/insert_product_input.rb b/owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/insert_product_input.rb new file mode 100644 index 000000000000..93a4a28126da --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/insert_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 merchantapi_v1_generated_ProductInputsService_InsertProductInput_sync] +require "google/shopping/merchant/products/v1" + +## +# Snippet for the insert_product_input call in the ProductInputsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#insert_product_input. +# +def insert_product_input + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new + + # Call the insert_product_input method. + result = client.insert_product_input request + + # The returned object is of type Google::Shopping::Merchant::Products::V1::ProductInput. + p result +end +# [END merchantapi_v1_generated_ProductInputsService_InsertProductInput_sync] diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/update_product_input.rb b/owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/update_product_input.rb new file mode 100644 index 000000000000..03fa844cc1bb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/update_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 merchantapi_v1_generated_ProductInputsService_UpdateProductInput_sync] +require "google/shopping/merchant/products/v1" + +## +# Snippet for the update_product_input call in the ProductInputsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#update_product_input. +# +def update_product_input + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new + + # Call the update_product_input method. + result = client.update_product_input request + + # The returned object is of type Google::Shopping::Merchant::Products::V1::ProductInput. + p result +end +# [END merchantapi_v1_generated_ProductInputsService_UpdateProductInput_sync] diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/snippets/products_service/get_product.rb b/owl-bot-staging/google-shopping-merchant-products-v1/snippets/products_service/get_product.rb new file mode 100644 index 000000000000..c3ee6d98c313 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/snippets/products_service/get_product.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_ProductsService_GetProduct_sync] +require "google/shopping/merchant/products/v1" + +## +# Snippet for the get_product call in the ProductsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Products::V1::ProductsService::Client#get_product. +# +def get_product + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Products::V1::ProductsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Products::V1::GetProductRequest.new + + # Call the get_product method. + result = client.get_product request + + # The returned object is of type Google::Shopping::Merchant::Products::V1::Product. + p result +end +# [END merchantapi_v1_generated_ProductsService_GetProduct_sync] diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/snippets/products_service/list_products.rb b/owl-bot-staging/google-shopping-merchant-products-v1/snippets/products_service/list_products.rb new file mode 100644 index 000000000000..8c761094470d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/snippets/products_service/list_products.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_ProductsService_ListProducts_sync] +require "google/shopping/merchant/products/v1" + +## +# Snippet for the list_products call in the ProductsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Products::V1::ProductsService::Client#list_products. +# +def list_products + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Products::V1::ProductsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Products::V1::ListProductsRequest.new + + # Call the list_products method. + result = client.list_products request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Products::V1::Product. + p item + end +end +# [END merchantapi_v1_generated_ProductsService_ListProducts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/snippets/snippet_metadata_google.shopping.merchant.products.v1.json b/owl-bot-staging/google-shopping-merchant-products-v1/snippets/snippet_metadata_google.shopping.merchant.products.v1.json new file mode 100644 index 000000000000..18fb7a47b809 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/snippets/snippet_metadata_google.shopping.merchant.products.v1.json @@ -0,0 +1,215 @@ +{ + "client_library": { + "name": "google-shopping-merchant-products-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.products.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_ProductInputsService_InsertProductInput_sync", + "title": "Snippet for the insert_product_input call in the ProductInputsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#insert_product_input.", + "file": "product_inputs_service/insert_product_input.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_product_input", + "full_name": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#insert_product_input", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Products::V1::ProductInput", + "client": { + "short_name": "ProductInputsService::Client", + "full_name": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client" + }, + "method": { + "short_name": "InsertProductInput", + "full_name": "google.shopping.merchant.products.v1.ProductInputsService.InsertProductInput", + "service": { + "short_name": "ProductInputsService", + "full_name": "google.shopping.merchant.products.v1.ProductInputsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ProductInputsService_UpdateProductInput_sync", + "title": "Snippet for the update_product_input call in the ProductInputsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#update_product_input.", + "file": "product_inputs_service/update_product_input.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_product_input", + "full_name": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#update_product_input", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Products::V1::ProductInput", + "client": { + "short_name": "ProductInputsService::Client", + "full_name": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client" + }, + "method": { + "short_name": "UpdateProductInput", + "full_name": "google.shopping.merchant.products.v1.ProductInputsService.UpdateProductInput", + "service": { + "short_name": "ProductInputsService", + "full_name": "google.shopping.merchant.products.v1.ProductInputsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ProductInputsService_DeleteProductInput_sync", + "title": "Snippet for the delete_product_input call in the ProductInputsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#delete_product_input.", + "file": "product_inputs_service/delete_product_input.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_product_input", + "full_name": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#delete_product_input", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ProductInputsService::Client", + "full_name": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client" + }, + "method": { + "short_name": "DeleteProductInput", + "full_name": "google.shopping.merchant.products.v1.ProductInputsService.DeleteProductInput", + "service": { + "short_name": "ProductInputsService", + "full_name": "google.shopping.merchant.products.v1.ProductInputsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ProductsService_GetProduct_sync", + "title": "Snippet for the get_product call in the ProductsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1::ProductsService::Client#get_product.", + "file": "products_service/get_product.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_product", + "full_name": "::Google::Shopping::Merchant::Products::V1::ProductsService::Client#get_product", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Products::V1::GetProductRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Products::V1::Product", + "client": { + "short_name": "ProductsService::Client", + "full_name": "::Google::Shopping::Merchant::Products::V1::ProductsService::Client" + }, + "method": { + "short_name": "GetProduct", + "full_name": "google.shopping.merchant.products.v1.ProductsService.GetProduct", + "service": { + "short_name": "ProductsService", + "full_name": "google.shopping.merchant.products.v1.ProductsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_ProductsService_ListProducts_sync", + "title": "Snippet for the list_products call in the ProductsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1::ProductsService::Client#list_products.", + "file": "products_service/list_products.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_products", + "full_name": "::Google::Shopping::Merchant::Products::V1::ProductsService::Client#list_products", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Products::V1::ListProductsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Products::V1::ListProductsResponse", + "client": { + "short_name": "ProductsService::Client", + "full_name": "::Google::Shopping::Merchant::Products::V1::ProductsService::Client" + }, + "method": { + "short_name": "ListProducts", + "full_name": "google.shopping.merchant.products.v1.ProductsService.ListProducts", + "service": { + "short_name": "ProductsService", + "full_name": "google.shopping.merchant.products.v1.ProductsService" + } + } + }, + "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-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_paths_test.rb new file mode 100644 index 000000000000..129ddf43af5d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/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/merchant/products/v1/product_inputs_service" + +class ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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::Products::V1::ProductInputsService::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_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::Merchant::Products::V1::ProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_input_path account: "value0", productinput: "value1" + assert_equal "accounts/value0/productInputs/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_rest_test.rb new file mode 100644 index 000000000000..4fb0bfefbe32 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_rest_test.rb @@ -0,0 +1,266 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/products/v1/productinputs_pb" +require "google/shopping/merchant/products/v1/product_inputs_service/rest" + + +class ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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_product_input + # Create test objects. + client_result = ::Google::Shopping::Merchant::Products::V1::ProductInput.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + product_input = {} + data_source = "hello world" + + insert_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::Merchant::Products::V1::ProductInputsService::Rest::ServiceStub.stub :transcode_insert_product_input_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_product_input_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.insert_product_input({ parent: parent, product_input: product_input, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.insert_product_input parent: parent, product_input: product_input, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.insert_product_input ::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new(parent: parent, product_input: product_input, data_source: data_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.insert_product_input({ parent: parent, product_input: product_input, data_source: data_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.insert_product_input(::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new(parent: parent, product_input: product_input, data_source: data_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_product_input_client_stub.call_count + end + end + end + + def test_update_product_input + # Create test objects. + client_result = ::Google::Shopping::Merchant::Products::V1::ProductInput.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + product_input = {} + update_mask = {} + data_source = "hello world" + + update_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::Merchant::Products::V1::ProductInputsService::Rest::ServiceStub.stub :transcode_update_product_input_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_product_input_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_product_input({ product_input: product_input, update_mask: update_mask, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_product_input product_input: product_input, update_mask: update_mask, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_product_input ::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new(product_input: product_input, update_mask: update_mask, data_source: data_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_product_input({ product_input: product_input, update_mask: update_mask, data_source: data_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_product_input(::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new(product_input: product_input, update_mask: update_mask, data_source: data_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_product_input_client_stub.call_count + end + end + end + + def test_delete_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" + data_source = "hello world" + + delete_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::Merchant::Products::V1::ProductInputsService::Rest::ServiceStub.stub :transcode_delete_product_input_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_product_input_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_product_input({ name: name, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_product_input name: name, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_product_input ::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new(name: name, data_source: data_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_product_input({ name: name, data_source: data_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_product_input(::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new(name: name, data_source: data_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_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::Merchant::Products::V1::ProductInputsService::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::Products::V1::ProductInputsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_test.rb new file mode 100644 index 000000000000..64c3eaa96159 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_test.rb @@ -0,0 +1,288 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/products/v1/productinputs_pb" +require "google/shopping/merchant/products/v1/product_inputs_service" + +class ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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_product_input + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Products::V1::ProductInput.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + product_input = {} + data_source = "hello world" + + insert_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_product_input, name + assert_kind_of ::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Products::V1::ProductInput), request["product_input"] + assert_equal "hello world", request["data_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_product_input_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.insert_product_input({ parent: parent, product_input: product_input, data_source: data_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.insert_product_input parent: parent, product_input: product_input, data_source: data_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.insert_product_input ::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new(parent: parent, product_input: product_input, data_source: data_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.insert_product_input({ parent: parent, product_input: product_input, 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 + c.insert_product_input(::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new(parent: parent, product_input: product_input, 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, insert_product_input_client_stub.call_rpc_count + end + end + + def test_update_product_input + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Products::V1::ProductInput.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + product_input = {} + update_mask = {} + data_source = "hello world" + + update_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_product_input, name + assert_kind_of ::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Products::V1::ProductInput), request["product_input"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["data_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_product_input_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_product_input({ product_input: product_input, update_mask: update_mask, data_source: data_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_product_input product_input: product_input, update_mask: update_mask, data_source: data_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_product_input ::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new(product_input: product_input, update_mask: update_mask, data_source: data_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_product_input({ product_input: product_input, update_mask: update_mask, 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 + c.update_product_input(::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new(product_input: product_input, update_mask: update_mask, 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, update_product_input_client_stub.call_rpc_count + end + end + + def test_delete_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" + data_source = "hello world" + + delete_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_product_input, name + assert_kind_of ::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["data_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_product_input_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_product_input({ name: name, data_source: data_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_product_input name: name, data_source: data_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_product_input ::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new(name: name, data_source: data_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_product_input({ name: name, 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 + c.delete_product_input(::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new(name: name, 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, delete_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::Merchant::Products::V1::ProductInputsService::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::Products::V1::ProductInputsService::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::Products::V1::ProductInputsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_paths_test.rb new file mode 100644 index 000000000000..7699b26cd912 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/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/merchant/products/v1/products_service" + +class ::Google::Shopping::Merchant::Products::V1::ProductsService::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::Products::V1::ProductsService::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::Products::V1::ProductsService::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-products-v1/test/google/shopping/merchant/products/v1/products_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_rest_test.rb new file mode 100644 index 000000000000..f65e8189f567 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/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/merchant/products/v1/products_pb" +require "google/shopping/merchant/products/v1/products_service/rest" + + +class ::Google::Shopping::Merchant::Products::V1::ProductsService::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_product + # Create test objects. + client_result = ::Google::Shopping::Merchant::Products::V1::Product.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_product_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::ServiceStub.stub :transcode_get_product_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_product_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_product({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_product name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_product ::Google::Shopping::Merchant::Products::V1::GetProductRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_product({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_product(::Google::Shopping::Merchant::Products::V1::GetProductRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_product_client_stub.call_count + end + end + end + + def test_list_products + # Create test objects. + client_result = ::Google::Shopping::Merchant::Products::V1::ListProductsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_products_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::ServiceStub.stub :transcode_list_products_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_products_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_products({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_products parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_products ::Google::Shopping::Merchant::Products::V1::ListProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_products({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_products(::Google::Shopping::Merchant::Products::V1::ListProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_products_client_stub.call_count + end + end + end + + def test_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::Products::V1::ProductsService::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::Products::V1::ProductsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_test.rb new file mode 100644 index 000000000000..f01d9b28135c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/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/merchant/products/v1/products_pb" +require "google/shopping/merchant/products/v1/products_service" + +class ::Google::Shopping::Merchant::Products::V1::ProductsService::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_product + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Products::V1::Product.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_product, name + assert_kind_of ::Google::Shopping::Merchant::Products::V1::GetProductRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_product_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_product({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_product name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_product ::Google::Shopping::Merchant::Products::V1::GetProductRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_product({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_product(::Google::Shopping::Merchant::Products::V1::GetProductRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_product_client_stub.call_rpc_count + end + end + + def test_list_products + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Products::V1::ListProductsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_products_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_products, name + assert_kind_of ::Google::Shopping::Merchant::Products::V1::ListProductsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_products_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_products({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_products parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_products ::Google::Shopping::Merchant::Products::V1::ListProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_products({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_products(::Google::Shopping::Merchant::Products::V1::ListProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_products_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::Products::V1::ProductsService::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::Products::V1::ProductsService::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::Products::V1::ProductsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Products::V1::ProductsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-products-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +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-products-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-products-v1beta/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/.gitignore @@ -0,0 +1,20 @@ +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-products-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-products-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..b8f3e6f102ed --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta", + "distribution_name": "google-shopping-merchant-products-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-products-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-products 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-products-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-products-v1beta/.rubocop.yml new file mode 100644 index 000000000000..02dfe36a64d7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-products-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-products-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-products-v1beta/.yardopts new file mode 100644 index 000000000000..3ddd15e0cf87 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-products-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..05272e5624bd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-products-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-products-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/products/v1beta" + +client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::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/products/v1beta" + +::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::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-products-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/products/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::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-products-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-products-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-products-v1beta/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/Gemfile @@ -0,0 +1,15 @@ +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-reporters", "~> 1.8.0", require: false +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-products-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-products-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-products-v1beta/README.md new file mode 100644 index 000000000000..54b5fad7683e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products](https://rubygems.org/gems/google-shopping-merchant-products). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-products-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/products/v1beta" + +client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new +request = ::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest.new # (request fields as keyword arguments...) +response = client.insert_product_input request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-products-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/products/v1beta" +require "logger" + +client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::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.2+. + +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-products`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-products-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-products`. +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-products-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-products-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-products-v1beta/Rakefile new file mode 100644 index 000000000000..10cb6d8b95a9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-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/products/v1beta/product_inputs_service/credentials" + ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::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-products-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-products-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-products-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-products-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-products-v1beta" + header "google-shopping-merchant-products-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-products-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-products-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-products-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-products-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-products-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-products-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..40fc37abe836 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/gapic_metadata.json @@ -0,0 +1,52 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.products.v1beta", + "libraryPackage": "::Google::Shopping::Merchant::Products::V1beta", + "services": { + "ProductInputsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client", + "rpcs": { + "InsertProductInput": { + "methods": [ + "insert_product_input" + ] + }, + "UpdateProductInput": { + "methods": [ + "update_product_input" + ] + }, + "DeleteProductInput": { + "methods": [ + "delete_product_input" + ] + } + } + } + } + }, + "ProductsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client", + "rpcs": { + "GetProduct": { + "methods": [ + "get_product" + ] + }, + "ListProducts": { + "methods": [ + "list_products" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/google-shopping-merchant-products-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-products-v1beta/google-shopping-merchant-products-v1beta.gemspec new file mode 100644 index 000000000000..2713703c4d8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/google-shopping-merchant-products-v1beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/products/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-products-v1beta" + gem.version = Google::Shopping::Merchant::Products::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-products-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-products 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.3" + 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-products-v1beta/lib/google-shopping-merchant-products-v1beta.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google-shopping-merchant-products-v1beta.rb new file mode 100644 index 000000000000..7d527ddd9822 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google-shopping-merchant-products-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/products/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta.rb new file mode 100644 index 000000000000..e683bb4e583d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/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/products/v1beta/product_inputs_service" +require "google/shopping/merchant/products/v1beta/products_service" +require "google/shopping/merchant/products/v1beta/version" + +module Google + module Shopping + module Merchant + module Products + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/products/v1beta" + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/products/v1beta" + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/shopping/merchant/products/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service.rb new file mode 100644 index 000000000000..0ddfb756c73a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_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/products/v1beta/version" + +require "google/shopping/merchant/products/v1beta/product_inputs_service/credentials" +require "google/shopping/merchant/products/v1beta/product_inputs_service/paths" +require "google/shopping/merchant/products/v1beta/product_inputs_service/client" +require "google/shopping/merchant/products/v1beta/product_inputs_service/rest" + +module Google + module Shopping + module Merchant + module Products + module V1beta + ## + # Service to use ProductInput resource. + # This service works for products with online channel only. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/products/v1beta/product_inputs_service" + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/products/v1beta/product_inputs_service/rest" + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new + # + module ProductInputsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "product_inputs_service", "helpers.rb" +require "google/shopping/merchant/products/v1beta/product_inputs_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/client.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/client.rb new file mode 100644 index 000000000000..165f4881a6dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/client.rb @@ -0,0 +1,733 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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/products/v1beta/productinputs_pb" + +module Google + module Shopping + module Merchant + module Products + module V1beta + module ProductInputsService + ## + # Client for the ProductInputsService service. + # + # Service to use ProductInput resource. + # This service works for products with online channel only. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :product_inputs_service_stub + + ## + # Configure the ProductInputsService Client class. + # + # See {::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProductInputsService clients + # ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.configure do |config| + # config.timeout = 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", "Products", "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 ProductInputsService Client instance. + # + # The configuration is set to the derived mode, meaning that values 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::Products::V1beta::ProductInputsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @product_inputs_service_stub.universe_domain + end + + ## + # Create a new ProductInputsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProductInputsService 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/products/v1beta/productinputs_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 + + @product_inputs_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @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 + @product_inputs_service_stub.logger + end + + # Service calls + + ## + # [Uploads a product input to your Merchant Center + # account](/merchant/api/guides/products/overview#upload-product-input). You + # must have a products data source to be able to insert a product. The unique + # identifier of the data source is passed as a query parameter in the request + # URL. + # + # If an input with the same contentLanguage, offerId, and dataSource already + # exists, this method replaces that entry. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # @overload insert_product_input(request, options = nil) + # Pass arguments to `insert_product_input` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_product_input(parent: nil, product_input: nil, data_source: nil) + # Pass arguments to `insert_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 product will be inserted. + # Format: `accounts/{account}` + # @param product_input [::Google::Shopping::Merchant::Products::V1beta::ProductInput, ::Hash] + # Required. The product input to insert. + # @param data_source [::String] + # Required. The primary or supplemental product data source name. If the + # product already exists and data source provided is different, then the + # product will be moved to a new data source. For more information, see + # [Overview of Data sources + # sub-API](/merchant/api/guides/data-sources/overview). + # + # Only API data sources are supported. + # + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Products::V1beta::ProductInput] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Products::V1beta::ProductInput] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest.new + # + # # Call the insert_product_input method. + # result = client.insert_product_input request + # + # # The returned object is of type Google::Shopping::Merchant::Products::V1beta::ProductInput. + # p result + # + def insert_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest + + # Converts hash and nil to 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_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::Merchant::Products::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_product_input.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_inputs_service_stub.call_rpc :insert_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 product input in your Merchant Center account. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # @overload update_product_input(request, options = nil) + # Pass arguments to `update_product_input` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_product_input(product_input: nil, update_mask: nil, data_source: nil) + # Pass arguments to `update_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 product_input [::Google::Shopping::Merchant::Products::V1beta::ProductInput, ::Hash] + # Required. The product input resource to update. Information you submit will + # be applied to the processed product as well. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of 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 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 product replacement is not supported. + # @param data_source [::String] + # Required. The primary or supplemental product data source where + # `data_source` name identifies the product input to be updated. + # + # Only API data sources are supported. + # + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Products::V1beta::ProductInput] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Products::V1beta::ProductInput] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest.new + # + # # Call the update_product_input method. + # result = client.update_product_input request + # + # # The returned object is of type Google::Shopping::Merchant::Products::V1beta::ProductInput. + # p result + # + def update_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_product_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::Merchant::Products::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.product_input&.name + header_params["product_input.name"] = request.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_product_input.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_inputs_service_stub.call_rpc :update_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 product input from your Merchant Center account. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # @overload delete_product_input(request, options = nil) + # Pass arguments to `delete_product_input` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_product_input(name: nil, data_source: nil) + # Pass arguments to `delete_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 product input resource to delete. + # Format: `accounts/{account}/productInputs/{product}` + # where the last section `product` consists of 4 parts: + # `channel~content_language~feed_label~offer_id` + # example for product name is + # `accounts/123/productInputs/online~en~US~sku123`. + # @param data_source [::String] + # Required. The primary or supplemental data source from which the product + # input should be deleted. Format: + # `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::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/products/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest.new + # + # # Call the delete_product_input method. + # result = client.delete_product_input request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_product_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::Merchant::Products::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_product_input.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_inputs_service_stub.call_rpc :delete_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 ProductInputsService API. + # + # This class represents the configuration for ProductInputsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_product_input to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_product_input.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_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::Merchant::Products::V1beta::ProductInputsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ProductInputsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `insert_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_product_input + ## + # RPC-specific configuration for `update_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :update_product_input + ## + # RPC-specific configuration for `delete_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_product_input + + # @private + def initialize parent_rpcs = nil + insert_product_input_config = parent_rpcs.insert_product_input if parent_rpcs.respond_to? :insert_product_input + @insert_product_input = ::Gapic::Config::Method.new insert_product_input_config + update_product_input_config = parent_rpcs.update_product_input if parent_rpcs.respond_to? :update_product_input + @update_product_input = ::Gapic::Config::Method.new update_product_input_config + delete_product_input_config = parent_rpcs.delete_product_input if parent_rpcs.respond_to? :delete_product_input + @delete_product_input = ::Gapic::Config::Method.new delete_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-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/credentials.rb new file mode 100644 index 000000000000..718d7d4e3f00 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_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 Products + module V1beta + module ProductInputsService + # Credentials for the ProductInputsService 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-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/paths.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/paths.rb new file mode 100644 index 000000000000..4a11a773de08 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_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 Products + module V1beta + module ProductInputsService + # Path helper methods for the ProductInputsService 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 ProductInput resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/productInputs/{productinput}` + # + # @param account [String] + # @param productinput [String] + # + # @return [::String] + def product_input_path account:, productinput: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/productInputs/#{productinput}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest.rb new file mode 100644 index 000000000000..672cd8c37902 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_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/products/v1beta/version" + +require "google/shopping/merchant/products/v1beta/product_inputs_service/credentials" +require "google/shopping/merchant/products/v1beta/product_inputs_service/paths" +require "google/shopping/merchant/products/v1beta/product_inputs_service/rest/client" + +module Google + module Shopping + module Merchant + module Products + module V1beta + ## + # Service to use ProductInput resource. + # This service works for products with online channel only. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/products/v1beta/product_inputs_service/rest" + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new + # + module ProductInputsService + # 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/products/v1beta/product_inputs_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/client.rb new file mode 100644 index 000000000000..d718e5bfd70b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/client.rb @@ -0,0 +1,669 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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/products/v1beta/productinputs_pb" +require "google/shopping/merchant/products/v1beta/product_inputs_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Products + module V1beta + module ProductInputsService + module Rest + ## + # REST client for the ProductInputsService service. + # + # Service to use ProductInput resource. + # This service works for products with online channel only. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :product_inputs_service_stub + + ## + # Configure the ProductInputsService Client class. + # + # See {::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProductInputsService clients + # ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::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", "Products", "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 ProductInputsService Client instance. + # + # The configuration is set to the derived mode, meaning that values 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::Products::V1beta::ProductInputsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @product_inputs_service_stub.universe_domain + end + + ## + # Create a new ProductInputsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProductInputsService 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 + + @product_inputs_service_stub = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @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 + @product_inputs_service_stub.logger + end + + # Service calls + + ## + # [Uploads a product input to your Merchant Center + # account](/merchant/api/guides/products/overview#upload-product-input). You + # must have a products data source to be able to insert a product. The unique + # identifier of the data source is passed as a query parameter in the request + # URL. + # + # If an input with the same contentLanguage, offerId, and dataSource already + # exists, this method replaces that entry. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # @overload insert_product_input(request, options = nil) + # Pass arguments to `insert_product_input` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_product_input(parent: nil, product_input: nil, data_source: nil) + # Pass arguments to `insert_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 product will be inserted. + # Format: `accounts/{account}` + # @param product_input [::Google::Shopping::Merchant::Products::V1beta::ProductInput, ::Hash] + # Required. The product input to insert. + # @param data_source [::String] + # Required. The primary or supplemental product data source name. If the + # product already exists and data source provided is different, then the + # product will be moved to a new data source. For more information, see + # [Overview of Data sources + # sub-API](/merchant/api/guides/data-sources/overview). + # + # Only API data sources are supported. + # + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Products::V1beta::ProductInput] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1beta::ProductInput] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest.new + # + # # Call the insert_product_input method. + # result = client.insert_product_input request + # + # # The returned object is of type Google::Shopping::Merchant::Products::V1beta::ProductInput. + # p result + # + def insert_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest + + # Converts hash and nil to an 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_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::Merchant::Products::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_product_input.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_inputs_service_stub.insert_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 product input in your Merchant Center account. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # @overload update_product_input(request, options = nil) + # Pass arguments to `update_product_input` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_product_input(product_input: nil, update_mask: nil, data_source: nil) + # Pass arguments to `update_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 product_input [::Google::Shopping::Merchant::Products::V1beta::ProductInput, ::Hash] + # Required. The product input resource to update. Information you submit will + # be applied to the processed product as well. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of 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 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 product replacement is not supported. + # @param data_source [::String] + # Required. The primary or supplemental product data source where + # `data_source` name identifies the product input to be updated. + # + # Only API data sources are supported. + # + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Products::V1beta::ProductInput] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1beta::ProductInput] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest.new + # + # # Call the update_product_input method. + # result = client.update_product_input request + # + # # The returned object is of type Google::Shopping::Merchant::Products::V1beta::ProductInput. + # p result + # + def update_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_product_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::Merchant::Products::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_product_input.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_inputs_service_stub.update_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 product input from your Merchant Center account. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # @overload delete_product_input(request, options = nil) + # Pass arguments to `delete_product_input` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_product_input(name: nil, data_source: nil) + # Pass arguments to `delete_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 product input resource to delete. + # Format: `accounts/{account}/productInputs/{product}` + # where the last section `product` consists of 4 parts: + # `channel~content_language~feed_label~offer_id` + # example for product name is + # `accounts/123/productInputs/online~en~US~sku123`. + # @param data_source [::String] + # Required. The primary or supplemental data source from which the product + # input should be deleted. Format: + # `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @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/products/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest.new + # + # # Call the delete_product_input method. + # result = client.delete_product_input request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_product_input request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_product_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::Merchant::Products::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_product_input.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_product_input.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_inputs_service_stub.delete_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 ProductInputsService REST API. + # + # This class represents the configuration for ProductInputsService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_product_input to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_product_input.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the ProductInputsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `insert_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_product_input + ## + # RPC-specific configuration for `update_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :update_product_input + ## + # RPC-specific configuration for `delete_product_input` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_product_input + + # @private + def initialize parent_rpcs = nil + insert_product_input_config = parent_rpcs.insert_product_input if parent_rpcs.respond_to? :insert_product_input + @insert_product_input = ::Gapic::Config::Method.new insert_product_input_config + update_product_input_config = parent_rpcs.update_product_input if parent_rpcs.respond_to? :update_product_input + @update_product_input = ::Gapic::Config::Method.new update_product_input_config + delete_product_input_config = parent_rpcs.delete_product_input if parent_rpcs.respond_to? :delete_product_input + @delete_product_input = ::Gapic::Config::Method.new delete_product_input_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-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/service_stub.rb new file mode 100644 index 000000000000..dc90849ebd50 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/service_stub.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 "google/shopping/merchant/products/v1beta/productinputs_pb" + +module Google + module Shopping + module Merchant + module Products + module V1beta + module ProductInputsService + module Rest + ## + # REST service stub for the ProductInputsService 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_product_input REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Products::V1beta::ProductInput] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1beta::ProductInput] + # A result object deserialized from the server's reply + def insert_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_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_product_input", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Products::V1beta::ProductInput.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_product_input REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Products::V1beta::ProductInput] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1beta::ProductInput] + # A result object deserialized from the server's reply + def update_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_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_product_input", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Products::V1beta::ProductInput.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_product_input REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_product_input request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_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_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_product_input REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest] + # 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_product_input_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/products/v1beta/{parent}/productInputs:insert", + body: "product_input", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_product_input REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_product_input_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/products/v1beta/{product_input.name}", + body: "product_input", + matches: [ + ["product_input.name", %r{^accounts/[^/]+/productInputs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_product_input REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_product_input_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/products/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/productInputs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_pb.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_pb.rb new file mode 100644 index 000000000000..bced0f14a337 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/products/v1beta/productinputs.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/products/v1beta/products_common_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\ngoogle/shopping/merchant/products/v1beta/products_common.proto\x1a google/shopping/type/types.proto\"\x9a\x04\n\x0cProductInput\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07product\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12?\n\x07\x63hannel\x18\x03 \x01(\x0e\x32).google.shopping.type.Channel.ChannelEnumB\x03\xe0\x41\x05\x12\x18\n\x08offer_id\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\x12\x1a\n\nfeed_label\x18\x06 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12#\n\x0eversion_number\x18\x07 \x01(\x03\x42\x06\xe0\x41\x01\xe0\x41\x05H\x00\x88\x01\x01\x12M\n\nattributes\x18\x08 \x01(\x0b\x32\x34.google.shopping.merchant.products.v1beta.AttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\t \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01:z\xea\x41w\n\'merchantapi.googleapis.com/ProductInput\x12/accounts/{account}/productInputs/{productinput}*\rproductInputs2\x0cproductInputB\x11\n\x0f_version_number\"\xc5\x01\n\x19InsertProductInputRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"merchantapi.googleapis.com/Product\x12R\n\rproduct_input\x18\x02 \x01(\x0b\x32\x36.google.shopping.merchant.products.v1beta.ProductInputB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xbf\x01\n\x19UpdateProductInputRequest\x12R\n\rproduct_input\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.products.v1beta.ProductInputB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"t\n\x19\x44\x65leteProductInputRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'merchantapi.googleapis.com/ProductInput\x12\x18\n\x0b\x64\x61ta_source\x18\x02 \x01(\tB\x03\xe0\x41\x02\x32\x85\x06\n\x14ProductInputsService\x12\xe3\x01\n\x12InsertProductInput\x12\x43.google.shopping.merchant.products.v1beta.InsertProductInputRequest\x1a\x36.google.shopping.merchant.products.v1beta.ProductInput\"P\x82\xd3\xe4\x93\x02J\"9/products/v1beta/{parent=accounts/*}/productInputs:insert:\rproduct_input\x12\x86\x02\n\x12UpdateProductInput\x12\x43.google.shopping.merchant.products.v1beta.UpdateProductInputRequest\x1a\x36.google.shopping.merchant.products.v1beta.ProductInput\"s\xda\x41\x19product_input,update_mask\x82\xd3\xe4\x93\x02Q2@/products/v1beta/{product_input.name=accounts/*/productInputs/*}:\rproduct_input\x12\xb4\x01\n\x12\x44\x65leteProductInput\x12\x43.google.shopping.merchant.products.v1beta.DeleteProductInputRequest\x1a\x16.google.protobuf.Empty\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/products/v1beta/{name=accounts/*/productInputs/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x94\x01\n,com.google.shopping.merchant.products.v1betaB\x12ProductInputsProtoP\x01ZNcloud.google.com/go/shopping/merchant/products/apiv1beta/productspb;productspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Products + module V1beta + ProductInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductInput").msgclass + InsertProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.InsertProductInputRequest").msgclass + UpdateProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.UpdateProductInputRequest").msgclass + DeleteProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.DeleteProductInputRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_services_pb.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_services_pb.rb new file mode 100644 index 000000000000..847efb1541c4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_services_pb.rb @@ -0,0 +1,68 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/products/v1beta/productinputs.proto for package 'google.shopping.merchant.products.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/products/v1beta/productinputs_pb' + +module Google + module Shopping + module Merchant + module Products + module V1beta + module ProductInputsService + # Service to use ProductInput resource. + # This service works for products with online channel only. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.products.v1beta.ProductInputsService' + + # [Uploads a product input to your Merchant Center + # account](/merchant/api/guides/products/overview#upload-product-input). You + # must have a products data source to be able to insert a product. The unique + # identifier of the data source is passed as a query parameter in the request + # URL. + # + # If an input with the same contentLanguage, offerId, and dataSource already + # exists, this method replaces that entry. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + rpc :InsertProductInput, ::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest, ::Google::Shopping::Merchant::Products::V1beta::ProductInput + # Updates the existing product input in your Merchant Center account. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + rpc :UpdateProductInput, ::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest, ::Google::Shopping::Merchant::Products::V1beta::ProductInput + # Deletes a product input from your Merchant Center account. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + rpc :DeleteProductInput, ::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_common_pb.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_common_pb.rb new file mode 100644 index 000000000000..10f689189d70 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_common_pb.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/products/v1beta/products_common.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' +require 'google/shopping/type/types_pb' +require 'google/type/interval_pb' + + +descriptor_data = "\n>google/shopping/merchant/products/v1beta/products_common.proto\x12(google.shopping.merchant.products.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/interval.proto\"\xe1(\n\nAttributes\x12\x1e\n\x11identifier_exists\x18\x04 \x01(\x08H\x00\x88\x01\x01\x12\x16\n\tis_bundle\x18\x05 \x01(\x08H\x01\x88\x01\x01\x12\x12\n\x05title\x18\x06 \x01(\tH\x02\x88\x01\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tH\x03\x88\x01\x01\x12\x11\n\x04link\x18\x08 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0bmobile_link\x18\t \x01(\tH\x05\x88\x01\x01\x12\x1b\n\x0e\x63\x61nonical_link\x18\n \x01(\tH\x06\x88\x01\x01\x12\x17\n\nimage_link\x18\x0b \x01(\tH\x07\x88\x01\x01\x12\x1e\n\x16\x61\x64\x64itional_image_links\x18\x0c \x03(\t\x12\x33\n\x0f\x65xpiration_date\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x64isclosure_date\x18O \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\x05\x61\x64ult\x18\x11 \x01(\x08H\x08\x88\x01\x01\x12\x16\n\tage_group\x18\x12 \x01(\tH\t\x88\x01\x01\x12\x19\n\x0c\x61vailability\x18\x13 \x01(\tH\n\x88\x01\x01\x12\x35\n\x11\x61vailability_date\x18\x14 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\x05\x62rand\x18\x15 \x01(\tH\x0b\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x16 \x01(\tH\x0c\x88\x01\x01\x12\x16\n\tcondition\x18\x17 \x01(\tH\r\x88\x01\x01\x12\x13\n\x06gender\x18\x18 \x01(\tH\x0e\x88\x01\x01\x12$\n\x17google_product_category\x18\x19 \x01(\tH\x0f\x88\x01\x01\x12\x10\n\x04gtin\x18\x1a \x03(\tB\x02\x18\x01\x12\x0e\n\x05gtins\x18\x8c\x01 \x03(\t\x12\x1a\n\ritem_group_id\x18\x1b \x01(\tH\x10\x88\x01\x01\x12\x15\n\x08material\x18\x1c \x01(\tH\x11\x88\x01\x01\x12\x10\n\x03mpn\x18\x1d \x01(\tH\x12\x88\x01\x01\x12\x14\n\x07pattern\x18\x1e \x01(\tH\x13\x88\x01\x01\x12*\n\x05price\x18\x1f \x01(\x0b\x32\x1b.google.shopping.type.Price\x12:\n\x14maximum_retail_price\x18\x8b\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12J\n\x0binstallment\x18 \x01(\x0b\x32\x35.google.shopping.merchant.products.v1beta.Installment\x12U\n\x11subscription_cost\x18! \x01(\x0b\x32:.google.shopping.merchant.products.v1beta.SubscriptionCost\x12O\n\x0eloyalty_points\x18\" \x01(\x0b\x32\x37.google.shopping.merchant.products.v1beta.LoyaltyPoints\x12S\n\x10loyalty_programs\x18\x88\x01 \x03(\x0b\x32\x38.google.shopping.merchant.products.v1beta.LoyaltyProgram\x12\x15\n\rproduct_types\x18# \x03(\t\x12/\n\nsale_price\x18$ \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x38\n\x19sale_price_effective_date\x18% \x01(\x0b\x32\x15.google.type.Interval\x12$\n\x17sell_on_google_quantity\x18& \x01(\x03H\x14\x88\x01\x01\x12R\n\x0eproduct_height\x18w \x01(\x0b\x32:.google.shopping.merchant.products.v1beta.ProductDimension\x12R\n\x0eproduct_length\x18x \x01(\x0b\x32:.google.shopping.merchant.products.v1beta.ProductDimension\x12Q\n\rproduct_width\x18y \x01(\x0b\x32:.google.shopping.merchant.products.v1beta.ProductDimension\x12O\n\x0eproduct_weight\x18z \x01(\x0b\x32\x37.google.shopping.merchant.products.v1beta.ProductWeight\x12\x44\n\x08shipping\x18\' \x03(\x0b\x32\x32.google.shopping.merchant.products.v1beta.Shipping\x12\x61\n\x17\x66ree_shipping_threshold\x18\x87\x01 \x03(\x0b\x32?.google.shopping.merchant.products.v1beta.FreeShippingThreshold\x12Q\n\x0fshipping_weight\x18( \x01(\x0b\x32\x38.google.shopping.merchant.products.v1beta.ShippingWeight\x12T\n\x0fshipping_length\x18) \x01(\x0b\x32;.google.shopping.merchant.products.v1beta.ShippingDimension\x12S\n\x0eshipping_width\x18* \x01(\x0b\x32;.google.shopping.merchant.products.v1beta.ShippingDimension\x12T\n\x0fshipping_height\x18+ \x01(\x0b\x32;.google.shopping.merchant.products.v1beta.ShippingDimension\x12\x1e\n\x11max_handling_time\x18, \x01(\x03H\x15\x88\x01\x01\x12\x1e\n\x11min_handling_time\x18- \x01(\x03H\x16\x88\x01\x01\x12\x1b\n\x0eshipping_label\x18. \x01(\tH\x17\x88\x01\x01\x12\x1f\n\x12transit_time_label\x18/ \x01(\tH\x18\x88\x01\x01\x12\x11\n\x04size\x18\x30 \x01(\tH\x19\x88\x01\x01\x12\x18\n\x0bsize_system\x18\x31 \x01(\tH\x1a\x88\x01\x01\x12\x12\n\nsize_types\x18\x32 \x03(\t\x12@\n\x05taxes\x18\x33 \x03(\x0b\x32-.google.shopping.merchant.products.v1beta.TaxB\x02\x18\x01\x12\x1d\n\x0ctax_category\x18\x34 \x01(\tB\x02\x18\x01H\x1b\x88\x01\x01\x12$\n\x17\x65nergy_efficiency_class\x18\x35 \x01(\tH\x1c\x88\x01\x01\x12(\n\x1bmin_energy_efficiency_class\x18\x36 \x01(\tH\x1d\x88\x01\x01\x12(\n\x1bmax_energy_efficiency_class\x18\x37 \x01(\tH\x1e\x88\x01\x01\x12Z\n\x14unit_pricing_measure\x18\x38 \x01(\x0b\x32<.google.shopping.merchant.products.v1beta.UnitPricingMeasure\x12\x63\n\x19unit_pricing_base_measure\x18\x39 \x01(\x0b\x32@.google.shopping.merchant.products.v1beta.UnitPricingBaseMeasure\x12\x16\n\tmultipack\x18: \x01(\x03H\x1f\x88\x01\x01\x12\x19\n\x0c\x61\x64s_grouping\x18; \x01(\tH \x88\x01\x01\x12\x12\n\nads_labels\x18< \x03(\t\x12\x19\n\x0c\x61\x64s_redirect\x18= \x01(\tH!\x88\x01\x01\x12\x37\n\x12\x63ost_of_goods_sold\x18> \x01(\x0b\x32\x1b.google.shopping.type.Price\x12P\n\x0fproduct_details\x18? \x03(\x0b\x32\x37.google.shopping.merchant.products.v1beta.ProductDetail\x12\x1a\n\x12product_highlights\x18@ \x03(\t\x12\x1b\n\x0e\x64isplay_ads_id\x18\x41 \x01(\tH\"\x88\x01\x01\x12\x1f\n\x17\x64isplay_ads_similar_ids\x18\x42 \x03(\t\x12\x1e\n\x11\x64isplay_ads_title\x18\x43 \x01(\tH#\x88\x01\x01\x12\x1d\n\x10\x64isplay_ads_link\x18\x44 \x01(\tH$\x88\x01\x01\x12\x1e\n\x11\x64isplay_ads_value\x18\x45 \x01(\x01H%\x88\x01\x01\x12\x15\n\rpromotion_ids\x18\x46 \x03(\t\x12\x1a\n\rpickup_method\x18P \x01(\tH&\x88\x01\x01\x12\x17\n\npickup_sla\x18Q \x01(\tH\'\x88\x01\x01\x12\x1a\n\rlink_template\x18R \x01(\tH(\x88\x01\x01\x12!\n\x14mobile_link_template\x18S \x01(\tH)\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_0\x18G \x01(\tH*\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_1\x18H \x01(\tH+\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_2\x18I \x01(\tH,\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_3\x18J \x01(\tH-\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_4\x18K \x01(\tH.\x88\x01\x01\x12\x1d\n\x15included_destinations\x18L \x03(\t\x12\x1d\n\x15\x65xcluded_destinations\x18M \x03(\t\x12\'\n\x1fshopping_ads_excluded_countries\x18N \x03(\t\x12\x1f\n\x12\x65xternal_seller_id\x18\x01 \x01(\tH/\x88\x01\x01\x12\x12\n\x05pause\x18\r \x01(\tH0\x88\x01\x01\x12\x1d\n\x15lifestyle_image_links\x18\x0e \x03(\t\x12u\n\"cloud_export_additional_properties\x18T \x03(\x0b\x32I.google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties\x12 \n\x12virtual_model_link\x18\x82\x01 \x01(\tH1\x88\x01\x01\x12O\n\x0e\x63\x65rtifications\x18{ \x03(\x0b\x32\x37.google.shopping.merchant.products.v1beta.Certification\x12`\n\x10structured_title\x18\x84\x01 \x01(\x0b\x32@.google.shopping.merchant.products.v1beta.ProductStructuredTitleH2\x88\x01\x01\x12l\n\x16structured_description\x18\x85\x01 \x01(\x0b\x32\x46.google.shopping.merchant.products.v1beta.ProductStructuredDescriptionH3\x88\x01\x01\x12;\n\x16\x61uto_pricing_min_price\x18| \x01(\x0b\x32\x1b.google.shopping.type.Price\x12l\n\x19sustainability_incentives\x18\x8a\x01 \x03(\x0b\x32H.google.shopping.merchant.products.v1beta.ProductSustainabilityIncentiveB\x14\n\x12_identifier_existsB\x0c\n\n_is_bundleB\x08\n\x06_titleB\x0e\n\x0c_descriptionB\x07\n\x05_linkB\x0e\n\x0c_mobile_linkB\x11\n\x0f_canonical_linkB\r\n\x0b_image_linkB\x08\n\x06_adultB\x0c\n\n_age_groupB\x0f\n\r_availabilityB\x08\n\x06_brandB\x08\n\x06_colorB\x0c\n\n_conditionB\t\n\x07_genderB\x1a\n\x18_google_product_categoryB\x10\n\x0e_item_group_idB\x0b\n\t_materialB\x06\n\x04_mpnB\n\n\x08_patternB\x1a\n\x18_sell_on_google_quantityB\x14\n\x12_max_handling_timeB\x14\n\x12_min_handling_timeB\x11\n\x0f_shipping_labelB\x15\n\x13_transit_time_labelB\x07\n\x05_sizeB\x0e\n\x0c_size_systemB\x0f\n\r_tax_categoryB\x1a\n\x18_energy_efficiency_classB\x1e\n\x1c_min_energy_efficiency_classB\x1e\n\x1c_max_energy_efficiency_classB\x0c\n\n_multipackB\x0f\n\r_ads_groupingB\x0f\n\r_ads_redirectB\x11\n\x0f_display_ads_idB\x14\n\x12_display_ads_titleB\x13\n\x11_display_ads_linkB\x14\n\x12_display_ads_valueB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\x10\n\x0e_link_templateB\x17\n\x15_mobile_link_templateB\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\x15\n\x13_external_seller_idB\x08\n\x06_pauseB\x15\n\x13_virtual_model_linkB\x13\n\x11_structured_titleB\x19\n\x17_structured_description\"p\n\x03Tax\x12\x0c\n\x04rate\x18\x01 \x01(\x01\x12\x0f\n\x07\x63ountry\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\t\x12\x10\n\x08tax_ship\x18\x04 \x01(\x08\x12\x13\n\x0blocation_id\x18\x05 \x01(\x03\x12\x13\n\x0bpostal_code\x18\x06 \x01(\t\"-\n\x0eShippingWeight\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"0\n\x11ShippingDimension\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"5\n\x16UnitPricingBaseMeasure\x12\r\n\x05value\x18\x01 \x01(\x03\x12\x0c\n\x04unit\x18\x02 \x01(\t\"1\n\x12UnitPricingMeasure\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"\xa4\x01\n\x10SubscriptionCost\x12L\n\x06period\x18\x01 \x01(\x0e\x32<.google.shopping.merchant.products.v1beta.SubscriptionPeriod\x12\x15\n\rperiod_length\x18\x02 \x01(\x03\x12+\n\x06\x61mount\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price\"\xbb\x01\n\x0bInstallment\x12\x0e\n\x06months\x18\x01 \x01(\x03\x12+\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x35\n\x0b\x64ownpayment\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x88\x01\x01\x12\x18\n\x0b\x63redit_type\x18\x04 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_downpaymentB\x0e\n\x0c_credit_type\"B\n\rLoyaltyPoints\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cpoints_value\x18\x02 \x01(\x03\x12\r\n\x05ratio\x18\x03 \x01(\x01\"\xc1\x03\n\x0eLoyaltyProgram\x12\x1a\n\rprogram_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ntier_label\x18\x02 \x01(\tH\x01\x88\x01\x01\x12/\n\x05price\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x02\x88\x01\x01\x12\x41\n\x17\x63\x61shback_for_future_use\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x03\x88\x01\x01\x12\x1b\n\x0eloyalty_points\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12?\n\x1bmember_price_effective_date\x18\x06 \x01(\x0b\x32\x15.google.type.IntervalH\x05\x88\x01\x01\x12\x1b\n\x0eshipping_label\x18\x07 \x01(\tH\x06\x88\x01\x01\x42\x10\n\x0e_program_labelB\r\n\x0b_tier_labelB\x08\n\x06_priceB\x1a\n\x18_cashback_for_future_useB\x11\n\x0f_loyalty_pointsB\x1e\n\x1c_member_price_effective_dateB\x11\n\x0f_shipping_label\"\x83\x03\n\x08Shipping\x12*\n\x05price\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x0f\n\x07\x63ountry\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\t\x12\x0f\n\x07service\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\x03\x12\x1b\n\x13location_group_name\x18\x06 \x01(\t\x12\x13\n\x0bpostal_code\x18\x07 \x01(\t\x12\x1e\n\x11min_handling_time\x18\x08 \x01(\x03H\x00\x88\x01\x01\x12\x1e\n\x11max_handling_time\x18\t \x01(\x03H\x01\x88\x01\x01\x12\x1d\n\x10min_transit_time\x18\n \x01(\x03H\x02\x88\x01\x01\x12\x1d\n\x10max_transit_time\x18\x0b \x01(\x03H\x03\x88\x01\x01\x42\x14\n\x12_min_handling_timeB\x14\n\x12_max_handling_timeB\x13\n\x11_min_transit_timeB\x13\n\x11_max_transit_time\"\x88\x01\n\x15\x46reeShippingThreshold\x12\x14\n\x07\x63ountry\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x39\n\x0fprice_threshold\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x01\x88\x01\x01\x42\n\n\x08_countryB\x12\n\x10_price_threshold\"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\"\xfb\x01\n\rCertification\x12$\n\x17\x63\x65rtification_authority\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12\x63\x65rtification_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12\x63\x65rtification_code\x18\x03 \x01(\tH\x02\x88\x01\x01\x12 \n\x13\x63\x65rtification_value\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x1a\n\x18_certification_authorityB\x15\n\x13_certification_nameB\x15\n\x13_certification_codeB\x16\n\x14_certification_value\"t\n\x16ProductStructuredTitle\x12 \n\x13\x64igital_source_type\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x63ontent\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x16\n\x14_digital_source_typeB\n\n\x08_content\"z\n\x1cProductStructuredDescription\x12 \n\x13\x64igital_source_type\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x63ontent\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x16\n\x14_digital_source_typeB\n\n\x08_content\"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\"\xf7\x07\n\rProductStatus\x12g\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32I.google.shopping.merchant.products.v1beta.ProductStatus.DestinationStatus\x12\x61\n\x11item_level_issues\x18\x04 \x03(\x0b\x32\x46.google.shopping.merchant.products.v1beta.ProductStatus.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\xc1\x01\n\x11\x44\x65stinationStatus\x12V\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnum\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\xb0\x03\n\x0eItemLevelIssue\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x61\n\x08severity\x18\x02 \x01(\x0e\x32O.google.shopping.merchant.products.v1beta.ProductStatus.ItemLevelIssue.Severity\x12\x12\n\nresolution\x18\x03 \x01(\t\x12\x11\n\tattribute\x18\x04 \x01(\t\x12V\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnum\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\"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\"\xa5\x02\n\x1f\x43loudExportAdditionalProperties\x12\x1a\n\rproperty_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\ntext_value\x18\x02 \x03(\t\x12\x17\n\nbool_value\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12\x11\n\tint_value\x18\x04 \x03(\x03\x12\x13\n\x0b\x66loat_value\x18\x05 \x03(\x02\x12\x16\n\tmin_value\x18\x06 \x01(\x02H\x02\x88\x01\x01\x12\x16\n\tmax_value\x18\x07 \x01(\x02H\x03\x88\x01\x01\x12\x16\n\tunit_code\x18\x08 \x01(\tH\x04\x88\x01\x01\x42\x10\n\x0e_property_nameB\r\n\x0b_bool_valueB\x0c\n\n_min_valueB\x0c\n\n_max_valueB\x0c\n\n_unit_code\"\xa1\x02\n\x1eProductSustainabilityIncentive\x12-\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x12\x14\n\npercentage\x18\x03 \x01(\x01H\x00\x12`\n\x04type\x18\x01 \x01(\x0e\x32M.google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.TypeH\x01\x88\x01\x01\"F\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rEV_TAX_CREDIT\x10\x01\x12\x15\n\x11\x45V_PRICE_DISCOUNT\x10\x02\x42\x07\n\x05valueB\x07\n\x05_type\"\xb4\x01\n\x12\x41utomatedDiscounts\x12\x30\n\x0bprior_price\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12<\n\x17prior_price_progressive\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12.\n\tgad_price\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\x95\x01\n,com.google.shopping.merchant.products.v1betaB\x13ProductsCommonProtoP\x01ZNcloud.google.com/go/shopping/merchant/products/apiv1beta/productspb;productspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Products + module V1beta + Attributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.Attributes").msgclass + Tax = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.Tax").msgclass + ShippingWeight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ShippingWeight").msgclass + ShippingDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ShippingDimension").msgclass + UnitPricingBaseMeasure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.UnitPricingBaseMeasure").msgclass + UnitPricingMeasure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.UnitPricingMeasure").msgclass + SubscriptionCost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.SubscriptionCost").msgclass + Installment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.Installment").msgclass + LoyaltyPoints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.LoyaltyPoints").msgclass + LoyaltyProgram = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.LoyaltyProgram").msgclass + Shipping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.Shipping").msgclass + FreeShippingThreshold = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.FreeShippingThreshold").msgclass + ProductDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductDetail").msgclass + Certification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.Certification").msgclass + ProductStructuredTitle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductStructuredTitle").msgclass + ProductStructuredDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductStructuredDescription").msgclass + ProductDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductDimension").msgclass + ProductWeight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductWeight").msgclass + ProductStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductStatus").msgclass + ProductStatus::DestinationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductStatus.DestinationStatus").msgclass + ProductStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductStatus.ItemLevelIssue").msgclass + ProductStatus::ItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductStatus.ItemLevelIssue.Severity").enummodule + CloudExportAdditionalProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties").msgclass + ProductSustainabilityIncentive = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive").msgclass + ProductSustainabilityIncentive::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.Type").enummodule + AutomatedDiscounts = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.AutomatedDiscounts").msgclass + SubscriptionPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.SubscriptionPeriod").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_pb.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_pb.rb new file mode 100644 index 000000000000..e20488231365 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/products/v1beta/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/merchant/products/v1beta/products_common_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n7google/shopping/merchant/products/v1beta/products.proto\x12(google.shopping.merchant.products.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/merchant/products/v1beta/products_common.proto\x1a google/shopping/type/types.proto\"\x92\x05\n\x07Product\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x07\x63hannel\x18\x02 \x01(\x0e\x32).google.shopping.type.Channel.ChannelEnumB\x03\xe0\x41\x03\x12\x15\n\x08offer_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63ontent_language\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nfeed_label\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x61ta_source\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12 \n\x0eversion_number\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12M\n\nattributes\x18\x08 \x01(\x0b\x32\x34.google.shopping.merchant.products.v1beta.AttributesB\x03\xe0\x41\x03\x12\x45\n\x11\x63ustom_attributes\x18\t \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x03\x12T\n\x0eproduct_status\x18\n \x01(\x0b\x32\x37.google.shopping.merchant.products.v1beta.ProductStatusB\x03\xe0\x41\x03\x12^\n\x13\x61utomated_discounts\x18\x0c \x01(\x0b\x32<.google.shopping.merchant.products.v1beta.AutomatedDiscountsB\x03\xe0\x41\x03:N\xea\x41K\n\"merchantapi.googleapis.com/Product\x12%accounts/{account}/products/{product}B\x11\n\x0f_version_number\"M\n\x11GetProductRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Product\"x\n\x13ListProductsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"merchantapi.googleapis.com/Product\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"t\n\x14ListProductsResponse\x12\x43\n\x08products\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.products.v1beta.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xe7\x03\n\x0fProductsService\x12\xba\x01\n\nGetProduct\x12;.google.shopping.merchant.products.v1beta.GetProductRequest\x1a\x31.google.shopping.merchant.products.v1beta.Product\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/products/v1beta/{name=accounts/*/products/*}\x12\xcd\x01\n\x0cListProducts\x12=.google.shopping.merchant.products.v1beta.ListProductsRequest\x1a>.google.shopping.merchant.products.v1beta.ListProductsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/products/v1beta/{parent=accounts/*}/products\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xca\x01\n,com.google.shopping.merchant.products.v1betaB\rProductsProtoP\x01ZNcloud.google.com/go/shopping/merchant/products/apiv1beta/productspb;productspb\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 Products + module V1beta + Product = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.Product").msgclass + GetProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.GetProductRequest").msgclass + ListProductsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ListProductsRequest").msgclass + ListProductsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ListProductsResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service.rb new file mode 100644 index 000000000000..87f9782eaeef --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_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/products/v1beta/version" + +require "google/shopping/merchant/products/v1beta/products_service/credentials" +require "google/shopping/merchant/products/v1beta/products_service/paths" +require "google/shopping/merchant/products/v1beta/products_service/client" +require "google/shopping/merchant/products/v1beta/products_service/rest" + +module Google + module Shopping + module Merchant + module Products + module V1beta + ## + # Service to use Product resource. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/products/v1beta/products_service" + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/products/v1beta/products_service/rest" + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new + # + module ProductsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "products_service", "helpers.rb" +require "google/shopping/merchant/products/v1beta/products_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/client.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/client.rb new file mode 100644 index 000000000000..9d628e10b9b8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/client.rb @@ -0,0 +1,606 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/products/v1beta/products_pb" + +module Google + module Shopping + module Merchant + module Products + module V1beta + module ProductsService + ## + # Client for the ProductsService service. + # + # Service to use Product resource. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :products_service_stub + + ## + # Configure the ProductsService Client class. + # + # See {::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProductsService clients + # ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.configure do |config| + # config.timeout = 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", "Products", "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 ProductsService Client instance. + # + # The configuration is set to the derived mode, meaning that values 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::Products::V1beta::ProductsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @products_service_stub.universe_domain + end + + ## + # Create a new ProductsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProductsService 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/products/v1beta/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 + + @products_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @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 + @products_service_stub.logger + end + + # Service calls + + ## + # Retrieves the processed product from your Merchant 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_product(request, options = nil) + # Pass arguments to `get_product` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1beta::GetProductRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1beta::GetProductRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_product(name: nil) + # Pass arguments to `get_product` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the product to retrieve. + # Format: `accounts/{account}/products/{product}` + # where the last section `product` consists of 4 parts: + # `channel~content_language~feed_label~offer_id` + # example for product name is + # `accounts/123/products/online~en~US~sku123` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Products::V1beta::Product] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Products::V1beta::Product] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1beta::GetProductRequest.new + # + # # Call the get_product method. + # result = client.get_product request + # + # # The returned object is of type Google::Shopping::Merchant::Products::V1beta::Product. + # p result + # + def get_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1beta::GetProductRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_product.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Products::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_product.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @products_service_stub.call_rpc :get_product, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the processed products in your Merchant 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 product input, it may take several + # minutes before the updated processed product can be retrieved. + # + # @overload list_products(request, options = nil) + # Pass arguments to `list_products` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_products(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_products` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to list processed products for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # The maximum number of 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 products will be returned. + # @param page_token [::String] + # A page token, received from a previous `ListProducts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListProducts` 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::Products::V1beta::Product>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Products::V1beta::Product>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1beta::ListProductsRequest.new + # + # # Call the list_products method. + # result = client.list_products request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Products::V1beta::Product. + # p item + # end + # + def list_products request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_products.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Products::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_products.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @products_service_stub.call_rpc :list_products, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @products_service_stub, :list_products, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ProductsService API. + # + # This class represents the configuration for ProductsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_product to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_product.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_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::Merchant::Products::V1beta::ProductsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ProductsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_product` + # @return [::Gapic::Config::Method] + # + attr_reader :get_product + ## + # RPC-specific configuration for `list_products` + # @return [::Gapic::Config::Method] + # + attr_reader :list_products + + # @private + def initialize parent_rpcs = nil + get_product_config = parent_rpcs.get_product if parent_rpcs.respond_to? :get_product + @get_product = ::Gapic::Config::Method.new get_product_config + list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products + @list_products = ::Gapic::Config::Method.new list_products_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/credentials.rb new file mode 100644 index 000000000000..faeb5001f556 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_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 Products + module V1beta + module ProductsService + # Credentials for the ProductsService 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-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/paths.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/paths.rb new file mode 100644 index 000000000000..4926d100d288 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_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 Products + module V1beta + module ProductsService + # Path helper methods for the ProductsService 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-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest.rb new file mode 100644 index 000000000000..f97202d7f457 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_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/products/v1beta/version" + +require "google/shopping/merchant/products/v1beta/products_service/credentials" +require "google/shopping/merchant/products/v1beta/products_service/paths" +require "google/shopping/merchant/products/v1beta/products_service/rest/client" + +module Google + module Shopping + module Merchant + module Products + module V1beta + ## + # Service to use Product resource. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/products/v1beta/products_service/rest" + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new + # + module ProductsService + # 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/products/v1beta/products_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/client.rb new file mode 100644 index 000000000000..4f0b4b39a4f2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/client.rb @@ -0,0 +1,549 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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/products/v1beta/products_pb" +require "google/shopping/merchant/products/v1beta/products_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Products + module V1beta + module ProductsService + module Rest + ## + # REST client for the ProductsService service. + # + # Service to use Product resource. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :products_service_stub + + ## + # Configure the ProductsService Client class. + # + # See {::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProductsService clients + # ::Google::Shopping::Merchant::Products::V1beta::ProductsService::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", "Products", "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 ProductsService Client instance. + # + # The configuration is set to the derived mode, meaning that values 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::Products::V1beta::ProductsService::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 + @products_service_stub.universe_domain + end + + ## + # Create a new ProductsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProductsService 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 + + @products_service_stub = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @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 + @products_service_stub.logger + end + + # Service calls + + ## + # Retrieves the processed product from your Merchant 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_product(request, options = nil) + # Pass arguments to `get_product` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1beta::GetProductRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1beta::GetProductRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_product(name: nil) + # Pass arguments to `get_product` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the product to retrieve. + # Format: `accounts/{account}/products/{product}` + # where the last section `product` consists of 4 parts: + # `channel~content_language~feed_label~offer_id` + # example for product name is + # `accounts/123/products/online~en~US~sku123` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Products::V1beta::Product] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1beta::Product] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1beta::GetProductRequest.new + # + # # Call the get_product method. + # result = client.get_product request + # + # # The returned object is of type Google::Shopping::Merchant::Products::V1beta::Product. + # p result + # + def get_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1beta::GetProductRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_product.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Products::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_product.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @products_service_stub.get_product request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the processed products in your Merchant 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 product input, it may take several + # minutes before the updated processed product can be retrieved. + # + # @overload list_products(request, options = nil) + # Pass arguments to `list_products` via a request object, either of type + # {::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_products(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_products` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The account to list processed products for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # The maximum number of 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 products will be returned. + # @param page_token [::String] + # A page token, received from a previous `ListProducts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListProducts` 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::Products::V1beta::Product>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Products::V1beta::Product>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/products/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Products::V1beta::ListProductsRequest.new + # + # # Call the list_products method. + # result = client.list_products request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Products::V1beta::Product. + # p item + # end + # + def list_products request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_products.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Products::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_products.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @products_service_stub.list_products request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @products_service_stub, :list_products, "products", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ProductsService REST API. + # + # This class represents the configuration for ProductsService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_product to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_product.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_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. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the ProductsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_product` + # @return [::Gapic::Config::Method] + # + attr_reader :get_product + ## + # RPC-specific configuration for `list_products` + # @return [::Gapic::Config::Method] + # + attr_reader :list_products + + # @private + def initialize parent_rpcs = nil + get_product_config = parent_rpcs.get_product if parent_rpcs.respond_to? :get_product + @get_product = ::Gapic::Config::Method.new get_product_config + list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products + @list_products = ::Gapic::Config::Method.new list_products_config + + 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-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/service_stub.rb new file mode 100644 index 000000000000..5aba9aaa6400 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_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/products/v1beta/products_pb" + +module Google + module Shopping + module Merchant + module Products + module V1beta + module ProductsService + module Rest + ## + # REST service stub for the ProductsService 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_product REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::GetProductRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Products::V1beta::Product] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1beta::Product] + # A result object deserialized from the server's reply + def get_product request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_product_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_product", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Products::V1beta::Product.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_products REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Products::V1beta::ListProductsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Products::V1beta::ListProductsResponse] + # A result object deserialized from the server's reply + def list_products request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_products_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_products", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Products::V1beta::ListProductsResponse.decode_json response.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_product REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::GetProductRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_product_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/products/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_products REST call + # + # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_products_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/products/v1beta/{parent}/products", + 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-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_services_pb.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_services_pb.rb new file mode 100644 index 000000000000..0d596b062d0b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_services_pb.rb @@ -0,0 +1,57 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/products/v1beta/products.proto for package 'google.shopping.merchant.products.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/products/v1beta/products_pb' + +module Google + module Shopping + module Merchant + module Products + module V1beta + module ProductsService + # Service to use Product resource. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.products.v1beta.ProductsService' + + # Retrieves the processed product from your Merchant Center account. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the updated final product can be retrieved. + rpc :GetProduct, ::Google::Shopping::Merchant::Products::V1beta::GetProductRequest, ::Google::Shopping::Merchant::Products::V1beta::Product + # Lists the processed products in your Merchant 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 product input, it may take several + # minutes before the updated processed product can be retrieved. + rpc :ListProducts, ::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest, ::Google::Shopping::Merchant::Products::V1beta::ListProductsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/rest.rb new file mode 100644 index 000000000000..f6dac740f63e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/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/products/v1beta/product_inputs_service/rest" +require "google/shopping/merchant/products/v1beta/products_service/rest" +require "google/shopping/merchant/products/v1beta/version" + +module Google + module Shopping + module Merchant + module Products + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/products/v1beta/rest" + # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new + # + module V1beta + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/version.rb new file mode 100644 index 000000000000..2ec9a45fc313 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/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 Products + module V1beta + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..03467a3756be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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. + # + # Note: This field should not be used in most cases. + 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. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # 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-products-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 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-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/productinputs.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/productinputs.rb new file mode 100644 index 000000000000..8890f7c8a515 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/productinputs.rb @@ -0,0 +1,213 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Products + module V1beta + # This resource represents input data you submit for a product, not the + # processed product that you see in Merchant Center, in Shopping ads, or + # across Google surfaces. Product inputs, rules and supplemental data source + # data are combined to create the processed + # {::Google::Shopping::Merchant::Products::V1beta::Product Product}. For more + # information, see [Manage products](/merchant/api/guides/products/overview). + # + # Required product input attributes to pass data validation checks are + # primarily defined in the [Products Data + # Specification](https://support.google.com/merchants/answer/188494). + # + # The following attributes are required: + # {::Google::Shopping::Merchant::Products::V1beta::Product#feed_label feedLabel}, + # {::Google::Shopping::Merchant::Products::V1beta::Product#content_language contentLanguage} + # and {::Google::Shopping::Merchant::Products::V1beta::Product#offer_id offerId}. + # + # After inserting, updating, or deleting a product input, it may take several + # minutes before the processed product can be retrieved. + # + # All fields in the product input and its sub-messages match the English name + # of their corresponding attribute in the [Products Data + # Specification](https://support.google.com/merchants/answer/188494) with + # [some exceptions](https://support.google.com/merchants/answer/7052112). + # The following reference documentation lists the field names in the + # **camelCase** casing style while the Products Data Specification lists the + # names in the **snake_case** casing style. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the product input. + # Format: `accounts/{account}/productInputs/{productinput}` + # where the last section `productinput` consists of 4 parts: + # `channel~content_language~feed_label~offer_id` + # example for product input name is + # `accounts/123/productInputs/online~en~US~sku123` + # @!attribute [r] product + # @return [::String] + # Output only. The name of the processed product. + # Format: `accounts/{account}/products/{product}` + # @!attribute [rw] channel + # @return [::Google::Shopping::Type::Channel::ChannelEnum] + # Immutable. The + # [channel](https://support.google.com/merchants/answer/7361332) of the + # product. + # @!attribute [rw] offer_id + # @return [::String] + # Required. Immutable. Your unique identifier for the product. This is the + # same for the product input and processed product. Leading and trailing + # whitespaces are stripped and multiple whitespaces are replaced by a single + # whitespace upon submission. See the [products data + # specification](https://support.google.com/merchants/answer/188494#id) for + # details. + # @!attribute [rw] content_language + # @return [::String] + # Required. Immutable. The two-letter [ISO + # 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the + # product. + # @!attribute [rw] feed_label + # @return [::String] + # Required. Immutable. The label that lets you categorize and identify your + # products. The maximum allowed characters are 20, and the supported + # characters are `A-Z`, `0-9`, hyphen, and underscore. The feed label must + # not include any spaces. For more information, see [Using feed + # labels](//support.google.com/merchants/answer/14994087). + # @!attribute [rw] version_number + # @return [::Integer] + # Optional. Immutable. Represents the existing version (freshness) of the + # product, which can be used to preserve the right order when multiple + # updates are done at the same time. + # + # If set, the insertion is prevented when version number is lower than + # the current version number of the existing product. Re-insertion (for + # example, product refresh after 30 days) can be performed with the current + # `version_number`. + # + # Only supported for insertions into primary data sources. + # Do not set this field for updates. + # Do not set this field for insertions into supplemental data sources. + # + # If the operation is prevented, the aborted exception will be + # thrown. + # @!attribute [rw] attributes + # @return [::Google::Shopping::Merchant::Products::V1beta::Attributes] + # Optional. A list of product attributes. + # @!attribute [rw] custom_attributes + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Optional. A list of custom (merchant-provided) attributes. It can also be + # used for submitting any attribute of the data specification in its generic + # form (for example, + # `{ "name": "size type", "value": "regular" }`). + # This is useful for submitting attributes not explicitly exposed by the + # API. + # Maximum allowed number of characters for each + # custom attribute is 10240 (represents sum of characters for name and + # value). Maximum 2500 custom attributes can be set per product, with total + # size of 102.4kB. Underscores in custom attribute names are replaced by + # spaces upon insertion. + class ProductInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the InsertProductInput method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account where this product will be inserted. + # Format: `accounts/{account}` + # @!attribute [rw] product_input + # @return [::Google::Shopping::Merchant::Products::V1beta::ProductInput] + # Required. The product input to insert. + # @!attribute [rw] data_source + # @return [::String] + # Required. The primary or supplemental product data source name. If the + # product already exists and data source provided is different, then the + # product will be moved to a new data source. For more information, see + # [Overview of Data sources + # sub-API](/merchant/api/guides/data-sources/overview). + # + # Only API data sources are supported. + # + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + class InsertProductInputRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the UpdateProductInput method. + # The product (primary input) must exist for the update to succeed. + # If the update is for a primary product input, the existing primary product + # input must be from the same data source. + # @!attribute [rw] product_input + # @return [::Google::Shopping::Merchant::Products::V1beta::ProductInput] + # Required. The product input resource to update. Information you submit will + # be applied to the processed product as well. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of 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 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 product replacement is not supported. + # @!attribute [rw] data_source + # @return [::String] + # Required. The primary or supplemental product data source where + # `data_source` name identifies the product input to be updated. + # + # Only API data sources are supported. + # + # Format: `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + class UpdateProductInputRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteProductInput method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the product input resource to delete. + # Format: `accounts/{account}/productInputs/{product}` + # where the last section `product` consists of 4 parts: + # `channel~content_language~feed_label~offer_id` + # example for product name is + # `accounts/123/productInputs/online~en~US~sku123`. + # @!attribute [rw] data_source + # @return [::String] + # Required. The primary or supplemental data source from which the product + # input should be deleted. Format: + # `accounts/{account}/dataSources/{datasource}`. For example, + # `accounts/123456/dataSources/104628`. + class DeleteProductInputRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products.rb new file mode 100644 index 000000000000..b4d830bc43e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products.rb @@ -0,0 +1,166 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Products + module V1beta + # The processed product, built from multiple [product + # inputs][google.shopping.merchant.products.v1main.ProductInput] + # after applying rules and supplemental data sources. This processed product + # matches what is shown in your Merchant Center account. Each product is built + # from exactly one primary data source product input, and multiple supplemental + # data source inputs. After inserting, updating, or deleting a product input, + # it may take several minutes before the updated processed product can be + # retrieved. + # + # All fields in the processed product and its sub-messages match the name of + # their corresponding attribute in the [Product data + # specification](https://support.google.com/merchants/answer/7052112) with some + # exceptions. + # @!attribute [rw] name + # @return [::String] + # The name of the product. + # Format: + # `accounts/{account}/products/{product}` where the last + # section `product` consists of 4 parts: + # `channel~content_language~feed_label~offer_id` + # example for product name is `accounts/123/products/online~en~US~sku123` + # @!attribute [r] channel + # @return [::Google::Shopping::Type::Channel::ChannelEnum] + # Output only. The + # [channel](https://support.google.com/merchants/answer/7361332) of the + # product. + # @!attribute [r] offer_id + # @return [::String] + # Output only. Your unique identifier for the product. This is the same for + # the product input and processed product. Leading and trailing whitespaces + # are stripped and multiple whitespaces are replaced by a single whitespace + # upon submission. See the [product data + # specification](https://support.google.com/merchants/answer/188494#id) for + # details. + # @!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 lets you categorize and identify your products. + # The maximum allowed characters is 20 and the supported characters are`A-Z`, + # `0-9`, hyphen and underscore. The feed label must not include any spaces. + # For more information, see [Using feed + # labels](//support.google.com/merchants/answer/14994087) + # @!attribute [r] data_source + # @return [::String] + # Output only. The primary data source of the product. + # @!attribute [r] version_number + # @return [::Integer] + # Output only. Represents the existing version (freshness) of the product, + # which can be used to preserve the right order when multiple updates are + # done at the same time. + # + # If set, the insertion is prevented when version number is lower than + # the current version number of the existing product. Re-insertion (for + # example, product refresh after 30 days) can be performed with the current + # `version_number`. + # + # Only supported for insertions into primary data sources. + # + # If the operation is prevented, the aborted exception will be + # thrown. + # @!attribute [r] attributes + # @return [::Google::Shopping::Merchant::Products::V1beta::Attributes] + # Output only. A list of product attributes. + # @!attribute [r] custom_attributes + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Output only. A list of custom (merchant-provided) attributes. It can also + # be used to submit any attribute of the data 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] product_status + # @return [::Google::Shopping::Merchant::Products::V1beta::ProductStatus] + # Output only. The status of a product, data validation issues, that is, + # information about a product computed asynchronously. + # @!attribute [r] automated_discounts + # @return [::Google::Shopping::Merchant::Products::V1beta::AutomatedDiscounts] + # Output only. The automated discounts information for the product. + class Product + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the GetProduct method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the product to retrieve. + # Format: `accounts/{account}/products/{product}` + # where the last section `product` consists of 4 parts: + # `channel~content_language~feed_label~offer_id` + # example for product name is + # `accounts/123/products/online~en~US~sku123` + class GetProductRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListProducts method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to list processed products for. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of 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 products will be returned. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListProducts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListProducts` must + # match the call that provided the page token. + class ListProductsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListProducts method. + # @!attribute [rw] products + # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::Product>] + # The processed products from the specified account. These are your processed + # products after applying rules and supplemental data sources. + # @!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 ListProductsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products_common.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products_common.rb new file mode 100644 index 000000000000..3328f31f3069 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products_common.rb @@ -0,0 +1,1029 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Products + module V1beta + # Attributes. + # @!attribute [rw] identifier_exists + # @return [::Boolean] + # Set this value to false when the item does not have unique product + # identifiers appropriate to its category, such as GTIN, MPN, and brand. + # Defaults to true, if not provided. + # @!attribute [rw] is_bundle + # @return [::Boolean] + # Whether the item is a business-defined sub-API. A [sub-API] + # (https://support.google.com/merchants/answer/6324449) is a custom + # grouping of different products sold by a business for a single price. + # @!attribute [rw] title + # @return [::String] + # Title of the item. + # @!attribute [rw] description + # @return [::String] + # Description of the item. + # @!attribute [rw] link + # @return [::String] + # URL directly linking to your item's page on your online store. + # @!attribute [rw] mobile_link + # @return [::String] + # URL for the mobile-optimized version of your item's landing page. + # @!attribute [rw] canonical_link + # @return [::String] + # URL for the canonical version of your item's landing page. + # @!attribute [rw] image_link + # @return [::String] + # URL of an image of the item. + # @!attribute [rw] additional_image_links + # @return [::Array<::String>] + # Additional URLs of images of the item. + # @!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. + # @!attribute [rw] disclosure_date + # @return [::Google::Protobuf::Timestamp] + # The date time when an offer becomes visible in search results across + # Google’s YouTube surfaces, in [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + # See [Disclosure date](https://support.google.com/merchants/answer/13034208) + # for more information. + # @!attribute [rw] adult + # @return [::Boolean] + # Set to true if the item is targeted towards adults. + # @!attribute [rw] age_group + # @return [::String] + # Target [age group](https://support.google.com/merchants/answer/6324463) of + # the item. + # @!attribute [rw] availability + # @return [::String] + # [Availability](https://support.google.com/merchants/answer/6324448) status + # of the item. For example, "in_stock" or "out_of_stock". + # @!attribute [rw] availability_date + # @return [::Google::Protobuf::Timestamp] + # The day a pre-ordered product becomes available for delivery, in [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + # @!attribute [rw] brand + # @return [::String] + # [Brand](https://support.google.com/merchants/answer/6324351) of the item. + # For example, "Google". + # @!attribute [rw] color + # @return [::String] + # [Color](https://support.google.com/merchants/answer/6324487) of the item. + # For example, "red". + # @!attribute [rw] condition + # @return [::String] + # [Condition](https://support.google.com/merchants/answer/6324469) or state + # of the item. For example, "new" or "used". + # @!attribute [rw] gender + # @return [::String] + # Target [gender](https://support.google.com/merchants/answer/6324479) of the + # item. For example, "male" or "female". + # @!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] gtin + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Array<::String>] + # Global Trade Item Numbers + # ([GTIN](https://support.google.com/merchants/answer/188494#gtin)) of the + # item. + # You can provide up to 10 GTINs. + # + # Deprecated: Use `gtins` instead. + # @!attribute [rw] gtins + # @return [::Array<::String>] + # Global Trade Item Numbers + # ([GTIN](https://support.google.com/merchants/answer/188494#gtin)) of the + # item. + # You can provide up to 10 GTINs. + # @!attribute [rw] item_group_id + # @return [::String] + # Shared identifier for all variants of the same product. + # @!attribute [rw] material + # @return [::String] + # The [material](https://support.google.com/merchants/answer/6324410) of + # which the item is made. For example, "Leather" or "Cotton". + # @!attribute [rw] mpn + # @return [::String] + # Manufacturer Part Number + # ([MPN](https://support.google.com/merchants/answer/188494#mpn)) of the + # item. + # @!attribute [rw] pattern + # @return [::String] + # The item's [pattern](https://support.google.com/merchants/answer/6324483). + # For example, polka dots. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Price of the item. + # @!attribute [rw] maximum_retail_price + # @return [::Google::Shopping::Type::Price] + # Maximum retail price (MRP) of the item. Applicable to India only. + # @!attribute [rw] installment + # @return [::Google::Shopping::Merchant::Products::V1beta::Installment] + # Number and amount of installments to pay for an item. + # @!attribute [rw] subscription_cost + # @return [::Google::Shopping::Merchant::Products::V1beta::SubscriptionCost] + # Number of periods (months or years) and amount of payment per period + # for an item with an associated subscription contract. + # @!attribute [rw] loyalty_points + # @return [::Google::Shopping::Merchant::Products::V1beta::LoyaltyPoints] + # Loyalty points that users receive after purchasing the item. Japan only. + # @!attribute [rw] loyalty_programs + # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::LoyaltyProgram>] + # A list of loyalty program information that is used to surface loyalty + # benefits (for example, better pricing, points, etc) to the user of this + # item. + # @!attribute [rw] product_types + # @return [::Array<::String>] + # Categories of the item (formatted as in [product data + # specification](https://support.google.com/merchants/answer/7052112#product_category)). + # @!attribute [rw] sale_price + # @return [::Google::Shopping::Type::Price] + # Advertised sale price of the item. + # @!attribute [rw] sale_price_effective_date + # @return [::Google::Type::Interval] + # Date range during which the item is on sale, see [product data + # specification](https://support.google.com/merchants/answer/7052112#price_and_availability). + # @!attribute [rw] sell_on_google_quantity + # @return [::Integer] + # The quantity of the product that is available for selling on Google. + # Supported only for online products. + # @!attribute [rw] product_height + # @return [::Google::Shopping::Merchant::Products::V1beta::ProductDimension] + # The height of the product in the units provided. The value must be + # between + # 0 (exclusive) and 3000 (inclusive). + # @!attribute [rw] product_length + # @return [::Google::Shopping::Merchant::Products::V1beta::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::Merchant::Products::V1beta::ProductDimension] + # The width of the product in the units provided. The value must be between + # 0 (exclusive) and 3000 (inclusive). + # @!attribute [rw] product_weight + # @return [::Google::Shopping::Merchant::Products::V1beta::ProductWeight] + # The weight of the product in the units provided. The value must be + # between 0 (exclusive) and 2000 (inclusive). + # @!attribute [rw] shipping + # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::Shipping>] + # Shipping rules. + # @!attribute [rw] free_shipping_threshold + # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::FreeShippingThreshold>] + # Conditions to be met for a product to have free shipping. + # @!attribute [rw] shipping_weight + # @return [::Google::Shopping::Merchant::Products::V1beta::ShippingWeight] + # Weight of the item for shipping. + # @!attribute [rw] shipping_length + # @return [::Google::Shopping::Merchant::Products::V1beta::ShippingDimension] + # Length of the item for shipping. + # @!attribute [rw] shipping_width + # @return [::Google::Shopping::Merchant::Products::V1beta::ShippingDimension] + # Width of the item for shipping. + # @!attribute [rw] shipping_height + # @return [::Google::Shopping::Merchant::Products::V1beta::ShippingDimension] + # Height of the item for shipping. + # @!attribute [rw] max_handling_time + # @return [::Integer] + # Maximal product handling time (in business days). + # @!attribute [rw] min_handling_time + # @return [::Integer] + # Minimal product handling time (in business days). + # @!attribute [rw] shipping_label + # @return [::String] + # The shipping label of the product, used to group product in account-level + # shipping rules. + # @!attribute [rw] transit_time_label + # @return [::String] + # The transit time label of the product, used to group product in + # account-level transit time tables. + # @!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 + # [Size](https://support.google.com/merchants/answer/6324492). + # @!attribute [rw] size_system + # @return [::String] + # System in which the size is specified. Recommended for apparel items. + # For example, "US", "UK", "DE". + # For more information, see + # [Size system](https://support.google.com/merchants/answer/6324502). + # @!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). + # For example, "petite", "plus size". + # @!attribute [rw] taxes + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::Tax>] + # Tax information. + # @!attribute [rw] tax_category + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # The [tax category](https://support.google.com/merchants/answer/7569847) of + # the product. + # @!attribute [rw] energy_efficiency_class + # @return [::String] + # The energy efficiency class as defined in EU directive 2010/30/EU. + # @!attribute [rw] min_energy_efficiency_class + # @return [::String] + # The energy efficiency class as defined in EU directive 2010/30/EU. + # @!attribute [rw] max_energy_efficiency_class + # @return [::String] + # The energy efficiency class as defined in EU directive 2010/30/EU. + # @!attribute [rw] unit_pricing_measure + # @return [::Google::Shopping::Merchant::Products::V1beta::UnitPricingMeasure] + # The measure and dimension of an item. + # @!attribute [rw] unit_pricing_base_measure + # @return [::Google::Shopping::Merchant::Products::V1beta::UnitPricingBaseMeasure] + # The preference of the denominator of the unit price. + # @!attribute [rw] multipack + # @return [::Integer] + # The number of identical products in a business-defined multipack. + # @!attribute [rw] ads_grouping + # @return [::String] + # Used to group items in an arbitrary way. Only for CPA%, discouraged + # otherwise. For more information, see + # [Display ads + # attribute](https://support.google.com/merchants/answer/6069387). + # @!attribute [rw] ads_labels + # @return [::Array<::String>] + # Similar to ads_grouping, but only works on CPC. + # @!attribute [rw] ads_redirect + # @return [::String] + # Allows advertisers to override the item URL when the product is shown + # within the context of Product ads. + # @!attribute [rw] cost_of_goods_sold + # @return [::Google::Shopping::Type::Price] + # Cost of goods sold. Used for gross profit reporting. + # @!attribute [rw] product_details + # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::ProductDetail>] + # Technical specification or additional product details. + # @!attribute [rw] product_highlights + # @return [::Array<::String>] + # Bullet points describing the most relevant [product + # highlights](https://support.google.com/merchants/answer/9216100). + # @!attribute [rw] display_ads_id + # @return [::String] + # An identifier for an item for dynamic remarketing campaigns. + # @!attribute [rw] display_ads_similar_ids + # @return [::Array<::String>] + # Advertiser-specified recommendations. For more information, see + # [Display ads attribute + # specification](https://support.google.com/merchants/answer/6069387). + # @!attribute [rw] display_ads_title + # @return [::String] + # Title of an item for dynamic remarketing campaigns. + # @!attribute [rw] display_ads_link + # @return [::String] + # URL directly to your item's landing page for dynamic remarketing + # campaigns. + # @!attribute [rw] display_ads_value + # @return [::Float] + # Offer margin for dynamic remarketing campaigns. For more information, see + # [Display ads + # attribute](https://support.google.com/merchants/answer/6069387). + # @!attribute [rw] promotion_ids + # @return [::Array<::String>] + # The unique ID of a promotion. + # @!attribute [rw] pickup_method + # @return [::String] + # The [pickup](https://support.google.com/merchants/answer/14634021) option + # for the item. + # @!attribute [rw] pickup_sla + # @return [::String] + # Item store pickup timeline. For more information, see + # [Pickup SLA](https://support.google.com/merchants/answer/14635400). + # @!attribute [rw] link_template + # @return [::String] + # [Link template](https://support.google.com/merchants/answer/13871172) for + # business hosted local storefront. + # @!attribute [rw] mobile_link_template + # @return [::String] + # [Link template](https://support.google.com/merchants/answer/13870216) for + # business hosted local storefront optimized for mobile + # devices. + # @!attribute [rw] custom_label_0 + # @return [::String] + # [Custom label 0](https://support.google.com/merchants/answer/6324473) for + # custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_1 + # @return [::String] + # [Custom label 1](https://support.google.com/merchants/answer/6324473) + # for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_2 + # @return [::String] + # [Custom label 2](https://support.google.com/merchants/answer/6324473) + # for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_3 + # @return [::String] + # [Custom label 3](https://support.google.com/merchants/answer/6324473) + # for custom grouping of items in a Shopping campaign. + # @!attribute [rw] custom_label_4 + # @return [::String] + # [Custom label 4](https://support.google.com/merchants/answer/6324473) for + # custom grouping of items in a Shopping campaign. + # @!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`. + # + # For more information, see + # [Included + # destination](https://support.google.com/merchants/answer/7501026). + # + # Note: We recommend setting destinations on datasources level for most use + # cases. Use this field within products to only setup exceptions. + # @!attribute [rw] excluded_destinations + # @return [::Array<::String>] + # The list of destinations to exclude for this target (corresponds to + # unchecked check boxes in Merchant Center). + # + # For more information, see + # [Excluded + # destination](https://support.google.com/merchants/answer/6324486). + # + # Note: We recommend setting destinations on datasources level for most use + # cases. Use this field within products to only setup exceptions. + # @!attribute [rw] shopping_ads_excluded_countries + # @return [::Array<::String>] + # List of country codes [(ISO 3166-1 + # alpha-2)](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) to exclude the + # offer from Shopping Ads destination. Countries from this list are removed + # from countries configured in data source settings. + # @!attribute [rw] external_seller_id + # @return [::String] + # Required for multi-seller accounts. Use this attribute if you're a + # marketplace uploading products for various sellers to your multi-seller + # account. + # @!attribute [rw] pause + # @return [::String] + # Publication of this item will be temporarily + # [paused](https://support.google.com/merchants/answer/11909930). + # @!attribute [rw] lifestyle_image_links + # @return [::Array<::String>] + # Additional URLs of lifestyle images of the item, used to explicitly + # identify images that showcase your item in a real-world context. See the + # [Help Center article](https://support.google.com/merchants/answer/9103186) + # for more information. + # @!attribute [rw] cloud_export_additional_properties + # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::CloudExportAdditionalProperties>] + # Extra fields to export to the Cloud Retail program. + # @!attribute [rw] virtual_model_link + # @return [::String] + # URL of the 3D image of the item. See the + # [Help Center article](https://support.google.com/merchants/answer/13674896) + # for more information. + # @!attribute [rw] certifications + # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::Certification>] + # Product Certifications, for example for energy efficiency labeling of + # products recorded in the [EU EPREL](https://eprel.ec.europa.eu/screen/home) + # database. See the [Help + # Center](https://support.google.com/merchants/answer/13528839) + # article for more information. + # @!attribute [rw] structured_title + # @return [::Google::Shopping::Merchant::Products::V1beta::ProductStructuredTitle] + # Structured title, for algorithmically (AI)-generated titles. + # @!attribute [rw] structured_description + # @return [::Google::Shopping::Merchant::Products::V1beta::ProductStructuredDescription] + # Structured description, for algorithmically (AI)-generated descriptions. + # @!attribute [rw] auto_pricing_min_price + # @return [::Google::Shopping::Type::Price] + # A safeguard in the [automated discounts] + # (https://support.google.com/merchants/answer/10295759) and + # "Dynamic Promotions" + # (https://support.google.com/merchants/answer/13949249) projects, + # ensuring that discounts on business offers do not fall below this value, + # thereby preserving the offer's value and profitability. + # @!attribute [rw] sustainability_incentives + # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::ProductSustainabilityIncentive>] + # The list of sustainability incentive programs. + class Attributes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Tax of the product. + # @!attribute [rw] rate + # @return [::Float] + # The percentage of tax rate that applies to the item price. + # @!attribute [rw] country + # @return [::String] + # The country within which the item is taxed, specified as a [CLDR + # territory + # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml). + # @!attribute [rw] region + # @return [::String] + # The geographic region to which the tax rate applies. + # @!attribute [rw] tax_ship + # @return [::Boolean] + # Set to true if tax is charged on shipping. + # @!attribute [rw] location_id + # @return [::Integer] + # The numeric ID of a location that the tax rate applies to as defined in + # the [AdWords + # API](https://developers.google.com/adwords/api/docs/appendix/geotargeting). + # @!attribute [rw] postal_code + # @return [::String] + # The postal code range that the tax rate applies to, represented by + # a ZIP code, a ZIP code prefix using * wildcard, a range between two ZIP + # codes or two ZIP code prefixes of equal length. + # Examples: 94114, 94*, 94002-95460, 94*-95*. + class Tax + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The ShippingWeight of the product. + # @!attribute [rw] value + # @return [::Float] + # The weight of the product used to calculate the shipping cost of the + # item. + # @!attribute [rw] unit + # @return [::String] + # The unit of value. + class ShippingWeight + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The ShippingDimension of the product. + # @!attribute [rw] value + # @return [::Float] + # The dimension of the product used to calculate the shipping cost of the + # item. + # @!attribute [rw] unit + # @return [::String] + # The unit of value. + class ShippingDimension + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The UnitPricingBaseMeasure of the product. + # @!attribute [rw] value + # @return [::Integer] + # The denominator of the unit price. + # @!attribute [rw] unit + # @return [::String] + # The unit of the denominator. + class UnitPricingBaseMeasure + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The UnitPricingMeasure of the product. + # @!attribute [rw] value + # @return [::Float] + # The measure of an item. + # @!attribute [rw] unit + # @return [::String] + # The unit of the measure. + class UnitPricingMeasure + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The SubscriptionCost of the product. + # @!attribute [rw] period + # @return [::Google::Shopping::Merchant::Products::V1beta::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 SubscriptionCost + 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. + # @!attribute [rw] credit_type + # @return [::String] + # Type of installment payments. + # Supported values are: + # * "`finance`" + # * "`lease`" + class Installment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents loyalty points. + # @!attribute [rw] name + # @return [::String] + # Name of loyalty points program. It is recommended to limit the name to + # 12 full-width characters or 24 Roman characters. + # @!attribute [rw] points_value + # @return [::Integer] + # The retailer's loyalty points in absolute value. + # @!attribute [rw] ratio + # @return [::Float] + # The ratio of a point when converted to currency. Google assumes currency + # based on Merchant Center settings. If ratio is left out, it defaults to + # 1.0. + class LoyaltyPoints + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message that represents loyalty program. + # @!attribute [rw] program_label + # @return [::String] + # The label of the loyalty program. This is an internal label that uniquely + # identifies the relationship between a business entity and a loyalty + # program entity. The label must be provided so that the system can associate + # the assets below (for example, price and points) with a business. The + # corresponding program must be linked to the Merchant Center account. + # @!attribute [rw] tier_label + # @return [::String] + # The label of the tier within the loyalty program. + # Must match one of the labels within the program. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # The price for members of the given tier, that is, the instant discount + # price. Must be smaller or equal to the regular price. + # @!attribute [rw] cashback_for_future_use + # @return [::Google::Shopping::Type::Price] + # The cashback that can be used for future purchases. + # @!attribute [rw] loyalty_points + # @return [::Integer] + # The amount of loyalty points earned on a purchase. + # @!attribute [rw] member_price_effective_date + # @return [::Google::Type::Interval] + # A date range during which the item is eligible for member price. If not + # specified, the member price is always applicable. The date range is + # represented by a pair of ISO 8601 dates separated by a space, + # comma, or slash. + # @!attribute [rw] shipping_label + # @return [::String] + # The label of the shipping benefit. If the field has value, this offer has + # loyalty shipping benefit. If the field value isn't provided, the item is + # not eligible for loyalty shipping for the given loyalty tier. + class LoyaltyProgram + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Shipping of the product. + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Fixed shipping price, represented as a number. + # @!attribute [rw] country + # @return [::String] + # The [CLDR territory + # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # of the country to which an item will ship. + # @!attribute [rw] region + # @return [::String] + # The geographic region to which a shipping rate applies. + # See [region](https://support.google.com/merchants/answer/6324484) for more + # information. + # @!attribute [rw] service + # @return [::String] + # A free-form description of the service class or delivery speed. + # @!attribute [rw] location_id + # @return [::Integer] + # The numeric ID of a location that the shipping rate applies to as + # defined in the [AdWords + # API](https://developers.google.com/adwords/api/docs/appendix/geotargeting). + # @!attribute [rw] location_group_name + # @return [::String] + # The location where the shipping is applicable, represented by a + # location group name. + # @!attribute [rw] postal_code + # @return [::String] + # The postal code range that the shipping rate applies to, represented by + # a postal code, a postal code prefix followed by a * wildcard, a range + # between two postal codes or two postal code prefixes of equal length. + # @!attribute [rw] min_handling_time + # @return [::Integer] + # Minimum handling time (inclusive) between when the order is received and + # shipped in business days. 0 means that the order is shipped on the same + # day as it is received if it happens before the cut-off time. + # {::Google::Shopping::Merchant::Products::V1beta::Shipping#min_handling_time minHandlingTime} + # can only be present together with + # {::Google::Shopping::Merchant::Products::V1beta::Shipping#max_handling_time maxHandlingTime}; + # but it is not required if + # {::Google::Shopping::Merchant::Products::V1beta::Shipping#max_handling_time maxHandlingTime} + # is present. + # @!attribute [rw] max_handling_time + # @return [::Integer] + # Maximum handling time (inclusive) between when the order is received and + # shipped in business days. 0 means that the order is shipped on the same + # day as it is received if it happens before the cut-off time. Both + # {::Google::Shopping::Merchant::Products::V1beta::Shipping#max_handling_time maxHandlingTime} + # and + # {::Google::Shopping::Merchant::Products::V1beta::Shipping#max_transit_time maxTransitTime} + # are required if providing shipping speeds. + # {::Google::Shopping::Merchant::Products::V1beta::Shipping#min_handling_time minHandlingTime} + # is optional if + # {::Google::Shopping::Merchant::Products::V1beta::Shipping#max_handling_time maxHandlingTime} + # is present. + # @!attribute [rw] min_transit_time + # @return [::Integer] + # Minimum transit time (inclusive) between when the order has shipped and + # when it is delivered in business days. 0 means that the order is + # delivered on the same day as it ships. + # {::Google::Shopping::Merchant::Products::V1beta::Shipping#min_transit_time minTransitTime} + # can only be present together with + # {::Google::Shopping::Merchant::Products::V1beta::Shipping#max_transit_time maxTransitTime}; + # but it is not required if + # {::Google::Shopping::Merchant::Products::V1beta::Shipping#max_transit_time maxTransitTime} + # is present. + # @!attribute [rw] max_transit_time + # @return [::Integer] + # Maximum transit time (inclusive) between when the order has shipped and + # when it is delivered in business days. 0 means that the order is + # delivered on the same day as it ships. Both + # {::Google::Shopping::Merchant::Products::V1beta::Shipping#max_handling_time maxHandlingTime} + # and + # {::Google::Shopping::Merchant::Products::V1beta::Shipping#max_transit_time maxTransitTime} + # are required if providing shipping speeds. + # {::Google::Shopping::Merchant::Products::V1beta::Shipping#min_transit_time minTransitTime} + # is optional if + # {::Google::Shopping::Merchant::Products::V1beta::Shipping#max_transit_time maxTransitTime} + # is present. + class Shipping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Conditions to be met for a product to have free shipping. + # @!attribute [rw] country + # @return [::String] + # The [CLDR territory + # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + # of the country to which an item will ship. + # @!attribute [rw] price_threshold + # @return [::Google::Shopping::Type::Price] + # The minimum product price for the shipping cost to become free. Represented + # as a number. + class FreeShippingThreshold + 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 + + # Product + # [certification](https://support.google.com/merchants/answer/13528839), + # initially introduced for EU energy efficiency labeling compliance using the + # EU EPREL database. + # @!attribute [rw] certification_authority + # @return [::String] + # The certification authority, for example "European_Commission". + # Maximum length is 2000 characters. + # @!attribute [rw] certification_name + # @return [::String] + # The name of the certification, for example "EPREL". + # Maximum length is 2000 characters. + # @!attribute [rw] certification_code + # @return [::String] + # The certification code. + # Maximum length is 2000 characters. + # @!attribute [rw] certification_value + # @return [::String] + # The certification value (also known as class, level or grade), for example + # "A+", "C", "gold". + # Maximum length is 2000 characters. + class Certification + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Structured title, for algorithmically (AI)-generated titles. + # @!attribute [rw] digital_source_type + # @return [::String] + # The digital source type, for example "trained_algorithmic_media". + # Following [IPTC](https://cv.iptc.org/newscodes/digitalsourcetype). + # Maximum length is 40 characters. + # @!attribute [rw] content + # @return [::String] + # The title text + # Maximum length is 150 characters + class ProductStructuredTitle + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Structured description, for algorithmically (AI)-generated descriptions. + # @!attribute [rw] digital_source_type + # @return [::String] + # The digital source type, for example "trained_algorithmic_media". + # Following [IPTC](https://cv.iptc.org/newscodes/digitalsourcetype). + # Maximum length is 40 characters. + # @!attribute [rw] content + # @return [::String] + # The description text + # Maximum length is 5000 characters + class ProductStructuredDescription + 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 a product, data validation issues, that is, information about + # a product computed asynchronously. + # @!attribute [rw] destination_statuses + # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::ProductStatus::DestinationStatus>] + # The intended destinations for the product. + # @!attribute [rw] item_level_issues + # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::ProductStatus::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 ProductStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The destination status of the product status. + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # The name of the reporting context. + # @!attribute [rw] approved_countries + # @return [::Array<::String>] + # List of country codes (ISO 3166-1 alpha-2) where the offer is approved. + # @!attribute [rw] pending_countries + # @return [::Array<::String>] + # List of country codes (ISO 3166-1 alpha-2) where the offer is pending + # approval. + # @!attribute [rw] disapproved_countries + # @return [::Array<::String>] + # List of country codes (ISO 3166-1 alpha-2) where the offer 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] severity + # @return [::Google::Shopping::Merchant::Products::V1beta::ProductStatus::ItemLevelIssue::Severity] + # How this issue affects serving of the offer. + # @!attribute [rw] resolution + # @return [::String] + # Whether the issue can be resolved by the business. + # @!attribute [rw] attribute + # @return [::String] + # The attribute's name, if the issue is caused by a single attribute. + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # The reporting context 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 + # offer. + 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 + end + end + + # Product property for the Cloud Retail API. + # For example, properties for a TV product could be "Screen-Resolution" or + # "Screen-Size". + # @!attribute [rw] property_name + # @return [::String] + # Name of the given property. For example, + # "Screen-Resolution" for a TV product. Maximum string size is 256 + # characters. + # @!attribute [rw] text_value + # @return [::Array<::String>] + # Text value of the given property. For example, + # "8K(UHD)" could be a text value for a TV product. Maximum + # repeatedness of this value is 400. Values are stored in an arbitrary but + # consistent order. Maximum string size is 256 characters. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Boolean value of the given property. For example for a TV product, + # "True" or "False" if the screen is UHD. + # @!attribute [rw] int_value + # @return [::Array<::Integer>] + # Integer values of the given property. For example, 1080 for a TV + # product's Screen Resolution. Maximum repeatedness of this value + # is 400. Values are stored in an arbitrary but consistent order. + # @!attribute [rw] float_value + # @return [::Array<::Float>] + # Float values of the given property. For example for a TV product + # 1.2345. Maximum repeatedness of this value is 400. Values + # are stored in an arbitrary but consistent order. + # @!attribute [rw] min_value + # @return [::Float] + # Minimum float value of the given property. For example for a TV + # product 1.00. + # @!attribute [rw] max_value + # @return [::Float] + # Maximum float value of the given property. For example for a TV + # product 100.00. + # @!attribute [rw] unit_code + # @return [::String] + # Unit of the given property. For example, "Pixels" for a TV product. Maximum + # string size is 256B. + class CloudExportAdditionalProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information regarding sustainability-related incentive programs such as + # rebates or tax relief. + # @!attribute [rw] amount + # @return [::Google::Shopping::Type::Price] + # The fixed amount of the incentive. + # + # Note: The following fields are mutually exclusive: `amount`, `percentage`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] percentage + # @return [::Float] + # The percentage of the sale price that the incentive is applied to. + # + # Note: The following fields are mutually exclusive: `percentage`, `amount`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::Products::V1beta::ProductSustainabilityIncentive::Type] + # Sustainability incentive program. + class ProductSustainabilityIncentive + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Types of supported sustainability incentive programs. + module Type + # Unspecified or unknown sustainability incentive type. + TYPE_UNSPECIFIED = 0 + + # Program offering tax liability reductions for electric vehicles and, in + # some countries, plug-in hybrids. These reductions can be based on a + # specific amount or a percentage of the sale price. + EV_TAX_CREDIT = 1 + + # A subsidy program, often called an environmental bonus, provides a + # purchase grant for electric vehicles and, in some countries, plug-in + # hybrids. The grant amount may be a fixed sum or a percentage of the sale + # price. + EV_PRICE_DISCOUNT = 2 + end + end + + # Information regarding Automated Discounts. + # @!attribute [rw] prior_price + # @return [::Google::Shopping::Type::Price] + # The price prior to the application of the first price reduction. + # Absent if the information about the prior price of the product is not + # available. + # @!attribute [rw] prior_price_progressive + # @return [::Google::Shopping::Type::Price] + # The price prior to the application of consecutive price reductions. + # Absent if the information about the prior price of the product is not + # available. + # @!attribute [rw] gad_price + # @return [::Google::Shopping::Type::Price] + # The current sale price for products with a price optimized using Google + # Automated Discounts (GAD). Absent if the information about the GAD_price of + # the product is not available. + class AutomatedDiscounts + 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 +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/proto_docs/google/type/interval.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/type/interval.rb new file mode 100644 index 000000000000..9350ca479005 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..be3d65c4c73d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta", path: "../" +else + gem "google-shopping-merchant-products-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-products-v1beta/snippets/product_inputs_service/delete_product_input.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/delete_product_input.rb new file mode 100644 index 000000000000..4680cd8ecdd3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/delete_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 merchantapi_v1beta_generated_ProductInputsService_DeleteProductInput_sync] +require "google/shopping/merchant/products/v1beta" + +## +# Snippet for the delete_product_input call in the ProductInputsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client#delete_product_input. +# +def delete_product_input + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest.new + + # Call the delete_product_input method. + result = client.delete_product_input request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_ProductInputsService_DeleteProductInput_sync] diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/insert_product_input.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/insert_product_input.rb new file mode 100644 index 000000000000..c4d92ec01316 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/insert_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 merchantapi_v1beta_generated_ProductInputsService_InsertProductInput_sync] +require "google/shopping/merchant/products/v1beta" + +## +# Snippet for the insert_product_input call in the ProductInputsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client#insert_product_input. +# +def insert_product_input + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest.new + + # Call the insert_product_input method. + result = client.insert_product_input request + + # The returned object is of type Google::Shopping::Merchant::Products::V1beta::ProductInput. + p result +end +# [END merchantapi_v1beta_generated_ProductInputsService_InsertProductInput_sync] diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/update_product_input.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/update_product_input.rb new file mode 100644 index 000000000000..3e96af7855cb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/update_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 merchantapi_v1beta_generated_ProductInputsService_UpdateProductInput_sync] +require "google/shopping/merchant/products/v1beta" + +## +# Snippet for the update_product_input call in the ProductInputsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client#update_product_input. +# +def update_product_input + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest.new + + # Call the update_product_input method. + result = client.update_product_input request + + # The returned object is of type Google::Shopping::Merchant::Products::V1beta::ProductInput. + p result +end +# [END merchantapi_v1beta_generated_ProductInputsService_UpdateProductInput_sync] diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/products_service/get_product.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/products_service/get_product.rb new file mode 100644 index 000000000000..0e9287abfa14 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/products_service/get_product.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ProductsService_GetProduct_sync] +require "google/shopping/merchant/products/v1beta" + +## +# Snippet for the get_product call in the ProductsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Products::V1beta::ProductsService::Client#get_product. +# +def get_product + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Products::V1beta::GetProductRequest.new + + # Call the get_product method. + result = client.get_product request + + # The returned object is of type Google::Shopping::Merchant::Products::V1beta::Product. + p result +end +# [END merchantapi_v1beta_generated_ProductsService_GetProduct_sync] diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/products_service/list_products.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/products_service/list_products.rb new file mode 100644 index 000000000000..14ee55d1e87e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/products_service/list_products.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_ProductsService_ListProducts_sync] +require "google/shopping/merchant/products/v1beta" + +## +# Snippet for the list_products call in the ProductsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Products::V1beta::ProductsService::Client#list_products. +# +def list_products + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Products::V1beta::ListProductsRequest.new + + # Call the list_products method. + result = client.list_products request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Products::V1beta::Product. + p item + end +end +# [END merchantapi_v1beta_generated_ProductsService_ListProducts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/snippet_metadata_google.shopping.merchant.products.v1beta.json b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/snippet_metadata_google.shopping.merchant.products.v1beta.json new file mode 100644 index 000000000000..9ac9d76892ec --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/snippet_metadata_google.shopping.merchant.products.v1beta.json @@ -0,0 +1,215 @@ +{ + "client_library": { + "name": "google-shopping-merchant-products-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.products.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1beta_generated_ProductInputsService_InsertProductInput_sync", + "title": "Snippet for the insert_product_input call in the ProductInputsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client#insert_product_input.", + "file": "product_inputs_service/insert_product_input.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_product_input", + "full_name": "::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client#insert_product_input", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Products::V1beta::ProductInput", + "client": { + "short_name": "ProductInputsService::Client", + "full_name": "::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client" + }, + "method": { + "short_name": "InsertProductInput", + "full_name": "google.shopping.merchant.products.v1beta.ProductInputsService.InsertProductInput", + "service": { + "short_name": "ProductInputsService", + "full_name": "google.shopping.merchant.products.v1beta.ProductInputsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ProductInputsService_UpdateProductInput_sync", + "title": "Snippet for the update_product_input call in the ProductInputsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client#update_product_input.", + "file": "product_inputs_service/update_product_input.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_product_input", + "full_name": "::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client#update_product_input", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Products::V1beta::ProductInput", + "client": { + "short_name": "ProductInputsService::Client", + "full_name": "::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client" + }, + "method": { + "short_name": "UpdateProductInput", + "full_name": "google.shopping.merchant.products.v1beta.ProductInputsService.UpdateProductInput", + "service": { + "short_name": "ProductInputsService", + "full_name": "google.shopping.merchant.products.v1beta.ProductInputsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ProductInputsService_DeleteProductInput_sync", + "title": "Snippet for the delete_product_input call in the ProductInputsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client#delete_product_input.", + "file": "product_inputs_service/delete_product_input.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_product_input", + "full_name": "::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client#delete_product_input", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ProductInputsService::Client", + "full_name": "::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client" + }, + "method": { + "short_name": "DeleteProductInput", + "full_name": "google.shopping.merchant.products.v1beta.ProductInputsService.DeleteProductInput", + "service": { + "short_name": "ProductInputsService", + "full_name": "google.shopping.merchant.products.v1beta.ProductInputsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ProductsService_GetProduct_sync", + "title": "Snippet for the get_product call in the ProductsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1beta::ProductsService::Client#get_product.", + "file": "products_service/get_product.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_product", + "full_name": "::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client#get_product", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Products::V1beta::GetProductRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Products::V1beta::Product", + "client": { + "short_name": "ProductsService::Client", + "full_name": "::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client" + }, + "method": { + "short_name": "GetProduct", + "full_name": "google.shopping.merchant.products.v1beta.ProductsService.GetProduct", + "service": { + "short_name": "ProductsService", + "full_name": "google.shopping.merchant.products.v1beta.ProductsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ProductsService_ListProducts_sync", + "title": "Snippet for the list_products call in the ProductsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1beta::ProductsService::Client#list_products.", + "file": "products_service/list_products.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_products", + "full_name": "::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client#list_products", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Products::V1beta::ListProductsResponse", + "client": { + "short_name": "ProductsService::Client", + "full_name": "::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client" + }, + "method": { + "short_name": "ListProducts", + "full_name": "google.shopping.merchant.products.v1beta.ProductsService.ListProducts", + "service": { + "short_name": "ProductsService", + "full_name": "google.shopping.merchant.products.v1beta.ProductsService" + } + } + }, + "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-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_paths_test.rb new file mode 100644 index 000000000000..af09f148b6e3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/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/merchant/products/v1beta/product_inputs_service" + +class ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::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::Products::V1beta::ProductInputsService::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_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::Merchant::Products::V1beta::ProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_input_path account: "value0", productinput: "value1" + assert_equal "accounts/value0/productInputs/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_rest_test.rb new file mode 100644 index 000000000000..ff1f33b0759b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_rest_test.rb @@ -0,0 +1,266 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/products/v1beta/productinputs_pb" +require "google/shopping/merchant/products/v1beta/product_inputs_service/rest" + + +class ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::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_product_input + # Create test objects. + client_result = ::Google::Shopping::Merchant::Products::V1beta::ProductInput.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + product_input = {} + data_source = "hello world" + + insert_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::Merchant::Products::V1beta::ProductInputsService::Rest::ServiceStub.stub :transcode_insert_product_input_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_product_input_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.insert_product_input({ parent: parent, product_input: product_input, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.insert_product_input parent: parent, product_input: product_input, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.insert_product_input ::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest.new(parent: parent, product_input: product_input, data_source: data_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.insert_product_input({ parent: parent, product_input: product_input, data_source: data_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.insert_product_input(::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest.new(parent: parent, product_input: product_input, data_source: data_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_product_input_client_stub.call_count + end + end + end + + def test_update_product_input + # Create test objects. + client_result = ::Google::Shopping::Merchant::Products::V1beta::ProductInput.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + product_input = {} + update_mask = {} + data_source = "hello world" + + update_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::Merchant::Products::V1beta::ProductInputsService::Rest::ServiceStub.stub :transcode_update_product_input_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_product_input_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_product_input({ product_input: product_input, update_mask: update_mask, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_product_input product_input: product_input, update_mask: update_mask, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_product_input ::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest.new(product_input: product_input, update_mask: update_mask, data_source: data_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_product_input({ product_input: product_input, update_mask: update_mask, data_source: data_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_product_input(::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest.new(product_input: product_input, update_mask: update_mask, data_source: data_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_product_input_client_stub.call_count + end + end + end + + def test_delete_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" + data_source = "hello world" + + delete_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::Merchant::Products::V1beta::ProductInputsService::Rest::ServiceStub.stub :transcode_delete_product_input_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_product_input_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_product_input({ name: name, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_product_input name: name, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_product_input ::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest.new(name: name, data_source: data_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_product_input({ name: name, data_source: data_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_product_input(::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest.new(name: name, data_source: data_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_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::Merchant::Products::V1beta::ProductInputsService::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::Products::V1beta::ProductInputsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_test.rb new file mode 100644 index 000000000000..2d9d0fa554f2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_test.rb @@ -0,0 +1,288 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/products/v1beta/productinputs_pb" +require "google/shopping/merchant/products/v1beta/product_inputs_service" + +class ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::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_product_input + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Products::V1beta::ProductInput.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + product_input = {} + data_source = "hello world" + + insert_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_product_input, name + assert_kind_of ::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Products::V1beta::ProductInput), request["product_input"] + assert_equal "hello world", request["data_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_product_input_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.insert_product_input({ parent: parent, product_input: product_input, data_source: data_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.insert_product_input parent: parent, product_input: product_input, data_source: data_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.insert_product_input ::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest.new(parent: parent, product_input: product_input, data_source: data_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.insert_product_input({ parent: parent, product_input: product_input, 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 + c.insert_product_input(::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest.new(parent: parent, product_input: product_input, 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, insert_product_input_client_stub.call_rpc_count + end + end + + def test_update_product_input + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Products::V1beta::ProductInput.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + product_input = {} + update_mask = {} + data_source = "hello world" + + update_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_product_input, name + assert_kind_of ::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Products::V1beta::ProductInput), request["product_input"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["data_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_product_input_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_product_input({ product_input: product_input, update_mask: update_mask, data_source: data_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_product_input product_input: product_input, update_mask: update_mask, data_source: data_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_product_input ::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest.new(product_input: product_input, update_mask: update_mask, data_source: data_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_product_input({ product_input: product_input, update_mask: update_mask, 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 + c.update_product_input(::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest.new(product_input: product_input, update_mask: update_mask, 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, update_product_input_client_stub.call_rpc_count + end + end + + def test_delete_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" + data_source = "hello world" + + delete_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_product_input, name + assert_kind_of ::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["data_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_product_input_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_product_input({ name: name, data_source: data_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_product_input name: name, data_source: data_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_product_input ::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest.new(name: name, data_source: data_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_product_input({ name: name, 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 + c.delete_product_input(::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest.new(name: name, 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, delete_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::Merchant::Products::V1beta::ProductInputsService::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::Products::V1beta::ProductInputsService::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::Products::V1beta::ProductInputsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_paths_test.rb new file mode 100644 index 000000000000..d31f0e886202 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/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/merchant/products/v1beta/products_service" + +class ::Google::Shopping::Merchant::Products::V1beta::ProductsService::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::Products::V1beta::ProductsService::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::Products::V1beta::ProductsService::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-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_rest_test.rb new file mode 100644 index 000000000000..32479d72f2ef --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/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/merchant/products/v1beta/products_pb" +require "google/shopping/merchant/products/v1beta/products_service/rest" + + +class ::Google::Shopping::Merchant::Products::V1beta::ProductsService::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_product + # Create test objects. + client_result = ::Google::Shopping::Merchant::Products::V1beta::Product.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_product_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::ServiceStub.stub :transcode_get_product_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_product_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_product({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_product name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_product ::Google::Shopping::Merchant::Products::V1beta::GetProductRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_product({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_product(::Google::Shopping::Merchant::Products::V1beta::GetProductRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_product_client_stub.call_count + end + end + end + + def test_list_products + # Create test objects. + client_result = ::Google::Shopping::Merchant::Products::V1beta::ListProductsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_products_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::ServiceStub.stub :transcode_list_products_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_products_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_products({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_products parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_products ::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_products({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_products(::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_products_client_stub.call_count + end + end + end + + def test_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::Products::V1beta::ProductsService::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::Products::V1beta::ProductsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_test.rb new file mode 100644 index 000000000000..5b33d88e7918 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/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/merchant/products/v1beta/products_pb" +require "google/shopping/merchant/products/v1beta/products_service" + +class ::Google::Shopping::Merchant::Products::V1beta::ProductsService::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_product + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Products::V1beta::Product.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_product, name + assert_kind_of ::Google::Shopping::Merchant::Products::V1beta::GetProductRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_product_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_product({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_product name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_product ::Google::Shopping::Merchant::Products::V1beta::GetProductRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_product({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_product(::Google::Shopping::Merchant::Products::V1beta::GetProductRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_product_client_stub.call_rpc_count + end + end + + def test_list_products + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Products::V1beta::ListProductsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_products_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_products, name + assert_kind_of ::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_products_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_products({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_products parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_products ::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_products({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_products(::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_products_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::Products::V1beta::ProductsService::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::Products::V1beta::ProductsService::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::Products::V1beta::ProductsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +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-promotions-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-promotions-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/.gitignore @@ -0,0 +1,20 @@ +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-promotions-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-promotions-v1/.repo-metadata.json new file mode 100644 index 000000000000..84693936bf05 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1", + "distribution_name": "google-shopping-merchant-promotions-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-promotions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-promotions 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-promotions-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-promotions-v1/.rubocop.yml new file mode 100644 index 000000000000..2b674ecd7332 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-promotions-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-promotions-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-promotions-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-promotions-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..24ed851eb83d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-promotions-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-promotions-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/promotions/v1" + +client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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/promotions/v1" + +::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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-promotions-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/promotions/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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-promotions-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-promotions-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-promotions-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/Gemfile @@ -0,0 +1,15 @@ +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-reporters", "~> 1.8.0", require: false +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-promotions-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-promotions-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1/README.md b/owl-bot-staging/google-shopping-merchant-promotions-v1/README.md new file mode 100644 index 000000000000..90b261148cb2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions](https://rubygems.org/gems/google-shopping-merchant-promotions). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-promotions-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/promotions/v1" + +client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new +request = ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new # (request fields as keyword arguments...) +response = client.insert_promotion request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-promotions-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/promotions/v1" +require "logger" + +client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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.2+. + +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-promotions`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-promotions-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-promotions`. +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-promotions-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-promotions-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-promotions-v1/Rakefile new file mode 100644 index 000000000000..d98f692bf19e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-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/promotions/v1/promotions_service/credentials" + ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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-promotions-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-promotions-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-promotions-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-promotions-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-promotions-v1" + header "google-shopping-merchant-promotions-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-promotions-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-promotions-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-promotions-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-promotions-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-promotions-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-promotions-v1/gapic_metadata.json new file mode 100644 index 000000000000..314936333345 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/gapic_metadata.json @@ -0,0 +1,33 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.promotions.v1", + "libraryPackage": "::Google::Shopping::Merchant::Promotions::V1", + "services": { + "PromotionsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client", + "rpcs": { + "InsertPromotion": { + "methods": [ + "insert_promotion" + ] + }, + "GetPromotion": { + "methods": [ + "get_promotion" + ] + }, + "ListPromotions": { + "methods": [ + "list_promotions" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/google-shopping-merchant-promotions-v1.gemspec b/owl-bot-staging/google-shopping-merchant-promotions-v1/google-shopping-merchant-promotions-v1.gemspec new file mode 100644 index 000000000000..119d81012113 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/google-shopping-merchant-promotions-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/promotions/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-promotions-v1" + gem.version = Google::Shopping::Merchant::Promotions::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-promotions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-promotions 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.3" + 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-promotions-v1/lib/google-shopping-merchant-promotions-v1.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google-shopping-merchant-promotions-v1.rb new file mode 100644 index 000000000000..7520fa752e8c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google-shopping-merchant-promotions-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/promotions/v1" diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1.rb new file mode 100644 index 000000000000..f3a70c6d9348 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/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/promotions/v1/promotions_service" +require "google/shopping/merchant/promotions/v1/version" + +module Google + module Shopping + module Merchant + module Promotions + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/promotions/v1" + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/promotions/v1" + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/promotions/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_common_pb.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_common_pb.rb new file mode 100644 index 000000000000..53b9c43188ec --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_common_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/promotions/v1/promotions_common.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' +require 'google/shopping/type/types_pb' +require 'google/type/interval_pb' + + +descriptor_data = "\n>google/shopping/merchant/promotions/v1/promotions_common.proto\x12&google.shopping.merchant.promotions.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/interval.proto\"\xc5\x0b\n\nAttributes\x12`\n\x15product_applicability\x18\x01 \x01(\x0e\x32<.google.shopping.merchant.promotions.v1.ProductApplicabilityB\x03\xe0\x41\x02\x12J\n\noffer_type\x18\x02 \x01(\x0e\x32\x31.google.shopping.merchant.promotions.v1.OfferTypeB\x03\xe0\x41\x02\x12$\n\x17generic_redemption_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nlong_title\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12W\n\x11\x63oupon_value_type\x18\x05 \x01(\x0e\x32\x37.google.shopping.merchant.promotions.v1.CouponValueTypeB\x03\xe0\x41\x02\x12V\n\x16promotion_destinations\x18\x06 \x03(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnumB\x03\xe0\x41\x02\x12\x1e\n\x11item_id_inclusion\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62rand_inclusion\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12$\n\x17item_group_id_inclusion\x18\t \x03(\tB\x03\xe0\x41\x01\x12#\n\x16product_type_inclusion\x18\n \x03(\tB\x03\xe0\x41\x01\x12\x1e\n\x11item_id_exclusion\x18\x0b \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62rand_exclusion\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12$\n\x17item_group_id_exclusion\x18\r \x03(\tB\x03\xe0\x41\x01\x12#\n\x16product_type_exclusion\x18\x0e \x03(\tB\x03\xe0\x41\x01\x12\x41\n\x17minimum_purchase_amount\x18\x0f \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12&\n\x19minimum_purchase_quantity\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1b\n\x0elimit_quantity\x18\x11 \x01(\x03\x42\x03\xe0\x41\x01\x12\x35\n\x0blimit_value\x18\x12 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\x18\n\x0bpercent_off\x18\x13 \x01(\x03\x42\x03\xe0\x41\x01\x12:\n\x10money_off_amount\x18\x14 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12)\n\x1cget_this_quantity_discounted\x18\x15 \x01(\x03\x42\x03\xe0\x41\x01\x12\x39\n\x0f\x66ree_gift_value\x18\x16 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\"\n\x15\x66ree_gift_description\x18\x17 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x66ree_gift_item_id\x18\x18 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x1fpromotion_effective_time_period\x18\x19 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x02\x12\x41\n\x1dpromotion_display_time_period\x18\x1a \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\x12\\\n\x13store_applicability\x18\x1c \x01(\x0e\x32:.google.shopping.merchant.promotions.v1.StoreApplicabilityB\x03\xe0\x41\x01\x12\"\n\x15store_codes_inclusion\x18\x1d \x03(\tB\x03\xe0\x41\x01\x12\"\n\x15store_codes_exclusion\x18\x1e \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\rpromotion_url\x18\x1f \x01(\tB\x03\xe0\x41\x01\"\x81\t\n\x0fPromotionStatus\x12l\n\x14\x64\x65stination_statuses\x18\x01 \x03(\x0b\x32I.google.shopping.merchant.promotions.v1.PromotionStatus.DestinationStatusB\x03\xe0\x41\x03\x12\x66\n\x11item_level_issues\x18\x02 \x03(\x0b\x32\x46.google.shopping.merchant.promotions.v1.PromotionStatus.ItemLevelIssueB\x03\xe0\x41\x03\x12\x36\n\rcreation_date\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_update_date\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\xc4\x02\n\x11\x44\x65stinationStatus\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x12\x64\n\x06status\x18\x02 \x01(\x0e\x32O.google.shopping.merchant.promotions.v1.PromotionStatus.DestinationStatus.StateB\x03\xe0\x41\x03\"l\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tIN_REVIEW\x10\x01\x12\x0c\n\x08REJECTED\x10\x02\x12\x08\n\x04LIVE\x10\x03\x12\x0b\n\x07STOPPED\x10\x04\x12\x0b\n\x07\x45XPIRED\x10\x05\x12\x0b\n\x07PENDING\x10\x06\x1a\xdd\x03\n\x0eItemLevelIssue\x12\x11\n\x04\x63ode\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x66\n\x08severity\x18\x02 \x01(\x0e\x32O.google.shopping.merchant.promotions.v1.PromotionStatus.ItemLevelIssue.SeverityB\x03\xe0\x41\x03\x12\x17\n\nresolution\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tattribute\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12[\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rdocumentation\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12!\n\x14\x61pplicable_countries\x18\t \x03(\tB\x03\xe0\x41\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*f\n\x14ProductApplicability\x12%\n!PRODUCT_APPLICABILITY_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41LL_PRODUCTS\x10\x01\x12\x15\n\x11SPECIFIC_PRODUCTS\x10\x02*^\n\x12StoreApplicability\x12#\n\x1fSTORE_APPLICABILITY_UNSPECIFIED\x10\x00\x12\x0e\n\nALL_STORES\x10\x01\x12\x13\n\x0fSPECIFIC_STORES\x10\x02*F\n\tOfferType\x12\x1a\n\x16OFFER_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NO_CODE\x10\x01\x12\x10\n\x0cGENERIC_CODE\x10\x02*Q\n\x11RedemptionChannel\x12\"\n\x1eREDEMPTION_CHANNEL_UNSPECIFIED\x10\x00\x12\x0c\n\x08IN_STORE\x10\x01\x12\n\n\x06ONLINE\x10\x02*\xd9\x02\n\x0f\x43ouponValueType\x12!\n\x1d\x43OUPON_VALUE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tMONEY_OFF\x10\x01\x12\x0f\n\x0bPERCENT_OFF\x10\x02\x12\x19\n\x15\x42UY_M_GET_N_MONEY_OFF\x10\x03\x12\x1b\n\x17\x42UY_M_GET_N_PERCENT_OFF\x10\x04\x12\x17\n\x13\x42UY_M_GET_MONEY_OFF\x10\x05\x12\x19\n\x15\x42UY_M_GET_PERCENT_OFF\x10\x06\x12\r\n\tFREE_GIFT\x10\x07\x12\x18\n\x14\x46REE_GIFT_WITH_VALUE\x10\x08\x12\x1a\n\x16\x46REE_GIFT_WITH_ITEM_ID\x10\t\x12\x1a\n\x16\x46REE_SHIPPING_STANDARD\x10\n\x12\x1b\n\x17\x46REE_SHIPPING_OVERNIGHT\x10\x0b\x12\x19\n\x15\x46REE_SHIPPING_TWO_DAY\x10\x0c\x42\x96\x02\n*com.google.shopping.merchant.promotions.v1B\x15PromotionsCommonProtoP\x01ZPcloud.google.com/go/shopping/merchant/promotions/apiv1/promotionspb;promotionspb\xaa\x02&Google.Shopping.Merchant.Promotions.V1\xca\x02&Google\\Shopping\\Merchant\\Promotions\\V1\xea\x02*Google::Shopping::Merchant::Promotions::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Promotions + module V1 + Attributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.Attributes").msgclass + PromotionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.PromotionStatus").msgclass + PromotionStatus::DestinationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.PromotionStatus.DestinationStatus").msgclass + PromotionStatus::DestinationStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.PromotionStatus.DestinationStatus.State").enummodule + PromotionStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.PromotionStatus.ItemLevelIssue").msgclass + PromotionStatus::ItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.PromotionStatus.ItemLevelIssue.Severity").enummodule + ProductApplicability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.ProductApplicability").enummodule + StoreApplicability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.StoreApplicability").enummodule + OfferType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.OfferType").enummodule + RedemptionChannel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.RedemptionChannel").enummodule + CouponValueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.CouponValueType").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_pb.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_pb.rb new file mode 100644 index 000000000000..5f5fd4e0a390 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/promotions/v1/promotions.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/promotions/v1/promotions_common_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n7google/shopping/merchant/promotions/v1/promotions.proto\x12&google.shopping.merchant.promotions.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/promotions/v1/promotions_common.proto\x1a google/shopping/type/types.proto\"\xf9\x04\n\tPromotion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0cpromotion_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0etarget_country\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x12redemption_channel\x18\x05 \x03(\x0e\x32\x39.google.shopping.merchant.promotions.v1.RedemptionChannelB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12K\n\nattributes\x18\x07 \x01(\x0b\x32\x32.google.shopping.merchant.promotions.v1.AttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\x08 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01\x12V\n\x10promotion_status\x18\t \x01(\x0b\x32\x37.google.shopping.merchant.promotions.v1.PromotionStatusB\x03\xe0\x41\x03\x12 \n\x0eversion_number\x18\n \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01:k\xea\x41h\n$merchantapi.googleapis.com/Promotion\x12)accounts/{account}/promotions/{promotion}*\npromotions2\tpromotionB\x11\n\x0f_version_number\"\x92\x01\n\x16InsertPromotionRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12I\n\tpromotion\x18\x02 \x01(\x0b\x32\x31.google.shopping.merchant.promotions.v1.PromotionB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"Q\n\x13GetPromotionRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$merchantapi.googleapis.com/Promotion\"]\n\x15ListPromotionsRequest\x12\x13\n\x06parent\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\"x\n\x16ListPromotionsResponse\x12\x45\n\npromotions\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.promotions.v1.Promotion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xb5\x05\n\x11PromotionsService\x12\xc5\x01\n\x0fInsertPromotion\x12>.google.shopping.merchant.promotions.v1.InsertPromotionRequest\x1a\x31.google.shopping.merchant.promotions.v1.Promotion\"?\x82\xd3\xe4\x93\x02\x39\"4/promotions/v1/{parent=accounts/*}/promotions:insert:\x01*\x12\xbc\x01\n\x0cGetPromotion\x12;.google.shopping.merchant.promotions.v1.GetPromotionRequest\x1a\x31.google.shopping.merchant.promotions.v1.Promotion\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/promotions/v1/{name=accounts/*/promotions/*}\x12\xcf\x01\n\x0eListPromotions\x12=.google.shopping.merchant.promotions.v1.ListPromotionsRequest\x1a>.google.shopping.merchant.promotions.v1.ListPromotionsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/promotions/v1/{parent=accounts/*}/promotions\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xcb\x02\n*com.google.shopping.merchant.promotions.v1B\x0fPromotionsProtoP\x01ZPcloud.google.com/go/shopping/merchant/promotions/apiv1/promotionspb;promotionspb\xaa\x02&Google.Shopping.Merchant.Promotions.V1\xca\x02&Google\\Shopping\\Merchant\\Promotions\\V1\xea\x02*Google::Shopping::Merchant::Promotions::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 Promotions + module V1 + Promotion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.Promotion").msgclass + InsertPromotionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.InsertPromotionRequest").msgclass + GetPromotionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.GetPromotionRequest").msgclass + ListPromotionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.ListPromotionsRequest").msgclass + ListPromotionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.ListPromotionsResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service.rb new file mode 100644 index 000000000000..19dae04d8d12 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_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/promotions/v1/version" + +require "google/shopping/merchant/promotions/v1/promotions_service/credentials" +require "google/shopping/merchant/promotions/v1/promotions_service/paths" +require "google/shopping/merchant/promotions/v1/promotions_service/client" +require "google/shopping/merchant/promotions/v1/promotions_service/rest" + +module Google + module Shopping + module Merchant + module Promotions + module V1 + ## + # Service to manage promotions for products. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/promotions/v1/promotions_service" + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/promotions/v1/promotions_service/rest" + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new + # + module PromotionsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "promotions_service", "helpers.rb" +require "google/shopping/merchant/promotions/v1/promotions_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/client.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/client.rb new file mode 100644 index 000000000000..5a1247691c4c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/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/promotions/v1/promotions_pb" + +module Google + module Shopping + module Merchant + module Promotions + module V1 + module PromotionsService + ## + # Client for the PromotionsService service. + # + # Service to manage promotions for products. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :promotions_service_stub + + ## + # Configure the PromotionsService Client class. + # + # See {::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PromotionsService clients + # ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.configure do |config| + # config.timeout = 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", "Promotions", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.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 PromotionsService Client instance. + # + # The configuration is set to the derived mode, meaning that values 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::Promotions::V1::PromotionsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @promotions_service_stub.universe_domain + end + + ## + # Create a new PromotionsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PromotionsService 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/promotions/v1/promotions_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 + + @promotions_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @promotions_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 + @promotions_service_stub.logger + end + + # Service calls + + ## + # Inserts a promotion for your Merchant Center account. If the promotion + # already exists, then it updates the promotion instead. + # + # @overload insert_promotion(request, options = nil) + # Pass arguments to `insert_promotion` via a request object, either of type + # {::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_promotion(parent: nil, promotion: nil, data_source: nil) + # Pass arguments to `insert_promotion` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 the promotion will be inserted. + # Format: accounts/\\{account} + # @param promotion [::Google::Shopping::Merchant::Promotions::V1::Promotion, ::Hash] + # Required. The promotion to insert. + # @param data_source [::String] + # Required. The data source of the + # [promotion](https://support.google.com/merchants/answer/6396268?sjid=5155774230887277618-NC) + # Format: + # `accounts/{account}/dataSources/{datasource}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/promotions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new + # + # # Call the insert_promotion method. + # result = client.insert_promotion request + # + # # The returned object is of type Google::Shopping::Merchant::Promotions::V1::Promotion. + # p result + # + def insert_promotion request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest + + # Converts hash and nil to 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_promotion.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Promotions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_promotion.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_promotion.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @promotions_service_stub.call_rpc :insert_promotion, request, 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 promotion from your Merchant Center account. + # + # After inserting or updating a promotion input, it may take several + # minutes before the updated promotion can be retrieved. + # + # @overload get_promotion(request, options = nil) + # Pass arguments to `get_promotion` via a request object, either of type + # {::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_promotion(name: nil) + # Pass arguments to `get_promotion` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the promotion to retrieve. + # Format: `accounts/{account}/promotions/{promotions}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/promotions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.new + # + # # Call the get_promotion method. + # result = client.get_promotion request + # + # # The returned object is of type Google::Shopping::Merchant::Promotions::V1::Promotion. + # p result + # + def get_promotion request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_promotion.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Promotions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_promotion.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_promotion.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @promotions_service_stub.call_rpc :get_promotion, request, 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 promotions in your Merchant 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 or updating a promotion, it may take several minutes before + # the updated processed promotion can be retrieved. + # + # @overload list_promotions(request, options = nil) + # Pass arguments to `list_promotions` via a request object, either of type + # {::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_promotions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_promotions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 processed promotions for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of promotions to return. The service may + # return fewer than this value. The maximum value is 250; values above 250 + # will be coerced to 250. If unspecified, the maximum number of promotions + # will be returned. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListPromotions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPromotions` 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::Promotions::V1::Promotion>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Promotions::V1::Promotion>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/promotions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.new + # + # # Call the list_promotions method. + # result = client.list_promotions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can 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::Promotions::V1::Promotion. + # p item + # end + # + def list_promotions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_promotions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Promotions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_promotions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_promotions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @promotions_service_stub.call_rpc :list_promotions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @promotions_service_stub, :list_promotions, request, response, 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 PromotionsService API. + # + # This class represents the configuration for PromotionsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_promotion to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_promotion.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_promotion.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::Promotions::V1::PromotionsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the PromotionsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `insert_promotion` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_promotion + ## + # RPC-specific configuration for `get_promotion` + # @return [::Gapic::Config::Method] + # + attr_reader :get_promotion + ## + # RPC-specific configuration for `list_promotions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_promotions + + # @private + def initialize parent_rpcs = nil + insert_promotion_config = parent_rpcs.insert_promotion if parent_rpcs.respond_to? :insert_promotion + @insert_promotion = ::Gapic::Config::Method.new insert_promotion_config + get_promotion_config = parent_rpcs.get_promotion if parent_rpcs.respond_to? :get_promotion + @get_promotion = ::Gapic::Config::Method.new get_promotion_config + list_promotions_config = parent_rpcs.list_promotions if parent_rpcs.respond_to? :list_promotions + @list_promotions = ::Gapic::Config::Method.new list_promotions_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-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/credentials.rb new file mode 100644 index 000000000000..581e95d2481a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_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 Promotions + module V1 + module PromotionsService + # Credentials for the PromotionsService 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-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/paths.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/paths.rb new file mode 100644 index 000000000000..5872c917bb52 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_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 Promotions + module V1 + module PromotionsService + # Path helper methods for the PromotionsService API. + module Paths + ## + # Create a fully-qualified Promotion resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/promotions/{promotion}` + # + # @param account [String] + # @param promotion [String] + # + # @return [::String] + def promotion_path account:, promotion: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/promotions/#{promotion}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest.rb new file mode 100644 index 000000000000..e3a39d2bf44d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_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/promotions/v1/version" + +require "google/shopping/merchant/promotions/v1/promotions_service/credentials" +require "google/shopping/merchant/promotions/v1/promotions_service/paths" +require "google/shopping/merchant/promotions/v1/promotions_service/rest/client" + +module Google + module Shopping + module Merchant + module Promotions + module V1 + ## + # Service to manage promotions for products. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/promotions/v1/promotions_service/rest" + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new + # + module PromotionsService + # 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/promotions/v1/promotions_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/client.rb new file mode 100644 index 000000000000..a09a9749a05e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/client.rb @@ -0,0 +1,639 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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/promotions/v1/promotions_pb" +require "google/shopping/merchant/promotions/v1/promotions_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Promotions + module V1 + module PromotionsService + module Rest + ## + # REST client for the PromotionsService service. + # + # Service to manage promotions for products. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :promotions_service_stub + + ## + # Configure the PromotionsService Client class. + # + # See {::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PromotionsService clients + # ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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", "Promotions", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.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 PromotionsService Client instance. + # + # The configuration is set to the derived mode, meaning that values 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::Promotions::V1::PromotionsService::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 + @promotions_service_stub.universe_domain + end + + ## + # Create a new PromotionsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PromotionsService 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 + + @promotions_service_stub = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @promotions_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 + @promotions_service_stub.logger + end + + # Service calls + + ## + # Inserts a promotion for your Merchant Center account. If the promotion + # already exists, then it updates the promotion instead. + # + # @overload insert_promotion(request, options = nil) + # Pass arguments to `insert_promotion` via a request object, either of type + # {::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_promotion(parent: nil, promotion: nil, data_source: nil) + # Pass arguments to `insert_promotion` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 the promotion will be inserted. + # Format: accounts/\\{account} + # @param promotion [::Google::Shopping::Merchant::Promotions::V1::Promotion, ::Hash] + # Required. The promotion to insert. + # @param data_source [::String] + # Required. The data source of the + # [promotion](https://support.google.com/merchants/answer/6396268?sjid=5155774230887277618-NC) + # Format: + # `accounts/{account}/dataSources/{datasource}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/promotions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new + # + # # Call the insert_promotion method. + # result = client.insert_promotion request + # + # # The returned object is of type Google::Shopping::Merchant::Promotions::V1::Promotion. + # p result + # + def insert_promotion request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest + + # Converts hash and nil to an 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_promotion.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Promotions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_promotion.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_promotion.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @promotions_service_stub.insert_promotion request, 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 promotion from your Merchant Center account. + # + # After inserting or updating a promotion input, it may take several + # minutes before the updated promotion can be retrieved. + # + # @overload get_promotion(request, options = nil) + # Pass arguments to `get_promotion` via a request object, either of type + # {::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_promotion(name: nil) + # Pass arguments to `get_promotion` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the promotion to retrieve. + # Format: `accounts/{account}/promotions/{promotions}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/promotions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.new + # + # # Call the get_promotion method. + # result = client.get_promotion request + # + # # The returned object is of type Google::Shopping::Merchant::Promotions::V1::Promotion. + # p result + # + def get_promotion request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_promotion.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Promotions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_promotion.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_promotion.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @promotions_service_stub.get_promotion request, 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 promotions in your Merchant 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 or updating a promotion, it may take several minutes before + # the updated processed promotion can be retrieved. + # + # @overload list_promotions(request, options = nil) + # Pass arguments to `list_promotions` via a request object, either of type + # {::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_promotions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_promotions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 processed promotions for. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of promotions to return. The service may + # return fewer than this value. The maximum value is 250; values above 250 + # will be coerced to 250. If unspecified, the maximum number of promotions + # will be returned. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListPromotions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPromotions` 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::Promotions::V1::Promotion>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Promotions::V1::Promotion>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/promotions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.new + # + # # Call the list_promotions method. + # result = client.list_promotions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can 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::Promotions::V1::Promotion. + # p item + # end + # + def list_promotions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_promotions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Promotions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_promotions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_promotions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @promotions_service_stub.list_promotions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @promotions_service_stub, :list_promotions, "promotions", request, result, 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 PromotionsService REST API. + # + # This class represents the configuration for PromotionsService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_promotion to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_promotion.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_promotion.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the PromotionsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `insert_promotion` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_promotion + ## + # RPC-specific configuration for `get_promotion` + # @return [::Gapic::Config::Method] + # + attr_reader :get_promotion + ## + # RPC-specific configuration for `list_promotions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_promotions + + # @private + def initialize parent_rpcs = nil + insert_promotion_config = parent_rpcs.insert_promotion if parent_rpcs.respond_to? :insert_promotion + @insert_promotion = ::Gapic::Config::Method.new insert_promotion_config + get_promotion_config = parent_rpcs.get_promotion if parent_rpcs.respond_to? :get_promotion + @get_promotion = ::Gapic::Config::Method.new get_promotion_config + list_promotions_config = parent_rpcs.list_promotions if parent_rpcs.respond_to? :list_promotions + @list_promotions = ::Gapic::Config::Method.new list_promotions_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-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/service_stub.rb new file mode 100644 index 000000000000..269bd4f2e60c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_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/promotions/v1/promotions_pb" + +module Google + module Shopping + module Merchant + module Promotions + module V1 + module PromotionsService + module Rest + ## + # REST service stub for the PromotionsService 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_promotion REST call + # + # @param request_pb [::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # A result object deserialized from the server's reply + def insert_promotion request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_promotion_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_promotion", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Promotions::V1::Promotion.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_promotion REST call + # + # @param request_pb [::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # A result object deserialized from the server's reply + def get_promotion request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_promotion_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_promotion", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Promotions::V1::Promotion.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_promotions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1::ListPromotionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1::ListPromotionsResponse] + # A result object deserialized from the server's reply + def list_promotions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_promotions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_promotions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsResponse.decode_json response.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_promotion REST call + # + # @param request_pb [::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest] + # 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_promotion_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/promotions/v1/{parent}/promotions:insert", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_promotion REST call + # + # @param request_pb [::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_promotion_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/promotions/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/promotions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_promotions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_promotions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/promotions/v1/{parent}/promotions", + 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-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_services_pb.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_services_pb.rb new file mode 100644 index 000000000000..31e15dab4727 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_services_pb.rb @@ -0,0 +1,60 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/promotions/v1/promotions.proto for package 'Google.Shopping.Merchant.Promotions.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/promotions/v1/promotions_pb' + +module Google + module Shopping + module Merchant + module Promotions + module V1 + module PromotionsService + # Service to manage promotions for products. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.promotions.v1.PromotionsService' + + # Inserts a promotion for your Merchant Center account. If the promotion + # already exists, then it updates the promotion instead. + rpc :InsertPromotion, ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest, ::Google::Shopping::Merchant::Promotions::V1::Promotion + # Retrieves the promotion from your Merchant Center account. + # + # After inserting or updating a promotion input, it may take several + # minutes before the updated promotion can be retrieved. + rpc :GetPromotion, ::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest, ::Google::Shopping::Merchant::Promotions::V1::Promotion + # Lists the promotions in your Merchant 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 or updating a promotion, it may take several minutes before + # the updated processed promotion can be retrieved. + rpc :ListPromotions, ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest, ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/rest.rb new file mode 100644 index 000000000000..56dbf26b54f7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/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/promotions/v1/promotions_service/rest" +require "google/shopping/merchant/promotions/v1/version" + +module Google + module Shopping + module Merchant + module Promotions + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/promotions/v1/rest" + # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/version.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/version.rb new file mode 100644 index 000000000000..6317b950bb8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/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 Promotions + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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. + # + # Note: This field should not be used in most cases. + 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. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # 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-promotions-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 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-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions.rb new file mode 100644 index 000000000000..feb8f7c2dc11 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions.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 Promotions + module V1 + # Represents a promotion. See the following articles for more details. + # + # Required promotion input attributes to pass data validation checks are + # primarily defined below: + # + # * [Promotions data + # specification](https://support.google.com/merchants/answer/2906014) + # * [Local promotions data + # specification](https://support.google.com/merchants/answer/10146130) + # + # After inserting, updating a promotion input, it may take several minutes + # before the final promotion can be retrieved. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the promotion. + # Format: `accounts/{account}/promotions/{promotion}` + # @!attribute [rw] promotion_id + # @return [::String] + # Required. The user provided promotion ID to uniquely identify the + # promotion. Follow [minimum + # requirements](https://support.google.com/merchants/answer/7050148?ref_topic=7322920&sjid=871860036916537104-NC#minimum_requirements) + # to prevent promotion disapprovals. + # @!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 + # promotion. + # + # Promotions is only for [selected + # languages](https://support.google.com/merchants/answer/4588281?ref_topic=6396150&sjid=18314938579342094533-NC#option3&zippy=). + # @!attribute [rw] target_country + # @return [::String] + # Required. 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, [Free Listings and Shopping + # ads](https://support.google.com/merchants/answer/4588460) [Local Inventory + # ads](https://support.google.com/merchants/answer/10146326) + # @!attribute [rw] redemption_channel + # @return [::Array<::Google::Shopping::Merchant::Promotions::V1::RedemptionChannel>] + # Required. [Redemption + # channel](https://support.google.com/merchants/answer/13837674?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. At least one channel is required. + # @!attribute [r] data_source + # @return [::String] + # Output only. The primary data source of the promotion. + # @!attribute [rw] attributes + # @return [::Google::Shopping::Merchant::Promotions::V1::Attributes] + # Optional. A list of promotion attributes. + # @!attribute [rw] custom_attributes + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Optional. A list of custom (merchant-provided) attributes. It can also be + # used for submitting any attribute of the data specification in its generic + # form (for example, + # `{ "name": "size type", "value": "regular" }`). + # This is useful for submitting attributes not explicitly exposed by the + # API. + # @!attribute [r] promotion_status + # @return [::Google::Shopping::Merchant::Promotions::V1::PromotionStatus] + # Output only. The [status of a + # promotion](https://support.google.com/merchants/answer/3398326?ref_topic=7322924&sjid=5155774230887277618-NC), + # data validation issues, that is, information about a promotion computed + # asynchronously. + # @!attribute [rw] version_number + # @return [::Integer] + # Optional. Represents the existing version (freshness) of the promotion, + # which can be used to preserve the right order when multiple updates are + # done at the same time. + # + # If set, the insertion is prevented when version number is lower than + # the current version number of the existing promotion. Re-insertion (for + # example, promotion refresh after 30 days) can be performed with the current + # `version_number`. + # + # If the operation is prevented, the aborted exception will be + # thrown. + class Promotion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertPromotion` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account where the promotion will be inserted. + # Format: accounts/\\{account} + # @!attribute [rw] promotion + # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] + # Required. The promotion to insert. + # @!attribute [rw] data_source + # @return [::String] + # Required. The data source of the + # [promotion](https://support.google.com/merchants/answer/6396268?sjid=5155774230887277618-NC) + # Format: + # `accounts/{account}/dataSources/{datasource}`. + class InsertPromotionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetPromotion` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the promotion to retrieve. + # Format: `accounts/{account}/promotions/{promotions}` + class GetPromotionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListPromotions` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to list processed promotions for. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of promotions to return. The service may + # return fewer than this value. The maximum value is 250; values above 250 + # will be coerced to 250. If unspecified, the maximum number of promotions + # will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListPromotions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPromotions` must + # match the call that provided the page token. + class ListPromotionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListPromotions` method. + # @!attribute [rw] promotions + # @return [::Array<::Google::Shopping::Merchant::Promotions::V1::Promotion>] + # The processed promotions 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 ListPromotionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions_common.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions_common.rb new file mode 100644 index 000000000000..eecbe0f7dc25 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions_common.rb @@ -0,0 +1,446 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Promotions + module V1 + # Attributes. + # @!attribute [rw] product_applicability + # @return [::Google::Shopping::Merchant::Promotions::V1::ProductApplicability] + # Required. Applicability of the promotion to either all products or + # [only specific + # products](https://support.google.com/merchants/answer/6396257?ref_topic=6396150&sjid=17642868584668136159-NC). + # @!attribute [rw] offer_type + # @return [::Google::Shopping::Merchant::Promotions::V1::OfferType] + # Required. + # [Type](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC) + # of the promotion. Use this attribute to indicate whether or not customers + # need a coupon code to redeem your promotion. + # @!attribute [rw] generic_redemption_code + # @return [::String] + # Optional. Generic redemption code for the promotion. To be used with the + # `offerType` field and must meet the [minimum + # requirements](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] long_title + # @return [::String] + # Required. [Long + # title](https://support.google.com/merchants/answer/13838102?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. + # @!attribute [rw] coupon_value_type + # @return [::Google::Shopping::Merchant::Promotions::V1::CouponValueType] + # Required. The [coupon value type] + # (https://support.google.com/merchants/answer/13861986?ref_topic=13773355&sjid=17642868584668136159-NC) + # attribute to signal the type of promotion that you are running. Depending + # on type of the selected coupon value [some attributes are + # required](https://support.google.com/merchants/answer/6393006?ref_topic=7322920). + # @!attribute [rw] promotion_destinations + # @return [::Array<::Google::Shopping::Type::Destination::DestinationEnum>] + # Required. The list of destinations (also known as [Marketing + # methods](https://support.google.com/merchants/answer/15130232)) where the + # promotion applies to. If you don't specify a destination by including a + # supported value in your data source, your promotion will display in + # Shopping ads and free listings by default. + # + # You may have previously submitted the following values as destinations for + # your products: Shopping Actions, Surfaces across Google, Local surfaces + # across Google. To represent these values use `FREE_LISTINGS`, + # `FREE_LOCAL_LISTINGS`, `LOCAL_INVENTORY_ADS`. For more details see + # [Promotion + # destination](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC) + # @!attribute [rw] item_id_inclusion + # @return [::Array<::String>] + # Optional. Product filter by [item + # ID](https://support.google.com/merchants/answer/13861565?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. The product filter attributes only applies when the + # products eligible for promotion product applicability + # `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] brand_inclusion + # @return [::Array<::String>] + # Optional. Product filter by brand for the promotion. The product filter + # attributes only applies when the products eligible for promotion product + # applicability `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] item_group_id_inclusion + # @return [::Array<::String>] + # Optional. Product filter by item group ID for the promotion. The product + # filter attributes only applies when the products eligible for promotion + # product applicability [product_applicability] attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] product_type_inclusion + # @return [::Array<::String>] + # Optional. Product filter by product type for the promotion. The product + # filter attributes only applies when the products eligible for promotion + # product applicability `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] item_id_exclusion + # @return [::Array<::String>] + # Optional. Product filter by [item ID + # exclusion](https://support.google.com/merchants/answer/13863524?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. The product filter attributes only applies when the + # products eligible for promotion product applicability + # `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] brand_exclusion + # @return [::Array<::String>] + # Optional. Product filter by [brand + # exclusion](https://support.google.com/merchants/answer/13861679?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. The product filter attributes only applies when the + # products eligible for promotion product applicability + # `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] item_group_id_exclusion + # @return [::Array<::String>] + # Optional. Product filter by [item group + # ID](https://support.google.com/merchants/answer/13837298?ref_topic=13773355&sjid=17642868584668136159-NC). + # The product filter attributes only applies when the products eligible for + # promotion product applicability `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # exclusion for the promotion. + # @!attribute [rw] product_type_exclusion + # @return [::Array<::String>] + # Optional. Product filter by [product type + # exclusion](https://support.google.com/merchants/answer/13863746?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. The product filter attributes only applies when the + # products eligible for promotion product applicability + # `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] minimum_purchase_amount + # @return [::Google::Shopping::Type::Price] + # Optional. [Minimum purchase + # amount](https://support.google.com/merchants/answer/13837705?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. + # @!attribute [rw] minimum_purchase_quantity + # @return [::Integer] + # @!attribute [rw] limit_quantity + # @return [::Integer] + # Optional. [Maximum purchase + # quantity](https://support.google.com/merchants/answer/13861564?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. + # @!attribute [rw] limit_value + # @return [::Google::Shopping::Type::Price] + # Optional. [Maximum product + # price](https://support.google.com/merchants/answer/2906014) for + # promotion. + # @!attribute [rw] percent_off + # @return [::Integer] + # Optional. The [percentage + # discount](https://support.google.com/merchants/answer/13837404?sjid=17642868584668136159-NC) + # offered in the promotion. + # @!attribute [rw] money_off_amount + # @return [::Google::Shopping::Type::Price] + # Optional. The [money off + # amount](https://support.google.com/merchants/answer/13838101?ref_topic=13773355&sjid=17642868584668136159-NC) + # offered in the promotion. + # @!attribute [rw] get_this_quantity_discounted + # @return [::Integer] + # Optional. The number of items discounted in the promotion. The attribute is + # set when `couponValueType` is equal to `buy_m_get_n_money_off` or + # `buy_m_get_n_percent_off`. + # @!attribute [rw] free_gift_value + # @return [::Google::Shopping::Type::Price] + # Optional. [Free gift + # value](https://support.google.com/merchants/answer/13844477?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. + # @!attribute [rw] free_gift_description + # @return [::String] + # Optional. [Free gift + # description](https://support.google.com/merchants/answer/13847245?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. + # @!attribute [rw] free_gift_item_id + # @return [::String] + # Optional. [Free gift item + # ID](https://support.google.com/merchants/answer/13857152?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. + # @!attribute [rw] promotion_effective_time_period + # @return [::Google::Type::Interval] + # Required. `TimePeriod` representation of the promotion's effective dates. + # This attribute specifies that the promotion can be tested on your online + # store during this time period. + # @!attribute [rw] promotion_display_time_period + # @return [::Google::Type::Interval] + # Optional. `TimePeriod` representation of the promotion's display dates. + # This attribute specifies the date and time frame when the promotion will be + # live on Google.com and Shopping ads. If the display time period for + # promotion `promotion_display_time_period` attribute is not specified, the + # promotion effective time period `promotion_effective_time_period` + # determines the date and time frame when the promotion will be live on + # Google.com and Shopping ads. + # @!attribute [rw] store_applicability + # @return [::Google::Shopping::Merchant::Promotions::V1::StoreApplicability] + # Optional. Whether the promotion applies to [all stores, or only specified + # stores](https://support.google.com/merchants/answer/13857563?sjid=17642868584668136159-NC). + # Local Inventory ads promotions throw an error if no store applicability is + # included. An `INVALID_ARGUMENT` error is thrown if `store_applicability` is + # set to `ALL_STORES` and `store_codes_inclusion` or `score_code_exclusion` + # is set to a value. + # @!attribute [rw] store_codes_inclusion + # @return [::Array<::String>] + # Optional. [Store codes to + # include](https://support.google.com/merchants/answer/13857470?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. The store filter attributes only applies when the + # `store_applicability` attribute is set to + # [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC). + # + # 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] store_codes_exclusion + # @return [::Array<::String>] + # Optional. [Store codes to + # exclude](https://support.google.com/merchants/answer/13859586?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. The store filter attributes only applies when the + # `store_applicability` attribute is set to + # [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] promotion_url + # @return [::String] + # Optional. URL to the page on the merchant's site where the promotion shows. + # Local Inventory ads promotions throw an error if no `promotion_url` is + # included. URL is used to confirm that the promotion is valid and can be + # redeemed. + class Attributes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The status of the promotion. + # @!attribute [r] destination_statuses + # @return [::Array<::Google::Shopping::Merchant::Promotions::V1::PromotionStatus::DestinationStatus>] + # Output only. The intended destinations for the promotion. + # @!attribute [r] item_level_issues + # @return [::Array<::Google::Shopping::Merchant::Promotions::V1::PromotionStatus::ItemLevelIssue>] + # Output only. A list of issues associated with the promotion. + # @!attribute [r] creation_date + # @return [::Google::Protobuf::Timestamp] + # Output only. Date on which the promotion has been created + # in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, + # and offset, for example `2020-01-02T09:00:00+01:00` or + # `2020-01-02T09:00:00Z` + # @!attribute [r] last_update_date + # @return [::Google::Protobuf::Timestamp] + # Output only. Date on which the promotion status has been last updated + # in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, + # and offset, for example `2020-01-02T09:00:00+01:00` or + # `2020-01-02T09:00:00Z` + class PromotionStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The status for the specified destination. + # @!attribute [r] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # Output only. The name of the promotion destination. + # @!attribute [r] status + # @return [::Google::Shopping::Merchant::Promotions::V1::PromotionStatus::DestinationStatus::State] + # Output only. The status for the specified destination. + class DestinationStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The current state of the promotion. + module State + # Unknown promotion state. + STATE_UNSPECIFIED = 0 + + # The promotion is under review. + IN_REVIEW = 1 + + # The promotion is disapproved. + REJECTED = 2 + + # The promotion is approved and active. + LIVE = 3 + + # The promotion is stopped by merchant. + STOPPED = 4 + + # The promotion is no longer active. + EXPIRED = 5 + + # The promotion is not stopped, and all reviews are approved, but the + # active date is in the future. + PENDING = 6 + end + end + + # The issue associated with the promotion. + # @!attribute [r] code + # @return [::String] + # Output only. The error code of the issue. + # @!attribute [r] severity + # @return [::Google::Shopping::Merchant::Promotions::V1::PromotionStatus::ItemLevelIssue::Severity] + # Output only. How this issue affects serving of the promotion. + # @!attribute [r] resolution + # @return [::String] + # Output only. Whether the issue can be resolved by the merchant. + # @!attribute [r] attribute + # @return [::String] + # Output only. The attribute's name, if the issue is caused by a single + # attribute. + # @!attribute [r] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # Output only. The destination the issue applies to. + # @!attribute [r] description + # @return [::String] + # Output only. A short issue description in English. + # @!attribute [r] detail + # @return [::String] + # Output only. A detailed issue description in English. + # @!attribute [r] documentation + # @return [::String] + # Output only. The URL of a web page to help with resolving this issue. + # @!attribute [r] applicable_countries + # @return [::Array<::String>] + # Output only. List of country codes (ISO 3166-1 alpha-2) where issue + # applies to the offer. + class ItemLevelIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The severity of the issue. + module Severity + # Not specified. + SEVERITY_UNSPECIFIED = 0 + + # This issue represents a warning and does not have a direct affect + # on the promotion. + NOT_IMPACTED = 1 + + # The promotion is demoted and most likely have limited performance + # in search results + DEMOTED = 2 + + # Issue disapproves the promotion. + DISAPPROVED = 3 + end + end + end + + # Which product or list of products the promotion applies to. + module ProductApplicability + # Which products the promotion applies to is unknown. + PRODUCT_APPLICABILITY_UNSPECIFIED = 0 + + # Applicable to all products. + ALL_PRODUCTS = 1 + + # Applicable to only a single product or list of products. + SPECIFIC_PRODUCTS = 2 + end + + # Store codes or list of store codes the promotion applies to. Only for + # Local inventory ads promotions. + module StoreApplicability + # Which store codes the promotion applies to is unknown. + STORE_APPLICABILITY_UNSPECIFIED = 0 + + # Promotion applies to all stores. + ALL_STORES = 1 + + # Promotion applies to only the specified stores. + SPECIFIC_STORES = 2 + end + + # Offer type of a promotion. + module OfferType + # Unknown offer type. + OFFER_TYPE_UNSPECIFIED = 0 + + # Offer type without a code. + NO_CODE = 1 + + # Offer type with a code. Generic redemption code for the promotion is + # required when `offerType` = `GENERIC_CODE`. + GENERIC_CODE = 2 + end + + # Channel of a promotion. + module RedemptionChannel + # Indicates that the channel is unspecified. + REDEMPTION_CHANNEL_UNSPECIFIED = 0 + + # Indicates that the channel is in store. + # This is same as `local` channel used for `products`. + IN_STORE = 1 + + # Indicates that the channel is online. + ONLINE = 2 + end + + # [Coupon value + # type](https://support.google.com/merchants/answer/13861986) + # of a promotion. + module CouponValueType + # Indicates that the coupon value type is unspecified. + COUPON_VALUE_TYPE_UNSPECIFIED = 0 + + # Money off coupon value type. + MONEY_OFF = 1 + + # Percent off coupon value type. + PERCENT_OFF = 2 + + # Buy M quantity, get N money off coupon value type. + # `minimum_purchase_quantity` and `get_this_quantity_discounted` must be + # present. `money_off_amount` must also be present. + BUY_M_GET_N_MONEY_OFF = 3 + + # Buy M quantity, get N percent off coupon value type. + # `minimum_purchase_quantity` and `get_this_quantity_discounted` must be + # present. `percent_off_percentage` must also be present. + BUY_M_GET_N_PERCENT_OFF = 4 + + # Buy M quantity, get money off. `minimum_purchase_quantity` and + # `money_off_amount` must be present. + BUY_M_GET_MONEY_OFF = 5 + + # Buy M quantity, get money off. `minimum_purchase_quantity` and + # `percent_off_percentage` must be present. + BUY_M_GET_PERCENT_OFF = 6 + + # Free gift with description only. + FREE_GIFT = 7 + + # Free gift with monetary value. + FREE_GIFT_WITH_VALUE = 8 + + # Free gift with item ID. + FREE_GIFT_WITH_ITEM_ID = 9 + + # Standard free shipping coupon value type. Only available for online + # promotions. + FREE_SHIPPING_STANDARD = 10 + + # Overnight free shipping coupon value type. Only available for online + # promotions. + FREE_SHIPPING_OVERNIGHT = 11 + + # Two day free shipping coupon value type. Only available for online + # promotions. + FREE_SHIPPING_TWO_DAY = 12 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1/proto_docs/google/type/interval.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/type/interval.rb new file mode 100644 index 000000000000..9350ca479005 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/Gemfile new file mode 100644 index 000000000000..17fb138bc4f5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1", path: "../" +else + gem "google-shopping-merchant-promotions-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-promotions-v1/snippets/promotions_service/get_promotion.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/get_promotion.rb new file mode 100644 index 000000000000..b1c409c4e3f9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/get_promotion.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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_PromotionsService_GetPromotion_sync] +require "google/shopping/merchant/promotions/v1" + +## +# Snippet for the get_promotion call in the PromotionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#get_promotion. +# +def get_promotion + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.new + + # Call the get_promotion method. + result = client.get_promotion request + + # The returned object is of type Google::Shopping::Merchant::Promotions::V1::Promotion. + p result +end +# [END merchantapi_v1_generated_PromotionsService_GetPromotion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/insert_promotion.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/insert_promotion.rb new file mode 100644 index 000000000000..542d86aa9afd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/insert_promotion.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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_PromotionsService_InsertPromotion_sync] +require "google/shopping/merchant/promotions/v1" + +## +# Snippet for the insert_promotion call in the PromotionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#insert_promotion. +# +def insert_promotion + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new + + # Call the insert_promotion method. + result = client.insert_promotion request + + # The returned object is of type Google::Shopping::Merchant::Promotions::V1::Promotion. + p result +end +# [END merchantapi_v1_generated_PromotionsService_InsertPromotion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/list_promotions.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/list_promotions.rb new file mode 100644 index 000000000000..4a4bfe6a3cc5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/list_promotions.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_PromotionsService_ListPromotions_sync] +require "google/shopping/merchant/promotions/v1" + +## +# Snippet for the list_promotions call in the PromotionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#list_promotions. +# +def list_promotions + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.new + + # Call the list_promotions method. + result = client.list_promotions request + + # The returned object is of type Gapic::PagedEnumerable. You can 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::Promotions::V1::Promotion. + p item + end +end +# [END merchantapi_v1_generated_PromotionsService_ListPromotions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/snippet_metadata_google.shopping.merchant.promotions.v1.json b/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/snippet_metadata_google.shopping.merchant.promotions.v1.json new file mode 100644 index 000000000000..a8848c79a929 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/snippet_metadata_google.shopping.merchant.promotions.v1.json @@ -0,0 +1,135 @@ +{ + "client_library": { + "name": "google-shopping-merchant-promotions-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.promotions.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_PromotionsService_InsertPromotion_sync", + "title": "Snippet for the insert_promotion call in the PromotionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#insert_promotion.", + "file": "promotions_service/insert_promotion.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_promotion", + "full_name": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#insert_promotion", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Promotions::V1::Promotion", + "client": { + "short_name": "PromotionsService::Client", + "full_name": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client" + }, + "method": { + "short_name": "InsertPromotion", + "full_name": "google.shopping.merchant.promotions.v1.PromotionsService.InsertPromotion", + "service": { + "short_name": "PromotionsService", + "full_name": "google.shopping.merchant.promotions.v1.PromotionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_PromotionsService_GetPromotion_sync", + "title": "Snippet for the get_promotion call in the PromotionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#get_promotion.", + "file": "promotions_service/get_promotion.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_promotion", + "full_name": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#get_promotion", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Promotions::V1::Promotion", + "client": { + "short_name": "PromotionsService::Client", + "full_name": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client" + }, + "method": { + "short_name": "GetPromotion", + "full_name": "google.shopping.merchant.promotions.v1.PromotionsService.GetPromotion", + "service": { + "short_name": "PromotionsService", + "full_name": "google.shopping.merchant.promotions.v1.PromotionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_PromotionsService_ListPromotions_sync", + "title": "Snippet for the list_promotions call in the PromotionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#list_promotions.", + "file": "promotions_service/list_promotions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_promotions", + "full_name": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#list_promotions", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Promotions::V1::ListPromotionsResponse", + "client": { + "short_name": "PromotionsService::Client", + "full_name": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client" + }, + "method": { + "short_name": "ListPromotions", + "full_name": "google.shopping.merchant.promotions.v1.PromotionsService.ListPromotions", + "service": { + "short_name": "PromotionsService", + "full_name": "google.shopping.merchant.promotions.v1.PromotionsService" + } + } + }, + "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-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_paths_test.rb new file mode 100644 index 000000000000..a6226b082804 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_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/promotions/v1/promotions_service" + +class ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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_promotion_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::Promotions::V1::PromotionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.promotion_path account: "value0", promotion: "value1" + assert_equal "accounts/value0/promotions/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_rest_test.rb new file mode 100644 index 000000000000..873f2adddb0c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_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/merchant/promotions/v1/promotions_pb" +require "google/shopping/merchant/promotions/v1/promotions_service/rest" + + +class ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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_promotion + # Create test objects. + client_result = ::Google::Shopping::Merchant::Promotions::V1::Promotion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + promotion = {} + data_source = "hello world" + + insert_promotion_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::ServiceStub.stub :transcode_insert_promotion_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_promotion_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.insert_promotion({ parent: parent, promotion: promotion, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.insert_promotion parent: parent, promotion: promotion, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.insert_promotion ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new(parent: parent, promotion: promotion, data_source: data_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.insert_promotion({ parent: parent, promotion: promotion, data_source: data_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.insert_promotion(::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new(parent: parent, promotion: promotion, data_source: data_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_promotion_client_stub.call_count + end + end + end + + def test_get_promotion + # Create test objects. + client_result = ::Google::Shopping::Merchant::Promotions::V1::Promotion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_promotion_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::ServiceStub.stub :transcode_get_promotion_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_promotion_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_promotion({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_promotion name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_promotion ::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_promotion({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_promotion(::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_promotion_client_stub.call_count + end + end + end + + def test_list_promotions + # Create test objects. + client_result = ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsResponse.new + http_response = OpenStruct.new 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_promotions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::ServiceStub.stub :transcode_list_promotions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_promotions_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_promotions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_promotions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_promotions ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.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 + c.list_promotions({ 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 + c.list_promotions(::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.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_promotions_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::Promotions::V1::PromotionsService::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::Promotions::V1::PromotionsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_test.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_test.rb new file mode 100644 index 000000000000..448c5a90531c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/promotions/v1/promotions_pb" +require "google/shopping/merchant/promotions/v1/promotions_service" + +class ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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_promotion + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Promotions::V1::Promotion.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + promotion = {} + data_source = "hello world" + + insert_promotion_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_promotion, name + assert_kind_of ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Promotions::V1::Promotion), request["promotion"] + assert_equal "hello world", request["data_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_promotion_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.insert_promotion({ parent: parent, promotion: promotion, data_source: data_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.insert_promotion parent: parent, promotion: promotion, data_source: data_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.insert_promotion ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new(parent: parent, promotion: promotion, data_source: data_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.insert_promotion({ parent: parent, promotion: promotion, 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 + c.insert_promotion(::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new(parent: parent, promotion: promotion, 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, insert_promotion_client_stub.call_rpc_count + end + end + + def test_get_promotion + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Promotions::V1::Promotion.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_promotion_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_promotion, name + assert_kind_of ::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_promotion_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_promotion({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_promotion name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_promotion ::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_promotion({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_promotion(::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_promotion_client_stub.call_rpc_count + end + end + + def test_list_promotions + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_promotions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_promotions, name + assert_kind_of ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest, 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_promotions_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_promotions({ parent: parent, page_size: page_size, page_token: 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 + c.list_promotions parent: parent, page_size: page_size, page_token: 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 + c.list_promotions ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.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 + c.list_promotions({ 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 + c.list_promotions(::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.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_promotions_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::Promotions::V1::PromotionsService::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::Promotions::V1::PromotionsService::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::Promotions::V1::PromotionsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +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-promotions-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.gitignore @@ -0,0 +1,20 @@ +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-promotions-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..2fa9cbe28259 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta", + "distribution_name": "google-shopping-merchant-promotions-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-promotions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-promotions 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-promotions-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.rubocop.yml new file mode 100644 index 000000000000..ce1351ccf70b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-promotions-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-promotions-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.yardopts new file mode 100644 index 000000000000..3ddd15e0cf87 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..a022c9c4d685 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-promotions-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-promotions-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/promotions/v1beta" + +client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::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/promotions/v1beta" + +::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::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-promotions-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/promotions/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::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-promotions-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/Gemfile @@ -0,0 +1,15 @@ +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-reporters", "~> 1.8.0", require: false +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-promotions-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/README.md new file mode 100644 index 000000000000..ebf83aefe16e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions](https://rubygems.org/gems/google-shopping-merchant-promotions). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-promotions-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/promotions/v1beta" + +client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new +request = ::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest.new # (request fields as keyword arguments...) +response = client.insert_promotion request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-promotions-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/promotions/v1beta" +require "logger" + +client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::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.2+. + +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-promotions`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-promotions-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-promotions`. +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-promotions-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-promotions-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/Rakefile new file mode 100644 index 000000000000..e317bc9466c7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-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/promotions/v1beta/promotions_service/credentials" + ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::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-promotions-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-promotions-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-promotions-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-promotions-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-promotions-v1beta" + header "google-shopping-merchant-promotions-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-promotions-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-promotions-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-promotions-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-promotions-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-promotions-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..2b4a40a14e12 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/gapic_metadata.json @@ -0,0 +1,33 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.promotions.v1beta", + "libraryPackage": "::Google::Shopping::Merchant::Promotions::V1beta", + "services": { + "PromotionsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client", + "rpcs": { + "InsertPromotion": { + "methods": [ + "insert_promotion" + ] + }, + "GetPromotion": { + "methods": [ + "get_promotion" + ] + }, + "ListPromotions": { + "methods": [ + "list_promotions" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/google-shopping-merchant-promotions-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/google-shopping-merchant-promotions-v1beta.gemspec new file mode 100644 index 000000000000..a7410133a2e3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/google-shopping-merchant-promotions-v1beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/promotions/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-promotions-v1beta" + gem.version = Google::Shopping::Merchant::Promotions::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-promotions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-promotions 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.3" + 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-promotions-v1beta/lib/google-shopping-merchant-promotions-v1beta.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google-shopping-merchant-promotions-v1beta.rb new file mode 100644 index 000000000000..c10f79fc005e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google-shopping-merchant-promotions-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/promotions/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta.rb new file mode 100644 index 000000000000..dfaeefd3dd24 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/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/promotions/v1beta/promotions_service" +require "google/shopping/merchant/promotions/v1beta/version" + +module Google + module Shopping + module Merchant + module Promotions + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/promotions/v1beta" + # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/promotions/v1beta" + # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/shopping/merchant/promotions/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_common_pb.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_common_pb.rb new file mode 100644 index 000000000000..655f3c9d98c3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_common_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/promotions/v1beta/promotions_common.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' +require 'google/shopping/type/types_pb' +require 'google/type/interval_pb' + + +descriptor_data = "\nBgoogle/shopping/merchant/promotions/v1beta/promotions_common.proto\x12*google.shopping.merchant.promotions.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/interval.proto\"\xd5\x0b\n\nAttributes\x12\x64\n\x15product_applicability\x18\x01 \x01(\x0e\x32@.google.shopping.merchant.promotions.v1beta.ProductApplicabilityB\x03\xe0\x41\x02\x12N\n\noffer_type\x18\x02 \x01(\x0e\x32\x35.google.shopping.merchant.promotions.v1beta.OfferTypeB\x03\xe0\x41\x02\x12$\n\x17generic_redemption_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nlong_title\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12[\n\x11\x63oupon_value_type\x18\x05 \x01(\x0e\x32;.google.shopping.merchant.promotions.v1beta.CouponValueTypeB\x03\xe0\x41\x02\x12V\n\x16promotion_destinations\x18\x06 \x03(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnumB\x03\xe0\x41\x02\x12\x1e\n\x11item_id_inclusion\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62rand_inclusion\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12$\n\x17item_group_id_inclusion\x18\t \x03(\tB\x03\xe0\x41\x01\x12#\n\x16product_type_inclusion\x18\n \x03(\tB\x03\xe0\x41\x01\x12\x1e\n\x11item_id_exclusion\x18\x0b \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62rand_exclusion\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12$\n\x17item_group_id_exclusion\x18\r \x03(\tB\x03\xe0\x41\x01\x12#\n\x16product_type_exclusion\x18\x0e \x03(\tB\x03\xe0\x41\x01\x12\x41\n\x17minimum_purchase_amount\x18\x0f \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12&\n\x19minimum_purchase_quantity\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1b\n\x0elimit_quantity\x18\x11 \x01(\x03\x42\x03\xe0\x41\x01\x12\x35\n\x0blimit_value\x18\x12 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\x18\n\x0bpercent_off\x18\x13 \x01(\x03\x42\x03\xe0\x41\x01\x12:\n\x10money_off_amount\x18\x14 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12)\n\x1cget_this_quantity_discounted\x18\x15 \x01(\x03\x42\x03\xe0\x41\x01\x12\x39\n\x0f\x66ree_gift_value\x18\x16 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\"\n\x15\x66ree_gift_description\x18\x17 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x66ree_gift_item_id\x18\x18 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x1fpromotion_effective_time_period\x18\x19 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x02\x12\x41\n\x1dpromotion_display_time_period\x18\x1a \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\x12`\n\x13store_applicability\x18\x1c \x01(\x0e\x32>.google.shopping.merchant.promotions.v1beta.StoreApplicabilityB\x03\xe0\x41\x01\x12\"\n\x15store_codes_inclusion\x18\x1d \x03(\tB\x03\xe0\x41\x01\x12\"\n\x15store_codes_exclusion\x18\x1e \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\rpromotion_url\x18\x1f \x01(\tB\x03\xe0\x41\x01\"\x91\t\n\x0fPromotionStatus\x12p\n\x14\x64\x65stination_statuses\x18\x01 \x03(\x0b\x32M.google.shopping.merchant.promotions.v1beta.PromotionStatus.DestinationStatusB\x03\xe0\x41\x03\x12j\n\x11item_level_issues\x18\x02 \x03(\x0b\x32J.google.shopping.merchant.promotions.v1beta.PromotionStatus.ItemLevelIssueB\x03\xe0\x41\x03\x12\x36\n\rcreation_date\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_update_date\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\xc8\x02\n\x11\x44\x65stinationStatus\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x12h\n\x06status\x18\x02 \x01(\x0e\x32S.google.shopping.merchant.promotions.v1beta.PromotionStatus.DestinationStatus.StateB\x03\xe0\x41\x03\"l\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tIN_REVIEW\x10\x01\x12\x0c\n\x08REJECTED\x10\x02\x12\x08\n\x04LIVE\x10\x03\x12\x0b\n\x07STOPPED\x10\x04\x12\x0b\n\x07\x45XPIRED\x10\x05\x12\x0b\n\x07PENDING\x10\x06\x1a\xe1\x03\n\x0eItemLevelIssue\x12\x11\n\x04\x63ode\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12j\n\x08severity\x18\x02 \x01(\x0e\x32S.google.shopping.merchant.promotions.v1beta.PromotionStatus.ItemLevelIssue.SeverityB\x03\xe0\x41\x03\x12\x17\n\nresolution\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tattribute\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12[\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rdocumentation\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12!\n\x14\x61pplicable_countries\x18\t \x03(\tB\x03\xe0\x41\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*f\n\x14ProductApplicability\x12%\n!PRODUCT_APPLICABILITY_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41LL_PRODUCTS\x10\x01\x12\x15\n\x11SPECIFIC_PRODUCTS\x10\x02*^\n\x12StoreApplicability\x12#\n\x1fSTORE_APPLICABILITY_UNSPECIFIED\x10\x00\x12\x0e\n\nALL_STORES\x10\x01\x12\x13\n\x0fSPECIFIC_STORES\x10\x02*F\n\tOfferType\x12\x1a\n\x16OFFER_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NO_CODE\x10\x01\x12\x10\n\x0cGENERIC_CODE\x10\x02*Q\n\x11RedemptionChannel\x12\"\n\x1eREDEMPTION_CHANNEL_UNSPECIFIED\x10\x00\x12\x0c\n\x08IN_STORE\x10\x01\x12\n\n\x06ONLINE\x10\x02*\xd9\x02\n\x0f\x43ouponValueType\x12!\n\x1d\x43OUPON_VALUE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tMONEY_OFF\x10\x01\x12\x0f\n\x0bPERCENT_OFF\x10\x02\x12\x19\n\x15\x42UY_M_GET_N_MONEY_OFF\x10\x03\x12\x1b\n\x17\x42UY_M_GET_N_PERCENT_OFF\x10\x04\x12\x17\n\x13\x42UY_M_GET_MONEY_OFF\x10\x05\x12\x19\n\x15\x42UY_M_GET_PERCENT_OFF\x10\x06\x12\r\n\tFREE_GIFT\x10\x07\x12\x18\n\x14\x46REE_GIFT_WITH_VALUE\x10\x08\x12\x1a\n\x16\x46REE_GIFT_WITH_ITEM_ID\x10\t\x12\x1a\n\x16\x46REE_SHIPPING_STANDARD\x10\n\x12\x1b\n\x17\x46REE_SHIPPING_OVERNIGHT\x10\x0b\x12\x19\n\x15\x46REE_SHIPPING_TWO_DAY\x10\x0c\x42\x9f\x01\n.com.google.shopping.merchant.promotions.v1betaB\x15PromotionsCommonProtoP\x01ZTcloud.google.com/go/shopping/merchant/promotions/apiv1beta/promotionspb;promotionspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Promotions + module V1beta + Attributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.Attributes").msgclass + PromotionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.PromotionStatus").msgclass + PromotionStatus::DestinationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.PromotionStatus.DestinationStatus").msgclass + PromotionStatus::DestinationStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.PromotionStatus.DestinationStatus.State").enummodule + PromotionStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.PromotionStatus.ItemLevelIssue").msgclass + PromotionStatus::ItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.PromotionStatus.ItemLevelIssue.Severity").enummodule + ProductApplicability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.ProductApplicability").enummodule + StoreApplicability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.StoreApplicability").enummodule + OfferType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.OfferType").enummodule + RedemptionChannel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.RedemptionChannel").enummodule + CouponValueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.CouponValueType").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_pb.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_pb.rb new file mode 100644 index 000000000000..76a9a9d3591f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/promotions/v1beta/promotions.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/promotions/v1beta/promotions_common_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n;google/shopping/merchant/promotions/v1beta/promotions.proto\x12*google.shopping.merchant.promotions.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x42google/shopping/merchant/promotions/v1beta/promotions_common.proto\x1a google/shopping/type/types.proto\"\x85\x05\n\tPromotion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0cpromotion_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0etarget_country\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12^\n\x12redemption_channel\x18\x05 \x03(\x0e\x32=.google.shopping.merchant.promotions.v1beta.RedemptionChannelB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12O\n\nattributes\x18\x07 \x01(\x0b\x32\x36.google.shopping.merchant.promotions.v1beta.AttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\x08 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01\x12Z\n\x10promotion_status\x18\t \x01(\x0b\x32;.google.shopping.merchant.promotions.v1beta.PromotionStatusB\x03\xe0\x41\x03\x12 \n\x0eversion_number\x18\n \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01:k\xea\x41h\n$merchantapi.googleapis.com/Promotion\x12)accounts/{account}/promotions/{promotion}*\npromotions2\tpromotionB\x11\n\x0f_version_number\"\x96\x01\n\x16InsertPromotionRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12M\n\tpromotion\x18\x02 \x01(\x0b\x32\x35.google.shopping.merchant.promotions.v1beta.PromotionB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"Q\n\x13GetPromotionRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$merchantapi.googleapis.com/Promotion\"]\n\x15ListPromotionsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x03\"|\n\x16ListPromotionsResponse\x12I\n\npromotions\x18\x01 \x03(\x0b\x32\x35.google.shopping.merchant.promotions.v1beta.Promotion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xd9\x05\n\x11PromotionsService\x12\xd1\x01\n\x0fInsertPromotion\x12\x42.google.shopping.merchant.promotions.v1beta.InsertPromotionRequest\x1a\x35.google.shopping.merchant.promotions.v1beta.Promotion\"C\x82\xd3\xe4\x93\x02=\"8/promotions/v1beta/{parent=accounts/*}/promotions:insert:\x01*\x12\xc8\x01\n\x0cGetPromotion\x12?.google.shopping.merchant.promotions.v1beta.GetPromotionRequest\x1a\x35.google.shopping.merchant.promotions.v1beta.Promotion\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/promotions/v1beta/{name=accounts/*/promotions/*}\x12\xdb\x01\n\x0eListPromotions\x12\x41.google.shopping.merchant.promotions.v1beta.ListPromotionsRequest\x1a\x42.google.shopping.merchant.promotions.v1beta.ListPromotionsResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/promotions/v1beta/{parent=accounts/*}/promotions\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xd4\x01\n.com.google.shopping.merchant.promotions.v1betaB\x0fPromotionsProtoP\x01ZTcloud.google.com/go/shopping/merchant/promotions/apiv1beta/promotionspb;promotionspb\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 Promotions + module V1beta + Promotion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.Promotion").msgclass + InsertPromotionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.InsertPromotionRequest").msgclass + GetPromotionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.GetPromotionRequest").msgclass + ListPromotionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.ListPromotionsRequest").msgclass + ListPromotionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.ListPromotionsResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service.rb new file mode 100644 index 000000000000..5228821b12f3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_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/promotions/v1beta/version" + +require "google/shopping/merchant/promotions/v1beta/promotions_service/credentials" +require "google/shopping/merchant/promotions/v1beta/promotions_service/paths" +require "google/shopping/merchant/promotions/v1beta/promotions_service/client" +require "google/shopping/merchant/promotions/v1beta/promotions_service/rest" + +module Google + module Shopping + module Merchant + module Promotions + module V1beta + ## + # Service to manage promotions for products. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/promotions/v1beta/promotions_service" + # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/promotions/v1beta/promotions_service/rest" + # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new + # + module PromotionsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "promotions_service", "helpers.rb" +require "google/shopping/merchant/promotions/v1beta/promotions_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/client.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/client.rb new file mode 100644 index 000000000000..f1d506169661 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/client.rb @@ -0,0 +1,692 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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/promotions/v1beta/promotions_pb" + +module Google + module Shopping + module Merchant + module Promotions + module V1beta + module PromotionsService + ## + # Client for the PromotionsService service. + # + # Service to manage promotions for products. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :promotions_service_stub + + ## + # Configure the PromotionsService Client class. + # + # See {::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PromotionsService clients + # ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.configure do |config| + # config.timeout = 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", "Promotions", "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 PromotionsService Client instance. + # + # The configuration is set to the derived mode, meaning that values 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::Promotions::V1beta::PromotionsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @promotions_service_stub.universe_domain + end + + ## + # Create a new PromotionsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PromotionsService 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/promotions/v1beta/promotions_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 + + @promotions_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @promotions_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 + @promotions_service_stub.logger + end + + # Service calls + + ## + # Inserts a promotion for your Merchant Center account. If the promotion + # already exists, then it updates the promotion instead. + # + # @overload insert_promotion(request, options = nil) + # Pass arguments to `insert_promotion` via a request object, either of type + # {::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_promotion(parent: nil, promotion: nil, data_source: nil) + # Pass arguments to `insert_promotion` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 the promotion will be inserted. + # Format: accounts/\\{account} + # @param promotion [::Google::Shopping::Merchant::Promotions::V1beta::Promotion, ::Hash] + # Required. The promotion to insert. + # @param data_source [::String] + # Required. The data source of the + # [promotion](https://support.google.com/merchants/answer/6396268?sjid=5155774230887277618-NC) + # Format: + # `accounts/{account}/dataSources/{datasource}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/promotions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest.new + # + # # Call the insert_promotion method. + # result = client.insert_promotion request + # + # # The returned object is of type Google::Shopping::Merchant::Promotions::V1beta::Promotion. + # p result + # + def insert_promotion request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest + + # Converts hash and nil to 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_promotion.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Promotions::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_promotion.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_promotion.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @promotions_service_stub.call_rpc :insert_promotion, request, 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 promotion from your Merchant Center account. + # + # After inserting or updating a promotion input, it may take several + # minutes before the updated promotion can be retrieved. + # + # @overload get_promotion(request, options = nil) + # Pass arguments to `get_promotion` via a request object, either of type + # {::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_promotion(name: nil) + # Pass arguments to `get_promotion` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the promotion to retrieve. + # Format: `accounts/{account}/promotions/{promotions}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/promotions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest.new + # + # # Call the get_promotion method. + # result = client.get_promotion request + # + # # The returned object is of type Google::Shopping::Merchant::Promotions::V1beta::Promotion. + # p result + # + def get_promotion request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_promotion.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Promotions::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_promotion.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_promotion.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @promotions_service_stub.call_rpc :get_promotion, request, 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 promotions in your Merchant 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 or updating a promotion, it may take several minutes before + # the updated processed promotion can be retrieved. + # + # @overload list_promotions(request, options = nil) + # Pass arguments to `list_promotions` via a request object, either of type + # {::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_promotions(parent: nil) + # Pass arguments to `list_promotions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 processed promotions for. + # Format: `accounts/{account}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Promotions::V1beta::Promotion>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Promotions::V1beta::Promotion>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/promotions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest.new + # + # # Call the list_promotions method. + # result = client.list_promotions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can 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::Promotions::V1beta::Promotion. + # p item + # end + # + def list_promotions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_promotions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Promotions::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_promotions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_promotions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @promotions_service_stub.call_rpc :list_promotions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @promotions_service_stub, :list_promotions, request, response, 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 PromotionsService API. + # + # This class represents the configuration for PromotionsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_promotion to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_promotion.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_promotion.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::Promotions::V1beta::PromotionsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the PromotionsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `insert_promotion` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_promotion + ## + # RPC-specific configuration for `get_promotion` + # @return [::Gapic::Config::Method] + # + attr_reader :get_promotion + ## + # RPC-specific configuration for `list_promotions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_promotions + + # @private + def initialize parent_rpcs = nil + insert_promotion_config = parent_rpcs.insert_promotion if parent_rpcs.respond_to? :insert_promotion + @insert_promotion = ::Gapic::Config::Method.new insert_promotion_config + get_promotion_config = parent_rpcs.get_promotion if parent_rpcs.respond_to? :get_promotion + @get_promotion = ::Gapic::Config::Method.new get_promotion_config + list_promotions_config = parent_rpcs.list_promotions if parent_rpcs.respond_to? :list_promotions + @list_promotions = ::Gapic::Config::Method.new list_promotions_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-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/credentials.rb new file mode 100644 index 000000000000..eebde160342e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_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 Promotions + module V1beta + module PromotionsService + # Credentials for the PromotionsService 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-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/paths.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/paths.rb new file mode 100644 index 000000000000..19c1177beb9f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_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 Promotions + module V1beta + module PromotionsService + # Path helper methods for the PromotionsService API. + module Paths + ## + # Create a fully-qualified Promotion resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/promotions/{promotion}` + # + # @param account [String] + # @param promotion [String] + # + # @return [::String] + def promotion_path account:, promotion: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/promotions/#{promotion}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest.rb new file mode 100644 index 000000000000..3877791112d1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_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/promotions/v1beta/version" + +require "google/shopping/merchant/promotions/v1beta/promotions_service/credentials" +require "google/shopping/merchant/promotions/v1beta/promotions_service/paths" +require "google/shopping/merchant/promotions/v1beta/promotions_service/rest/client" + +module Google + module Shopping + module Merchant + module Promotions + module V1beta + ## + # Service to manage promotions for products. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/promotions/v1beta/promotions_service/rest" + # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new + # + module PromotionsService + # 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/promotions/v1beta/promotions_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/client.rb new file mode 100644 index 000000000000..ae1bd17618d9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/client.rb @@ -0,0 +1,628 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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/promotions/v1beta/promotions_pb" +require "google/shopping/merchant/promotions/v1beta/promotions_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Promotions + module V1beta + module PromotionsService + module Rest + ## + # REST client for the PromotionsService service. + # + # Service to manage promotions for products. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :promotions_service_stub + + ## + # Configure the PromotionsService Client class. + # + # See {::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PromotionsService clients + # ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::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", "Promotions", "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 PromotionsService Client instance. + # + # The configuration is set to the derived mode, meaning that values 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::Promotions::V1beta::PromotionsService::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 + @promotions_service_stub.universe_domain + end + + ## + # Create a new PromotionsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PromotionsService 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 + + @promotions_service_stub = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @promotions_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 + @promotions_service_stub.logger + end + + # Service calls + + ## + # Inserts a promotion for your Merchant Center account. If the promotion + # already exists, then it updates the promotion instead. + # + # @overload insert_promotion(request, options = nil) + # Pass arguments to `insert_promotion` via a request object, either of type + # {::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_promotion(parent: nil, promotion: nil, data_source: nil) + # Pass arguments to `insert_promotion` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 the promotion will be inserted. + # Format: accounts/\\{account} + # @param promotion [::Google::Shopping::Merchant::Promotions::V1beta::Promotion, ::Hash] + # Required. The promotion to insert. + # @param data_source [::String] + # Required. The data source of the + # [promotion](https://support.google.com/merchants/answer/6396268?sjid=5155774230887277618-NC) + # Format: + # `accounts/{account}/dataSources/{datasource}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/promotions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest.new + # + # # Call the insert_promotion method. + # result = client.insert_promotion request + # + # # The returned object is of type Google::Shopping::Merchant::Promotions::V1beta::Promotion. + # p result + # + def insert_promotion request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest + + # Converts hash and nil to an 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_promotion.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Promotions::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_promotion.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_promotion.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @promotions_service_stub.insert_promotion request, 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 promotion from your Merchant Center account. + # + # After inserting or updating a promotion input, it may take several + # minutes before the updated promotion can be retrieved. + # + # @overload get_promotion(request, options = nil) + # Pass arguments to `get_promotion` via a request object, either of type + # {::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_promotion(name: nil) + # Pass arguments to `get_promotion` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the promotion to retrieve. + # Format: `accounts/{account}/promotions/{promotions}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/promotions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest.new + # + # # Call the get_promotion method. + # result = client.get_promotion request + # + # # The returned object is of type Google::Shopping::Merchant::Promotions::V1beta::Promotion. + # p result + # + def get_promotion request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_promotion.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Promotions::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_promotion.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_promotion.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @promotions_service_stub.get_promotion request, 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 promotions in your Merchant 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 or updating a promotion, it may take several minutes before + # the updated processed promotion can be retrieved. + # + # @overload list_promotions(request, options = nil) + # Pass arguments to `list_promotions` via a request object, either of type + # {::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_promotions(parent: nil) + # Pass arguments to `list_promotions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 processed promotions for. + # Format: `accounts/{account}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Promotions::V1beta::Promotion>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Promotions::V1beta::Promotion>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/promotions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest.new + # + # # Call the list_promotions method. + # result = client.list_promotions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can 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::Promotions::V1beta::Promotion. + # p item + # end + # + def list_promotions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_promotions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Promotions::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_promotions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_promotions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @promotions_service_stub.list_promotions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @promotions_service_stub, :list_promotions, "promotions", request, result, 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 PromotionsService REST API. + # + # This class represents the configuration for PromotionsService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_promotion to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.insert_promotion.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.insert_promotion.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the PromotionsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `insert_promotion` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_promotion + ## + # RPC-specific configuration for `get_promotion` + # @return [::Gapic::Config::Method] + # + attr_reader :get_promotion + ## + # RPC-specific configuration for `list_promotions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_promotions + + # @private + def initialize parent_rpcs = nil + insert_promotion_config = parent_rpcs.insert_promotion if parent_rpcs.respond_to? :insert_promotion + @insert_promotion = ::Gapic::Config::Method.new insert_promotion_config + get_promotion_config = parent_rpcs.get_promotion if parent_rpcs.respond_to? :get_promotion + @get_promotion = ::Gapic::Config::Method.new get_promotion_config + list_promotions_config = parent_rpcs.list_promotions if parent_rpcs.respond_to? :list_promotions + @list_promotions = ::Gapic::Config::Method.new list_promotions_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-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/service_stub.rb new file mode 100644 index 000000000000..8219c8fdf658 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_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/promotions/v1beta/promotions_pb" + +module Google + module Shopping + module Merchant + module Promotions + module V1beta + module PromotionsService + module Rest + ## + # REST service stub for the PromotionsService 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_promotion REST call + # + # @param request_pb [::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] + # A result object deserialized from the server's reply + def insert_promotion request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_promotion_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_promotion", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Promotions::V1beta::Promotion.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_promotion REST call + # + # @param request_pb [::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] + # A result object deserialized from the server's reply + def get_promotion request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_promotion_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_promotion", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Promotions::V1beta::Promotion.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_promotions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsResponse] + # A result object deserialized from the server's reply + def list_promotions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_promotions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_promotions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsResponse.decode_json response.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_promotion REST call + # + # @param request_pb [::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest] + # 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_promotion_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/promotions/v1beta/{parent}/promotions:insert", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_promotion REST call + # + # @param request_pb [::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_promotion_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/promotions/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/promotions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_promotions REST call + # + # @param request_pb [::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_promotions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/promotions/v1beta/{parent}/promotions", + 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-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_services_pb.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_services_pb.rb new file mode 100644 index 000000000000..5065716b05be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_services_pb.rb @@ -0,0 +1,60 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/promotions/v1beta/promotions.proto for package 'google.shopping.merchant.promotions.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/promotions/v1beta/promotions_pb' + +module Google + module Shopping + module Merchant + module Promotions + module V1beta + module PromotionsService + # Service to manage promotions for products. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.promotions.v1beta.PromotionsService' + + # Inserts a promotion for your Merchant Center account. If the promotion + # already exists, then it updates the promotion instead. + rpc :InsertPromotion, ::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest, ::Google::Shopping::Merchant::Promotions::V1beta::Promotion + # Retrieves the promotion from your Merchant Center account. + # + # After inserting or updating a promotion input, it may take several + # minutes before the updated promotion can be retrieved. + rpc :GetPromotion, ::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest, ::Google::Shopping::Merchant::Promotions::V1beta::Promotion + # Lists the promotions in your Merchant 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 or updating a promotion, it may take several minutes before + # the updated processed promotion can be retrieved. + rpc :ListPromotions, ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest, ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/rest.rb new file mode 100644 index 000000000000..ddbc997c4bc8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/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/promotions/v1beta/promotions_service/rest" +require "google/shopping/merchant/promotions/v1beta/version" + +module Google + module Shopping + module Merchant + module Promotions + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/promotions/v1beta/rest" + # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new + # + module V1beta + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/version.rb new file mode 100644 index 000000000000..13c0b3364c69 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/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 Promotions + module V1beta + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..03467a3756be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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. + # + # Note: This field should not be used in most cases. + 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. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # 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-promotions-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 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-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions.rb new file mode 100644 index 000000000000..5589a80a6d2c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions.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 Promotions + module V1beta + # Represents a promotion. See the following articles for more details. + # + # Required promotion input attributes to pass data validation checks are + # primarily defined below: + # + # * [Promotions data + # specification](https://support.google.com/merchants/answer/2906014) + # * [Local promotions data + # specification](https://support.google.com/merchants/answer/10146130) + # + # After inserting, updating a promotion input, it may take several minutes + # before the final promotion can be retrieved. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the promotion. + # Format: `accounts/{account}/promotions/{promotion}` + # @!attribute [rw] promotion_id + # @return [::String] + # Required. The user provided promotion ID to uniquely identify the + # promotion. Follow [minimum + # requirements](https://support.google.com/merchants/answer/7050148?ref_topic=7322920&sjid=871860036916537104-NC#minimum_requirements) + # to prevent promotion disapprovals. + # @!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 + # promotion. + # + # Promotions is only for [selected + # languages](https://support.google.com/merchants/answer/4588281?ref_topic=6396150&sjid=18314938579342094533-NC#option3&zippy=). + # @!attribute [rw] target_country + # @return [::String] + # Required. 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, [Free Listings and Shopping + # ads](https://support.google.com/merchants/answer/4588460) [Local Inventory + # ads](https://support.google.com/merchants/answer/10146326) + # @!attribute [rw] redemption_channel + # @return [::Array<::Google::Shopping::Merchant::Promotions::V1beta::RedemptionChannel>] + # Required. [Redemption + # channel](https://support.google.com/merchants/answer/13837674?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. At least one channel is required. + # @!attribute [r] data_source + # @return [::String] + # Output only. The primary data source of the promotion. + # @!attribute [rw] attributes + # @return [::Google::Shopping::Merchant::Promotions::V1beta::Attributes] + # Optional. A list of promotion attributes. + # @!attribute [rw] custom_attributes + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Optional. A list of custom (merchant-provided) attributes. It can also be + # used for submitting any attribute of the data specification in its generic + # form (for example, + # `{ "name": "size type", "value": "regular" }`). + # This is useful for submitting attributes not explicitly exposed by the + # API. + # @!attribute [r] promotion_status + # @return [::Google::Shopping::Merchant::Promotions::V1beta::PromotionStatus] + # Output only. The [status of a + # promotion](https://support.google.com/merchants/answer/3398326?ref_topic=7322924&sjid=5155774230887277618-NC), + # data validation issues, that is, information about a promotion computed + # asynchronously. + # @!attribute [rw] version_number + # @return [::Integer] + # Optional. Represents the existing version (freshness) of the promotion, + # which can be used to preserve the right order when multiple updates are + # done at the same time. + # + # If set, the insertion is prevented when version number is lower than + # the current version number of the existing promotion. Re-insertion (for + # example, promotion refresh after 30 days) can be performed with the current + # `version_number`. + # + # If the operation is prevented, the aborted exception will be + # thrown. + class Promotion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertPromotion` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account where the promotion will be inserted. + # Format: accounts/\\{account} + # @!attribute [rw] promotion + # @return [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] + # Required. The promotion to insert. + # @!attribute [rw] data_source + # @return [::String] + # Required. The data source of the + # [promotion](https://support.google.com/merchants/answer/6396268?sjid=5155774230887277618-NC) + # Format: + # `accounts/{account}/dataSources/{datasource}`. + class InsertPromotionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetPromotion` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the promotion to retrieve. + # Format: `accounts/{account}/promotions/{promotions}` + class GetPromotionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListPromotions` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to list processed promotions for. + # Format: `accounts/{account}` + # @!attribute [r] page_size + # @return [::Integer] + # Output only. The maximum number of promotions 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 promotions + # will be returned. + # @!attribute [r] page_token + # @return [::String] + # Output only. A page token, received from a previous `ListPromotions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPromotions` must + # match the call that provided the page token. + class ListPromotionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListPromotions` method. + # @!attribute [rw] promotions + # @return [::Array<::Google::Shopping::Merchant::Promotions::V1beta::Promotion>] + # The processed promotions 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 ListPromotionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions_common.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions_common.rb new file mode 100644 index 000000000000..1020dd50edbd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions_common.rb @@ -0,0 +1,445 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Promotions + module V1beta + # Attributes. + # @!attribute [rw] product_applicability + # @return [::Google::Shopping::Merchant::Promotions::V1beta::ProductApplicability] + # Required. Applicability of the promotion to either all products or + # [only specific + # products](https://support.google.com/merchants/answer/6396257?ref_topic=6396150&sjid=17642868584668136159-NC). + # @!attribute [rw] offer_type + # @return [::Google::Shopping::Merchant::Promotions::V1beta::OfferType] + # Required. + # [Type](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC) + # of the promotion. Use this attribute to indicate whether or not customers + # need a coupon code to redeem your promotion. + # @!attribute [rw] generic_redemption_code + # @return [::String] + # Optional. Generic redemption code for the promotion. To be used with the + # `offerType` field and must meet the [minimum + # requirements](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] long_title + # @return [::String] + # Required. [Long + # title](https://support.google.com/merchants/answer/13838102?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. + # @!attribute [rw] coupon_value_type + # @return [::Google::Shopping::Merchant::Promotions::V1beta::CouponValueType] + # Required. The [coupon value type] + # (https://support.google.com/merchants/answer/13861986?ref_topic=13773355&sjid=17642868584668136159-NC) + # attribute to signal the type of promotion that you are running. Depending + # on type of the selected coupon value [some attributes are + # required](https://support.google.com/merchants/answer/6393006?ref_topic=7322920). + # @!attribute [rw] promotion_destinations + # @return [::Array<::Google::Shopping::Type::Destination::DestinationEnum>] + # Required. The list of destinations where the promotion applies to. If you + # don't specify a destination by including a supported value in your data + # source, your promotion will display in Shopping ads and free listings by + # default. + # + # You may have previously submitted the following values as destinations for + # your products: Shopping Actions, Surfaces across Google, Local surfaces + # across Google. To represent these values use `FREE_LISTINGS`, + # `FREE_LOCAL_LISTINGS`, `LOCAL_INVENTORY_ADS`. For more details see + # [Promotion + # destination](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC) + # @!attribute [rw] item_id_inclusion + # @return [::Array<::String>] + # Optional. Product filter by [item + # ID](https://support.google.com/merchants/answer/13861565?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. The product filter attributes only applies when the + # products eligible for promotion product applicability + # `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] brand_inclusion + # @return [::Array<::String>] + # Optional. Product filter by brand for the promotion. The product filter + # attributes only applies when the products eligible for promotion product + # applicability `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] item_group_id_inclusion + # @return [::Array<::String>] + # Optional. Product filter by item group ID for the promotion. The product + # filter attributes only applies when the products eligible for promotion + # product applicability [product_applicability] attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] product_type_inclusion + # @return [::Array<::String>] + # Optional. Product filter by product type for the promotion. The product + # filter attributes only applies when the products eligible for promotion + # product applicability `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] item_id_exclusion + # @return [::Array<::String>] + # Optional. Product filter by [item ID + # exclusion](https://support.google.com/merchants/answer/13863524?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. The product filter attributes only applies when the + # products eligible for promotion product applicability + # `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] brand_exclusion + # @return [::Array<::String>] + # Optional. Product filter by [brand + # exclusion](https://support.google.com/merchants/answer/13861679?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. The product filter attributes only applies when the + # products eligible for promotion product applicability + # `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] item_group_id_exclusion + # @return [::Array<::String>] + # Optional. Product filter by [item group + # ID](https://support.google.com/merchants/answer/13837298?ref_topic=13773355&sjid=17642868584668136159-NC). + # The product filter attributes only applies when the products eligible for + # promotion product applicability `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # exclusion for the promotion. + # @!attribute [rw] product_type_exclusion + # @return [::Array<::String>] + # Optional. Product filter by [product type + # exclusion](https://support.google.com/merchants/answer/13863746?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. The product filter attributes only applies when the + # products eligible for promotion product applicability + # `product_applicability` attribute is set to + # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] minimum_purchase_amount + # @return [::Google::Shopping::Type::Price] + # Optional. [Minimum purchase + # amount](https://support.google.com/merchants/answer/13837705?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. + # @!attribute [rw] minimum_purchase_quantity + # @return [::Integer] + # Optional. [Minimum purchase + # quantity](https://support.google.com/merchants/answer/13838182?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. + # @!attribute [rw] limit_quantity + # @return [::Integer] + # Optional. [Maximum purchase + # quantity](https://support.google.com/merchants/answer/13861564?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. + # @!attribute [rw] limit_value + # @return [::Google::Shopping::Type::Price] + # Optional. [Maximum product + # price](https://support.google.com/merchants/answer/2906014) for + # promotion. + # @!attribute [rw] percent_off + # @return [::Integer] + # Optional. The [percentage + # discount](https://support.google.com/merchants/answer/13837404?sjid=17642868584668136159-NC) + # offered in the promotion. + # @!attribute [rw] money_off_amount + # @return [::Google::Shopping::Type::Price] + # Optional. The [money off + # amount](https://support.google.com/merchants/answer/13838101?ref_topic=13773355&sjid=17642868584668136159-NC) + # offered in the promotion. + # @!attribute [rw] get_this_quantity_discounted + # @return [::Integer] + # Optional. The number of items discounted in the promotion. The attribute is + # set when `couponValueType` is equal to `buy_m_get_n_money_off` or + # `buy_m_get_n_percent_off`. + # @!attribute [rw] free_gift_value + # @return [::Google::Shopping::Type::Price] + # Optional. [Free gift + # value](https://support.google.com/merchants/answer/13844477?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. + # @!attribute [rw] free_gift_description + # @return [::String] + # Optional. [Free gift + # description](https://support.google.com/merchants/answer/13847245?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. + # @!attribute [rw] free_gift_item_id + # @return [::String] + # Optional. [Free gift item + # ID](https://support.google.com/merchants/answer/13857152?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. + # @!attribute [rw] promotion_effective_time_period + # @return [::Google::Type::Interval] + # Required. `TimePeriod` representation of the promotion's effective dates. + # This attribute specifies that the promotion can be tested on your online + # store during this time period. + # @!attribute [rw] promotion_display_time_period + # @return [::Google::Type::Interval] + # Optional. `TimePeriod` representation of the promotion's display dates. + # This attribute specifies the date and time frame when the promotion will be + # live on Google.com and Shopping ads. If the display time period for + # promotion `promotion_display_time_period` attribute is not specified, the + # promotion effective time period `promotion_effective_time_period` + # determines the date and time frame when the promotion will be live on + # Google.com and Shopping ads. + # @!attribute [rw] store_applicability + # @return [::Google::Shopping::Merchant::Promotions::V1beta::StoreApplicability] + # Optional. Whether the promotion applies to [all stores, or only specified + # stores](https://support.google.com/merchants/answer/13857563?sjid=17642868584668136159-NC). + # Local Inventory ads promotions throw an error if no store applicability is + # included. An `INVALID_ARGUMENT` error is thrown if `store_applicability` is + # set to `ALL_STORES` and `store_codes_inclusion` or `score_code_exclusion` + # is set to a value. + # @!attribute [rw] store_codes_inclusion + # @return [::Array<::String>] + # Optional. [Store codes to + # include](https://support.google.com/merchants/answer/13857470?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. The store filter attributes only applies when the + # `store_applicability` attribute is set to + # [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC). + # + # 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] store_codes_exclusion + # @return [::Array<::String>] + # Optional. [Store codes to + # exclude](https://support.google.com/merchants/answer/13859586?ref_topic=13773355&sjid=17642868584668136159-NC) + # for the promotion. The store filter attributes only applies when the + # `store_applicability` attribute is set to + # [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC). + # @!attribute [rw] promotion_url + # @return [::String] + # Optional. URL to the page on the merchant's site where the promotion shows. + # Local Inventory ads promotions throw an error if no `promotion_url` is + # included. URL is used to confirm that the promotion is valid and can be + # redeemed. + class Attributes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The status of the promotion. + # @!attribute [r] destination_statuses + # @return [::Array<::Google::Shopping::Merchant::Promotions::V1beta::PromotionStatus::DestinationStatus>] + # Output only. The intended destinations for the promotion. + # @!attribute [r] item_level_issues + # @return [::Array<::Google::Shopping::Merchant::Promotions::V1beta::PromotionStatus::ItemLevelIssue>] + # Output only. A list of issues associated with the promotion. + # @!attribute [r] creation_date + # @return [::Google::Protobuf::Timestamp] + # Output only. Date on which the promotion has been created + # in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, + # and offset, for example `2020-01-02T09:00:00+01:00` or + # `2020-01-02T09:00:00Z` + # @!attribute [r] last_update_date + # @return [::Google::Protobuf::Timestamp] + # Output only. Date on which the promotion status has been last updated + # in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, + # and offset, for example `2020-01-02T09:00:00+01:00` or + # `2020-01-02T09:00:00Z` + class PromotionStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The status for the specified destination. + # @!attribute [r] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # Output only. The name of the promotion destination. + # @!attribute [r] status + # @return [::Google::Shopping::Merchant::Promotions::V1beta::PromotionStatus::DestinationStatus::State] + # Output only. The status for the specified destination. + class DestinationStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The current state of the promotion. + module State + # Unknown promotion state. + STATE_UNSPECIFIED = 0 + + # The promotion is under review. + IN_REVIEW = 1 + + # The promotion is disapproved. + REJECTED = 2 + + # The promotion is approved and active. + LIVE = 3 + + # The promotion is stopped by merchant. + STOPPED = 4 + + # The promotion is no longer active. + EXPIRED = 5 + + # The promotion is not stopped, and all reviews are approved, but the + # active date is in the future. + PENDING = 6 + end + end + + # The issue associated with the promotion. + # @!attribute [r] code + # @return [::String] + # Output only. The error code of the issue. + # @!attribute [r] severity + # @return [::Google::Shopping::Merchant::Promotions::V1beta::PromotionStatus::ItemLevelIssue::Severity] + # Output only. How this issue affects serving of the promotion. + # @!attribute [r] resolution + # @return [::String] + # Output only. Whether the issue can be resolved by the merchant. + # @!attribute [r] attribute + # @return [::String] + # Output only. The attribute's name, if the issue is caused by a single + # attribute. + # @!attribute [r] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # Output only. The destination the issue applies to. + # @!attribute [r] description + # @return [::String] + # Output only. A short issue description in English. + # @!attribute [r] detail + # @return [::String] + # Output only. A detailed issue description in English. + # @!attribute [r] documentation + # @return [::String] + # Output only. The URL of a web page to help with resolving this issue. + # @!attribute [r] applicable_countries + # @return [::Array<::String>] + # Output only. List of country codes (ISO 3166-1 alpha-2) where issue + # applies to the offer. + class ItemLevelIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The severity of the issue. + module Severity + # Not specified. + SEVERITY_UNSPECIFIED = 0 + + # This issue represents a warning and does not have a direct affect + # on the promotion. + NOT_IMPACTED = 1 + + # The promotion is demoted and most likely have limited performance + # in search results + DEMOTED = 2 + + # Issue disapproves the promotion. + DISAPPROVED = 3 + end + end + end + + # Which product or list of products the promotion applies to. + module ProductApplicability + # Which products the promotion applies to is unknown. + PRODUCT_APPLICABILITY_UNSPECIFIED = 0 + + # Applicable to all products. + ALL_PRODUCTS = 1 + + # Applicable to only a single product or list of products. + SPECIFIC_PRODUCTS = 2 + end + + # Store codes or list of store codes the promotion applies to. Only for + # Local inventory ads promotions. + module StoreApplicability + # Which store codes the promotion applies to is unknown. + STORE_APPLICABILITY_UNSPECIFIED = 0 + + # Promotion applies to all stores. + ALL_STORES = 1 + + # Promotion applies to only the specified stores. + SPECIFIC_STORES = 2 + end + + # Offer type of a promotion. + module OfferType + # Unknown offer type. + OFFER_TYPE_UNSPECIFIED = 0 + + # Offer type without a code. + NO_CODE = 1 + + # Offer type with a code. Generic redemption code for the promotion is + # required when `offerType` = `GENERIC_CODE`. + GENERIC_CODE = 2 + end + + # Channel of a promotion. + module RedemptionChannel + # Indicates that the channel is unspecified. + REDEMPTION_CHANNEL_UNSPECIFIED = 0 + + # Indicates that the channel is in store. + # This is same as `local` channel used for `products`. + IN_STORE = 1 + + # Indicates that the channel is online. + ONLINE = 2 + end + + # [Coupon value + # type](https://support.google.com/merchants/answer/13861986?ref_topic=13773355&sjid=17642868584668136159-NC) + # of a promotion. + module CouponValueType + # Indicates that the coupon value type is unspecified. + COUPON_VALUE_TYPE_UNSPECIFIED = 0 + + # Money off coupon value type. + MONEY_OFF = 1 + + # Percent off coupon value type. + PERCENT_OFF = 2 + + # Buy M quantity, get N money off coupon value type. + # `minimum_purchase_quantity` and `get_this_quantity_discounted` must be + # present. `money_off_amount` must also be present. + BUY_M_GET_N_MONEY_OFF = 3 + + # Buy M quantity, get N percent off coupon value type. + # `minimum_purchase_quantity` and `get_this_quantity_discounted` must be + # present. `percent_off_percentage` must also be present. + BUY_M_GET_N_PERCENT_OFF = 4 + + # Buy M quantity, get money off. `minimum_purchase_quantity` and + # `money_off_amount` must be present. + BUY_M_GET_MONEY_OFF = 5 + + # Buy M quantity, get money off. `minimum_purchase_quantity` and + # `percent_off_percentage` must be present. + BUY_M_GET_PERCENT_OFF = 6 + + # Free gift with description only. + FREE_GIFT = 7 + + # Free gift with monetary value. + FREE_GIFT_WITH_VALUE = 8 + + # Free gift with item ID. + FREE_GIFT_WITH_ITEM_ID = 9 + + # Standard free shipping coupon value type. + FREE_SHIPPING_STANDARD = 10 + + # Overnight free shipping coupon value type. + FREE_SHIPPING_OVERNIGHT = 11 + + # Two day free shipping coupon value type. + FREE_SHIPPING_TWO_DAY = 12 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta/proto_docs/google/type/interval.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/type/interval.rb new file mode 100644 index 000000000000..9350ca479005 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..1271b862a659 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta", path: "../" +else + gem "google-shopping-merchant-promotions-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-promotions-v1beta/snippets/promotions_service/get_promotion.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/get_promotion.rb new file mode 100644 index 000000000000..6e9b8d3455d4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/get_promotion.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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_PromotionsService_GetPromotion_sync] +require "google/shopping/merchant/promotions/v1beta" + +## +# Snippet for the get_promotion call in the PromotionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client#get_promotion. +# +def get_promotion + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest.new + + # Call the get_promotion method. + result = client.get_promotion request + + # The returned object is of type Google::Shopping::Merchant::Promotions::V1beta::Promotion. + p result +end +# [END merchantapi_v1beta_generated_PromotionsService_GetPromotion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/insert_promotion.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/insert_promotion.rb new file mode 100644 index 000000000000..43f6e2c19e06 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/insert_promotion.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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_PromotionsService_InsertPromotion_sync] +require "google/shopping/merchant/promotions/v1beta" + +## +# Snippet for the insert_promotion call in the PromotionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client#insert_promotion. +# +def insert_promotion + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest.new + + # Call the insert_promotion method. + result = client.insert_promotion request + + # The returned object is of type Google::Shopping::Merchant::Promotions::V1beta::Promotion. + p result +end +# [END merchantapi_v1beta_generated_PromotionsService_InsertPromotion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/list_promotions.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/list_promotions.rb new file mode 100644 index 000000000000..4688318ef057 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/list_promotions.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_PromotionsService_ListPromotions_sync] +require "google/shopping/merchant/promotions/v1beta" + +## +# Snippet for the list_promotions call in the PromotionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client#list_promotions. +# +def list_promotions + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest.new + + # Call the list_promotions method. + result = client.list_promotions request + + # The returned object is of type Gapic::PagedEnumerable. You can 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::Promotions::V1beta::Promotion. + p item + end +end +# [END merchantapi_v1beta_generated_PromotionsService_ListPromotions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/snippet_metadata_google.shopping.merchant.promotions.v1beta.json b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/snippet_metadata_google.shopping.merchant.promotions.v1beta.json new file mode 100644 index 000000000000..a39c8da86118 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/snippet_metadata_google.shopping.merchant.promotions.v1beta.json @@ -0,0 +1,135 @@ +{ + "client_library": { + "name": "google-shopping-merchant-promotions-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.promotions.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1beta_generated_PromotionsService_InsertPromotion_sync", + "title": "Snippet for the insert_promotion call in the PromotionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client#insert_promotion.", + "file": "promotions_service/insert_promotion.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_promotion", + "full_name": "::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client#insert_promotion", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Promotions::V1beta::Promotion", + "client": { + "short_name": "PromotionsService::Client", + "full_name": "::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client" + }, + "method": { + "short_name": "InsertPromotion", + "full_name": "google.shopping.merchant.promotions.v1beta.PromotionsService.InsertPromotion", + "service": { + "short_name": "PromotionsService", + "full_name": "google.shopping.merchant.promotions.v1beta.PromotionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_PromotionsService_GetPromotion_sync", + "title": "Snippet for the get_promotion call in the PromotionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client#get_promotion.", + "file": "promotions_service/get_promotion.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_promotion", + "full_name": "::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client#get_promotion", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Promotions::V1beta::Promotion", + "client": { + "short_name": "PromotionsService::Client", + "full_name": "::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client" + }, + "method": { + "short_name": "GetPromotion", + "full_name": "google.shopping.merchant.promotions.v1beta.PromotionsService.GetPromotion", + "service": { + "short_name": "PromotionsService", + "full_name": "google.shopping.merchant.promotions.v1beta.PromotionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_PromotionsService_ListPromotions_sync", + "title": "Snippet for the list_promotions call in the PromotionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client#list_promotions.", + "file": "promotions_service/list_promotions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_promotions", + "full_name": "::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client#list_promotions", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsResponse", + "client": { + "short_name": "PromotionsService::Client", + "full_name": "::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client" + }, + "method": { + "short_name": "ListPromotions", + "full_name": "google.shopping.merchant.promotions.v1beta.PromotionsService.ListPromotions", + "service": { + "short_name": "PromotionsService", + "full_name": "google.shopping.merchant.promotions.v1beta.PromotionsService" + } + } + }, + "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-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_paths_test.rb new file mode 100644 index 000000000000..bbc7ea1a187e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_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/promotions/v1beta/promotions_service" + +class ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::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_promotion_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::Promotions::V1beta::PromotionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.promotion_path account: "value0", promotion: "value1" + assert_equal "accounts/value0/promotions/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_rest_test.rb new file mode 100644 index 000000000000..498d485cd41a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_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/merchant/promotions/v1beta/promotions_pb" +require "google/shopping/merchant/promotions/v1beta/promotions_service/rest" + + +class ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::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_promotion + # Create test objects. + client_result = ::Google::Shopping::Merchant::Promotions::V1beta::Promotion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + promotion = {} + data_source = "hello world" + + insert_promotion_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::ServiceStub.stub :transcode_insert_promotion_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_promotion_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.insert_promotion({ parent: parent, promotion: promotion, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.insert_promotion parent: parent, promotion: promotion, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.insert_promotion ::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest.new(parent: parent, promotion: promotion, data_source: data_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.insert_promotion({ parent: parent, promotion: promotion, data_source: data_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.insert_promotion(::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest.new(parent: parent, promotion: promotion, data_source: data_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_promotion_client_stub.call_count + end + end + end + + def test_get_promotion + # Create test objects. + client_result = ::Google::Shopping::Merchant::Promotions::V1beta::Promotion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_promotion_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::ServiceStub.stub :transcode_get_promotion_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_promotion_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_promotion({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_promotion name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_promotion ::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_promotion({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_promotion(::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_promotion_client_stub.call_count + end + end + end + + def test_list_promotions + # Create test objects. + client_result = ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsResponse.new + http_response = OpenStruct.new 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_promotions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::ServiceStub.stub :transcode_list_promotions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_promotions_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_promotions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_promotions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_promotions ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest.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 + c.list_promotions({ 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 + c.list_promotions(::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest.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_promotions_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::Promotions::V1beta::PromotionsService::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::Promotions::V1beta::PromotionsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_test.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_test.rb new file mode 100644 index 000000000000..a2e706899842 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/promotions/v1beta/promotions_pb" +require "google/shopping/merchant/promotions/v1beta/promotions_service" + +class ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::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_promotion + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Promotions::V1beta::Promotion.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + promotion = {} + data_source = "hello world" + + insert_promotion_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_promotion, name + assert_kind_of ::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Promotions::V1beta::Promotion), request["promotion"] + assert_equal "hello world", request["data_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_promotion_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.insert_promotion({ parent: parent, promotion: promotion, data_source: data_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.insert_promotion parent: parent, promotion: promotion, data_source: data_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.insert_promotion ::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest.new(parent: parent, promotion: promotion, data_source: data_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.insert_promotion({ parent: parent, promotion: promotion, 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 + c.insert_promotion(::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest.new(parent: parent, promotion: promotion, 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, insert_promotion_client_stub.call_rpc_count + end + end + + def test_get_promotion + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Promotions::V1beta::Promotion.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_promotion_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_promotion, name + assert_kind_of ::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_promotion_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_promotion({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_promotion name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_promotion ::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_promotion({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_promotion(::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_promotion_client_stub.call_rpc_count + end + end + + def test_list_promotions + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_promotions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_promotions, name + assert_kind_of ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest, 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_promotions_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_promotions({ parent: parent, page_size: page_size, page_token: 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 + c.list_promotions parent: parent, page_size: page_size, page_token: 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 + c.list_promotions ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest.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 + c.list_promotions({ 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 + c.list_promotions(::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest.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_promotions_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::Promotions::V1beta::PromotionsService::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::Promotions::V1beta::PromotionsService::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::Promotions::V1beta::PromotionsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +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-reports-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-reports-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/.gitignore @@ -0,0 +1,20 @@ +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-reports-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-reports-v1/.repo-metadata.json new file mode 100644 index 000000000000..ddd4ab3ed6bb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1", + "distribution_name": "google-shopping-merchant-reports-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-reports-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-reports 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-reports-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-reports-v1/.rubocop.yml new file mode 100644 index 000000000000..1f311a84c068 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-reports-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-reports-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-reports-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-reports-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..e793e61f8914 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-reports-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-reports-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/reports/v1" + +client = ::Google::Shopping::Merchant::Reports::V1::ReportService::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/reports/v1" + +::Google::Shopping::Merchant::Reports::V1::ReportService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Reports::V1::ReportService::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-reports-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/reports/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Reports::V1::ReportService::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-reports-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-reports-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-reports-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/Gemfile @@ -0,0 +1,15 @@ +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-reporters", "~> 1.8.0", require: false +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-reports-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-reports-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1/README.md b/owl-bot-staging/google-shopping-merchant-reports-v1/README.md new file mode 100644 index 000000000000..cf84596baff8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports](https://rubygems.org/gems/google-shopping-merchant-reports). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-reports-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/reports/v1" + +client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new +request = ::Google::Shopping::Merchant::Reports::V1::SearchRequest.new # (request fields as keyword arguments...) +response = client.search request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-reports-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/reports/v1" +require "logger" + +client = ::Google::Shopping::Merchant::Reports::V1::ReportService::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.2+. + +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-reports`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-reports-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-reports`. +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-reports-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-reports-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-reports-v1/Rakefile new file mode 100644 index 000000000000..6d4b8859d747 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-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/reports/v1/report_service/credentials" + ::Google::Shopping::Merchant::Reports::V1::ReportService::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-reports-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-reports-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-reports-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-reports-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-reports-v1" + header "google-shopping-merchant-reports-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-reports-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-reports-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-reports-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-reports-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-reports-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-reports-v1/gapic_metadata.json new file mode 100644 index 000000000000..d3bc0f3e8851 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/gapic_metadata.json @@ -0,0 +1,23 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.reports.v1", + "libraryPackage": "::Google::Shopping::Merchant::Reports::V1", + "services": { + "ReportService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Reports::V1::ReportService::Client", + "rpcs": { + "Search": { + "methods": [ + "search" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/google-shopping-merchant-reports-v1.gemspec b/owl-bot-staging/google-shopping-merchant-reports-v1/google-shopping-merchant-reports-v1.gemspec new file mode 100644 index 000000000000..d6e706f4efea --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/google-shopping-merchant-reports-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/reports/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-reports-v1" + gem.version = Google::Shopping::Merchant::Reports::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-reports-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-reports 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.3" + 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-reports-v1/lib/google-shopping-merchant-reports-v1.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google-shopping-merchant-reports-v1.rb new file mode 100644 index 000000000000..519b57180416 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google-shopping-merchant-reports-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/reports/v1" diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1.rb new file mode 100644 index 000000000000..588dc6fa4ee3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/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/reports/v1/report_service" +require "google/shopping/merchant/reports/v1/version" + +module Google + module Shopping + module Merchant + module Reports + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/reports/v1" + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/reports/v1" + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/reports/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service.rb new file mode 100644 index 000000000000..88e9aced79fd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_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/reports/v1/version" + +require "google/shopping/merchant/reports/v1/report_service/credentials" +require "google/shopping/merchant/reports/v1/report_service/client" +require "google/shopping/merchant/reports/v1/report_service/rest" + +module Google + module Shopping + module Merchant + module Reports + module V1 + ## + # Service for retrieving reports and insights about your products, their + # performance, and their competitive environment on Google. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/reports/v1/report_service" + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/reports/v1/report_service/rest" + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new + # + module ReportService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "report_service", "helpers.rb" +require "google/shopping/merchant/reports/v1/report_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/client.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/client.rb new file mode 100644 index 000000000000..ef9288f54a3b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/client.rb @@ -0,0 +1,506 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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/reports/v1/reports_pb" + +module Google + module Shopping + module Merchant + module Reports + module V1 + module ReportService + ## + # Client for the ReportService service. + # + # Service for retrieving reports and insights about your products, their + # performance, and their competitive environment on Google. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :report_service_stub + + ## + # Configure the ReportService Client class. + # + # See {::Google::Shopping::Merchant::Reports::V1::ReportService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ReportService clients + # ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.configure do |config| + # config.timeout = 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", "Reports", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.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 ReportService Client instance. + # + # The configuration is set to the derived mode, meaning that values 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::Reports::V1::ReportService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @report_service_stub.universe_domain + end + + ## + # Create a new ReportService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ReportService 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/reports/v1/reports_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 + + @report_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Reports::V1::ReportService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @report_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 + @report_service_stub.logger + end + + # Service calls + + ## + # Retrieves a report defined by a search query. The response might contain + # fewer rows than specified by `page_size`. Rely on `next_page_token` to + # determine if there are more rows to be requested. + # + # @overload search(request, options = nil) + # Pass arguments to `search` via a request object, either of type + # {::Google::Shopping::Merchant::Reports::V1::SearchRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reports::V1::SearchRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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(parent: nil, query: nil, page_size: nil, page_token: nil) + # Pass arguments to `search` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Id of the account making the call. Must be a standalone account + # or an MCA subaccount. Format: accounts/\\{account} + # @param query [::String] + # Required. Query that defines a report to be retrieved. + # + # For details on how to construct your query, see the [Query Language + # guide](/merchant/api/guides/reports/query-language). For the full list of + # available tables and fields, see the [Available + # fields][google.shopping.merchant.reports.v1.ReportRow]. + # @param page_size [::Integer] + # Optional. Number of `ReportRows` to retrieve in a single page. Defaults to + # 1000. Values above 100,000 are coerced to 100,000. + # @param page_token [::String] + # Optional. Token of the page to retrieve. If not specified, the first page + # of results is returned. In order to request the next page of results, the + # value obtained from `next_page_token` in the previous response should be + # used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1::ReportRow>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1::ReportRow>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/reports/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reports::V1::ReportService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reports::V1::SearchRequest.new + # + # # Call the search method. + # result = client.search request + # + # # The returned object is of type Gapic::PagedEnumerable. You can 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::Reports::V1::ReportRow. + # p item + # end + # + def search request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reports::V1::SearchRequest + + # Converts hash and nil to 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.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Reports::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @report_service_stub.call_rpc :search, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @report_service_stub, :search, request, response, 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 ReportService API. + # + # This class represents the configuration for ReportService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Reports::V1::ReportService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # search to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.search.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.search.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::Reports::V1::ReportService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ReportService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `search` + # @return [::Gapic::Config::Method] + # + attr_reader :search + + # @private + def initialize parent_rpcs = nil + search_config = parent_rpcs.search if parent_rpcs.respond_to? :search + @search = ::Gapic::Config::Method.new search_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-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/credentials.rb new file mode 100644 index 000000000000..f1e78db705c2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_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 Reports + module V1 + module ReportService + # Credentials for the ReportService 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-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest.rb new file mode 100644 index 000000000000..f84d95a0f9f3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_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/reports/v1/version" + +require "google/shopping/merchant/reports/v1/report_service/credentials" +require "google/shopping/merchant/reports/v1/report_service/rest/client" + +module Google + module Shopping + module Merchant + module Reports + module V1 + ## + # Service for retrieving reports and insights about your products, their + # performance, and their competitive environment on Google. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/reports/v1/report_service/rest" + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new + # + module ReportService + # 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/reports/v1/report_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/client.rb new file mode 100644 index 000000000000..05047b77bb2f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/client.rb @@ -0,0 +1,456 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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/reports/v1/reports_pb" +require "google/shopping/merchant/reports/v1/report_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Reports + module V1 + module ReportService + module Rest + ## + # REST client for the ReportService service. + # + # Service for retrieving reports and insights about your products, their + # performance, and their competitive environment on Google. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :report_service_stub + + ## + # Configure the ReportService Client class. + # + # See {::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ReportService clients + # ::Google::Shopping::Merchant::Reports::V1::ReportService::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", "Reports", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.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 ReportService Client instance. + # + # The configuration is set to the derived mode, meaning that values 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::Reports::V1::ReportService::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 + @report_service_stub.universe_domain + end + + ## + # Create a new ReportService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ReportService 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 + + @report_service_stub = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @report_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 + @report_service_stub.logger + end + + # Service calls + + ## + # Retrieves a report defined by a search query. The response might contain + # fewer rows than specified by `page_size`. Rely on `next_page_token` to + # determine if there are more rows to be requested. + # + # @overload search(request, options = nil) + # Pass arguments to `search` via a request object, either of type + # {::Google::Shopping::Merchant::Reports::V1::SearchRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reports::V1::SearchRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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(parent: nil, query: nil, page_size: nil, page_token: nil) + # Pass arguments to `search` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Id of the account making the call. Must be a standalone account + # or an MCA subaccount. Format: accounts/\\{account} + # @param query [::String] + # Required. Query that defines a report to be retrieved. + # + # For details on how to construct your query, see the [Query Language + # guide](/merchant/api/guides/reports/query-language). For the full list of + # available tables and fields, see the [Available + # fields][google.shopping.merchant.reports.v1.ReportRow]. + # @param page_size [::Integer] + # Optional. Number of `ReportRows` to retrieve in a single page. Defaults to + # 1000. Values above 100,000 are coerced to 100,000. + # @param page_token [::String] + # Optional. Token of the page to retrieve. If not specified, the first page + # of results is returned. In order to request the next page of results, the + # value obtained from `next_page_token` in the previous response should be + # used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1::ReportRow>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1::ReportRow>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/reports/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reports::V1::SearchRequest.new + # + # # Call the search method. + # result = client.search request + # + # # The returned object is of type Gapic::PagedEnumerable. You can 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::Reports::V1::ReportRow. + # p item + # end + # + def search request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reports::V1::SearchRequest + + # Converts hash and nil to an 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.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Reports::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @report_service_stub.search request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @report_service_stub, :search, "results", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ReportService REST API. + # + # This class represents the configuration for ReportService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # search to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.search.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.search.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the ReportService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `search` + # @return [::Gapic::Config::Method] + # + attr_reader :search + + # @private + def initialize parent_rpcs = nil + search_config = parent_rpcs.search if parent_rpcs.respond_to? :search + @search = ::Gapic::Config::Method.new search_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-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/service_stub.rb new file mode 100644 index 000000000000..e78b6989589a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_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/reports/v1/reports_pb" + +module Google + module Shopping + module Merchant + module Reports + module V1 + module ReportService + module Rest + ## + # REST service stub for the ReportService 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 search REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reports::V1::SearchRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Reports::V1::SearchResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Reports::V1::SearchResponse] + # A result object deserialized from the server's reply + def search request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Reports::V1::SearchResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the search REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reports::V1::SearchRequest] + # 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_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/reports/v1/{parent}/reports:search", + 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-reports-v1/lib/google/shopping/merchant/reports/v1/reports_pb.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_pb.rb new file mode 100644 index 000000000000..b3ab43662fc7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_pb.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/reports/v1/reports.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' +require 'google/shopping/type/types_pb' +require 'google/type/date_pb' + + +descriptor_data = "\n1google/shopping/merchant/reports/v1/reports.proto\x12#google.shopping.merchant.reports.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\x1a\x16google/type/date.proto\"i\n\rSearchRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"j\n\x0eSearchResponse\x12?\n\x07results\x18\x01 \x03(\x0b\x32..google.shopping.merchant.reports.v1.ReportRow\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa8\x08\n\tReportRow\x12]\n\x18product_performance_view\x18\x01 \x01(\x0b\x32;.google.shopping.merchant.reports.v1.ProductPerformanceView\x12\x64\n\x1cnon_product_performance_view\x18\x07 \x01(\x0b\x32>.google.shopping.merchant.reports.v1.NonProductPerformanceView\x12\x46\n\x0cproduct_view\x18\x02 \x01(\x0b\x32\x30.google.shopping.merchant.reports.v1.ProductView\x12p\n\"price_competitiveness_product_view\x18\x03 \x01(\x0b\x32\x44.google.shopping.merchant.reports.v1.PriceCompetitivenessProductView\x12\x62\n\x1bprice_insights_product_view\x18\x04 \x01(\x0b\x32=.google.shopping.merchant.reports.v1.PriceInsightsProductView\x12m\n!best_sellers_product_cluster_view\x18\x05 \x01(\x0b\x32\x42.google.shopping.merchant.reports.v1.BestSellersProductClusterView\x12Z\n\x17\x62\x65st_sellers_brand_view\x18\x06 \x01(\x0b\x32\x39.google.shopping.merchant.reports.v1.BestSellersBrandView\x12x\n&competitive_visibility_competitor_view\x18\x08 \x01(\x0b\x32H.google.shopping.merchant.reports.v1.CompetitiveVisibilityCompetitorView\x12{\n(competitive_visibility_top_merchant_view\x18\t \x01(\x0b\x32I.google.shopping.merchant.reports.v1.CompetitiveVisibilityTopMerchantView\x12v\n%competitive_visibility_benchmark_view\x18\n \x01(\x0b\x32G.google.shopping.merchant.reports.v1.CompetitiveVisibilityBenchmarkView\"\xa3\x0b\n\x16ProductPerformanceView\x12g\n\x10marketing_method\x18\x01 \x01(\x0e\x32H.google.shopping.merchant.reports.v1.MarketingMethod.MarketingMethodEnumH\x00\x88\x01\x01\x12\x1f\n\x04\x64\x61te\x18\x02 \x01(\x0b\x32\x11.google.type.Date\x12\x1f\n\x04week\x18\x03 \x01(\x0b\x32\x11.google.type.Date\x12\"\n\x15\x63ustomer_country_code\x18\x04 \x01(\tH\x01\x88\x01\x01\x12U\n\nstore_type\x18 \x01(\x0e\x32<.google.shopping.merchant.reports.v1.StoreType.StoreTypeEnumH\x02\x88\x01\x01\x12\x15\n\x08offer_id\x18\x05 \x01(\tH\x03\x88\x01\x01\x12\x12\n\x05title\x18\x06 \x01(\tH\x04\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x07 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x08 \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\t \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\n \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\x0b \x01(\tH\t\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\x0c \x01(\tH\n\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18\r \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18\x0e \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18\x0f \x01(\tH\r\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18\x10 \x01(\tH\x0e\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18\x11 \x01(\tH\x0f\x88\x01\x01\x12\x1a\n\rcustom_label0\x18\x12 \x01(\tH\x10\x88\x01\x01\x12\x1a\n\rcustom_label1\x18\x13 \x01(\tH\x11\x88\x01\x01\x12\x1a\n\rcustom_label2\x18\x14 \x01(\tH\x12\x88\x01\x01\x12\x1a\n\rcustom_label3\x18\x15 \x01(\tH\x13\x88\x01\x01\x12\x1a\n\rcustom_label4\x18\x16 \x01(\tH\x14\x88\x01\x01\x12\x13\n\x06\x63licks\x18\x17 \x01(\x03H\x15\x88\x01\x01\x12\x18\n\x0bimpressions\x18\x18 \x01(\x03H\x16\x88\x01\x01\x12\x1f\n\x12\x63lick_through_rate\x18\x19 \x01(\x01H\x17\x88\x01\x01\x12\x18\n\x0b\x63onversions\x18\x1a \x01(\x01H\x18\x88\x01\x01\x12\x35\n\x10\x63onversion_value\x18\x1b \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x1c\n\x0f\x63onversion_rate\x18\x1c \x01(\x01H\x19\x88\x01\x01\x42\x13\n\x11_marketing_methodB\x18\n\x16_customer_country_codeB\r\n\x0b_store_typeB\x0b\n\t_offer_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5B\x10\n\x0e_custom_label0B\x10\n\x0e_custom_label1B\x10\n\x0e_custom_label2B\x10\n\x0e_custom_label3B\x10\n\x0e_custom_label4B\t\n\x07_clicksB\x0e\n\x0c_impressionsB\x15\n\x13_click_through_rateB\x0e\n\x0c_conversionsB\x12\n\x10_conversion_rate\"\xee\x1a\n\x0bProductView\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12?\n\x07\x63hannel\x18\x1c \x01(\x0e\x32).google.shopping.type.Channel.ChannelEnumH\x01\x88\x01\x01\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tH\x02\x88\x01\x01\x12\x17\n\nfeed_label\x18\x03 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08offer_id\x18\x04 \x01(\tH\x04\x88\x01\x01\x12\x12\n\x05title\x18\x05 \x01(\tH\x05\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x06 \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x07 \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\x08 \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\t \x01(\tH\t\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\n \x01(\tH\n\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\x0b \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18\x0c \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18\r \x01(\tH\r\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18\x0e \x01(\tH\x0e\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18\x0f \x01(\tH\x0f\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18\x10 \x01(\tH\x10\x88\x01\x01\x12*\n\x05price\x18\x11 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x16\n\tcondition\x18\x12 \x01(\tH\x11\x88\x01\x01\x12\x19\n\x0c\x61vailability\x18\x13 \x01(\tH\x12\x88\x01\x01\x12\x1b\n\x0eshipping_label\x18\x14 \x01(\tH\x13\x88\x01\x01\x12\x0c\n\x04gtin\x18\x15 \x03(\t\x12\x1a\n\ritem_group_id\x18\x16 \x01(\tH\x14\x88\x01\x01\x12\x1b\n\x0ethumbnail_link\x18\x17 \x01(\tH\x15\x88\x01\x01\x12\x31\n\rcreation_time\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x0f\x65xpiration_date\x18\x19 \x01(\x0b\x32\x11.google.type.Date\x12\x83\x01\n#aggregated_reporting_context_status\x18\x1a \x01(\x0e\x32Q.google.shopping.merchant.reports.v1.ProductView.AggregatedReportingContextStatusH\x16\x88\x01\x01\x12p\n\x1cstatus_per_reporting_context\x18 \x03(\x0b\x32J.google.shopping.merchant.reports.v1.ProductView.StatusPerReportingContext\x12[\n\x11reporting_context\x18! \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x17\x88\x01\x01\x12O\n\x0bitem_issues\x18\x1b \x03(\x0b\x32:.google.shopping.merchant.reports.v1.ProductView.ItemIssue\x12X\n\x0f\x63lick_potential\x18\x1d \x01(\x0e\x32?.google.shopping.merchant.reports.v1.ProductView.ClickPotential\x12!\n\x14\x63lick_potential_rank\x18\x1e \x01(\x03H\x18\x88\x01\x01\x1a\x9f\t\n\tItemIssue\x12V\n\x04type\x18\x01 \x01(\x0b\x32H.google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueType\x12^\n\x08severity\x18\x02 \x01(\x0b\x32L.google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueSeverity\x12g\n\nresolution\x18\x03 \x01(\x0e\x32N.google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueResolutionH\x00\x88\x01\x01\x1a\x65\n\rItemIssueType\x12\x11\n\x04\x63ode\x18\x01 \x01(\tH\x00\x88\x01\x01\x12 \n\x13\x63\x61nonical_attribute\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_codeB\x16\n\x14_canonical_attribute\x1a\x8f\x05\n\x11ItemIssueSeverity\x12\x95\x01\n\x1eseverity_per_reporting_context\x18\x01 \x03(\x0b\x32m.google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext\x12\x86\x01\n\x13\x61ggregated_severity\x18\x02 \x01(\x0e\x32\x64.google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueSeverity.AggregatedIssueSeverityH\x00\x88\x01\x01\x1a\xcf\x01\n IssueSeverityPerReportingContext\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x00\x88\x01\x01\x12\x1d\n\x15\x64isapproved_countries\x18\x02 \x03(\t\x12\x19\n\x11\x64\x65moted_countries\x18\x03 \x03(\tB\x14\n\x12_reporting_context\"o\n\x17\x41ggregatedIssueSeverity\x12)\n%AGGREGATED_ISSUE_SEVERITY_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x44ISAPPROVED\x10\x01\x12\x0b\n\x07\x44\x45MOTED\x10\x02\x12\x0b\n\x07PENDING\x10\x03\x42\x16\n\x14_aggregated_severity\"i\n\x13ItemIssueResolution\x12%\n!ITEM_ISSUE_RESOLUTION_UNSPECIFIED\x10\x00\x12\x13\n\x0fMERCHANT_ACTION\x10\x01\x12\x16\n\x12PENDING_PROCESSING\x10\x02\x42\r\n\x0b_resolution\x1a\xe4\x01\n\x19StatusPerReportingContext\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x00\x88\x01\x01\x12\x1a\n\x12\x61pproved_countries\x18\x02 \x03(\t\x12\x1d\n\x15\x64isapproved_countries\x18\x03 \x03(\t\x12\x19\n\x11pending_countries\x18\x04 \x03(\tB\x14\n\x12_reporting_context\"\xa9\x01\n AggregatedReportingContextStatus\x12\x33\n/AGGREGATED_REPORTING_CONTEXT_STATUS_UNSPECIFIED\x10\x00\x12\x1f\n\x1bNOT_ELIGIBLE_OR_DISAPPROVED\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x14\n\x10\x45LIGIBLE_LIMITED\x10\x03\x12\x0c\n\x08\x45LIGIBLE\x10\x04\"P\n\x0e\x43lickPotential\x12\x1f\n\x1b\x43LICK_POTENTIAL_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x42\x05\n\x03_idB\n\n\x08_channelB\x10\n\x0e_language_codeB\r\n\x0b_feed_labelB\x0b\n\t_offer_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5B\x0c\n\n_conditionB\x0f\n\r_availabilityB\x11\n\x0f_shipping_labelB\x10\n\x0e_item_group_idB\x11\n\x0f_thumbnail_linkB&\n$_aggregated_reporting_context_statusB\x14\n\x12_reporting_contextB\x17\n\x15_click_potential_rank\"\x81\x06\n\x1fPriceCompetitivenessProductView\x12 \n\x13report_country_code\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x0f\n\x02id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x08offer_id\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x12\n\x05title\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\x07 \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\x08 \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\t \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\n \x01(\tH\t\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18\x0b \x01(\tH\n\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18\x0c \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18\r \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18\x0e \x01(\tH\r\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18\x0f \x01(\tH\x0e\x88\x01\x01\x12*\n\x05price\x18\x10 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x34\n\x0f\x62\x65nchmark_price\x18\x11 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x16\n\x14_report_country_codeB\x05\n\x03_idB\x0b\n\t_offer_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5\"\x83\t\n\x18PriceInsightsProductView\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08offer_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05title\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\x07 \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\x08 \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\t \x01(\tH\x08\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18\n \x01(\tH\t\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18\x0b \x01(\tH\n\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18\x0c \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18\r \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18\x0e \x01(\tH\r\x88\x01\x01\x12*\n\x05price\x18\x0f \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x34\n\x0fsuggested_price\x18\x10 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x32\n%predicted_impressions_change_fraction\x18\x11 \x01(\x01H\x0e\x88\x01\x01\x12-\n predicted_clicks_change_fraction\x18\x12 \x01(\x01H\x0f\x88\x01\x01\x12\x32\n%predicted_conversions_change_fraction\x18\x13 \x01(\x01H\x10\x88\x01\x01\x12\x62\n\reffectiveness\x18\x16 \x01(\x0e\x32K.google.shopping.merchant.reports.v1.PriceInsightsProductView.Effectiveness\"M\n\rEffectiveness\x12\x1d\n\x19\x45\x46\x46\x45\x43TIVENESS_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x42\x05\n\x03_idB\x0b\n\t_offer_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5B(\n&_predicted_impressions_change_fractionB#\n!_predicted_clicks_change_fractionB(\n&_predicted_conversions_change_fraction\"\xd7\x0b\n\x1d\x42\x65stSellersProductClusterView\x12&\n\x0breport_date\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12m\n\x12report_granularity\x18\x02 \x01(\x0e\x32L.google.shopping.merchant.reports.v1.ReportGranularity.ReportGranularityEnumH\x00\x88\x01\x01\x12 \n\x13report_country_code\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x04 \x01(\x03H\x02\x88\x01\x01\x12\x12\n\x05title\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x07 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\t \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\n \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\x0b \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\x0c \x01(\tH\t\x88\x01\x01\x12\x15\n\rvariant_gtins\x18\r \x03(\t\x12q\n\x10inventory_status\x18\x0e \x01(\x0e\x32R.google.shopping.merchant.reports.v1.BestSellersProductClusterView.InventoryStatusH\n\x88\x01\x01\x12w\n\x16\x62rand_inventory_status\x18\x0f \x01(\x0e\x32R.google.shopping.merchant.reports.v1.BestSellersProductClusterView.InventoryStatusH\x0b\x88\x01\x01\x12\x11\n\x04rank\x18\x10 \x01(\x03H\x0c\x88\x01\x01\x12\x1a\n\rprevious_rank\x18\x11 \x01(\x03H\r\x88\x01\x01\x12\x64\n\x0frelative_demand\x18\x12 \x01(\x0e\x32\x46.google.shopping.merchant.reports.v1.RelativeDemand.RelativeDemandEnumH\x0e\x88\x01\x01\x12m\n\x18previous_relative_demand\x18\x13 \x01(\x0e\x32\x46.google.shopping.merchant.reports.v1.RelativeDemand.RelativeDemandEnumH\x0f\x88\x01\x01\x12\x7f\n\x16relative_demand_change\x18\x14 \x01(\x0e\x32Z.google.shopping.merchant.reports.v1.RelativeDemandChangeType.RelativeDemandChangeTypeEnumH\x10\x88\x01\x01\"i\n\x0fInventoryStatus\x12 \n\x1cINVENTORY_STATUS_UNSPECIFIED\x10\x00\x12\x0c\n\x08IN_STOCK\x10\x01\x12\x10\n\x0cOUT_OF_STOCK\x10\x02\x12\x14\n\x10NOT_IN_INVENTORY\x10\x03\x42\x15\n\x13_report_granularityB\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x13\n\x11_inventory_statusB\x19\n\x17_brand_inventory_statusB\x07\n\x05_rankB\x10\n\x0e_previous_rankB\x12\n\x10_relative_demandB\x1b\n\x19_previous_relative_demandB\x19\n\x17_relative_demand_change\"\xc0\x06\n\x14\x42\x65stSellersBrandView\x12&\n\x0breport_date\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12m\n\x12report_granularity\x18\x02 \x01(\x0e\x32L.google.shopping.merchant.reports.v1.ReportGranularity.ReportGranularityEnumH\x00\x88\x01\x01\x12 \n\x13report_country_code\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x04 \x01(\x03H\x02\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x11\n\x04rank\x18\x07 \x01(\x03H\x04\x88\x01\x01\x12\x1a\n\rprevious_rank\x18\x08 \x01(\x03H\x05\x88\x01\x01\x12\x64\n\x0frelative_demand\x18\t \x01(\x0e\x32\x46.google.shopping.merchant.reports.v1.RelativeDemand.RelativeDemandEnumH\x06\x88\x01\x01\x12m\n\x18previous_relative_demand\x18\n \x01(\x0e\x32\x46.google.shopping.merchant.reports.v1.RelativeDemand.RelativeDemandEnumH\x07\x88\x01\x01\x12\x7f\n\x16relative_demand_change\x18\x0b \x01(\x0e\x32Z.google.shopping.merchant.reports.v1.RelativeDemandChangeType.RelativeDemandChangeTypeEnumH\x08\x88\x01\x01\x42\x15\n\x13_report_granularityB\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x08\n\x06_brandB\x07\n\x05_rankB\x10\n\x0e_previous_rankB\x12\n\x10_relative_demandB\x1b\n\x19_previous_relative_demandB\x19\n\x17_relative_demand_change\"\xdf\x01\n\x19NonProductPerformanceView\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12\x1f\n\x04week\x18\x02 \x01(\x0b\x32\x11.google.type.Date\x12\x13\n\x06\x63licks\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12\x18\n\x0bimpressions\x18\x04 \x01(\x03H\x01\x88\x01\x01\x12\x1f\n\x12\x63lick_through_rate\x18\x05 \x01(\x01H\x02\x88\x01\x01\x42\t\n\x07_clicksB\x0e\n\x0c_impressionsB\x15\n\x13_click_through_rate\"\xfc\x04\n#CompetitiveVisibilityCompetitorView\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12\x13\n\x06\x64omain\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0eis_your_domain\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12 \n\x13report_country_code\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12\x61\n\x0etraffic_source\x18\x06 \x01(\x0e\x32\x44.google.shopping.merchant.reports.v1.TrafficSource.TrafficSourceEnumH\x04\x88\x01\x01\x12\x11\n\x04rank\x18\x07 \x01(\x03H\x05\x88\x01\x01\x12\x1e\n\x11\x61\x64s_organic_ratio\x18\x08 \x01(\x01H\x06\x88\x01\x01\x12\x1e\n\x11page_overlap_rate\x18\t \x01(\x01H\x07\x88\x01\x01\x12!\n\x14higher_position_rate\x18\n \x01(\x01H\x08\x88\x01\x01\x12 \n\x13relative_visibility\x18\x0b \x01(\x01H\t\x88\x01\x01\x42\t\n\x07_domainB\x11\n\x0f_is_your_domainB\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x11\n\x0f_traffic_sourceB\x07\n\x05_rankB\x14\n\x12_ads_organic_ratioB\x14\n\x12_page_overlap_rateB\x17\n\x15_higher_position_rateB\x16\n\x14_relative_visibility\"\xc3\x04\n$CompetitiveVisibilityTopMerchantView\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12\x13\n\x06\x64omain\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0eis_your_domain\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12 \n\x13report_country_code\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12\x61\n\x0etraffic_source\x18\x06 \x01(\x0e\x32\x44.google.shopping.merchant.reports.v1.TrafficSource.TrafficSourceEnumH\x04\x88\x01\x01\x12\x11\n\x04rank\x18\x07 \x01(\x03H\x05\x88\x01\x01\x12\x1e\n\x11\x61\x64s_organic_ratio\x18\x08 \x01(\x01H\x06\x88\x01\x01\x12\x1e\n\x11page_overlap_rate\x18\t \x01(\x01H\x07\x88\x01\x01\x12!\n\x14higher_position_rate\x18\n \x01(\x01H\x08\x88\x01\x01\x42\t\n\x07_domainB\x11\n\x0f_is_your_domainB\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x11\n\x0f_traffic_sourceB\x07\n\x05_rankB\x14\n\x12_ads_organic_ratioB\x14\n\x12_page_overlap_rateB\x17\n\x15_higher_position_rate\"\xd3\x03\n\"CompetitiveVisibilityBenchmarkView\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12 \n\x13report_country_code\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x03 \x01(\x03H\x01\x88\x01\x01\x12\x61\n\x0etraffic_source\x18\x04 \x01(\x0e\x32\x44.google.shopping.merchant.reports.v1.TrafficSource.TrafficSourceEnumH\x02\x88\x01\x01\x12)\n\x1cyour_domain_visibility_trend\x18\x05 \x01(\x01H\x03\x88\x01\x01\x12\x30\n#category_benchmark_visibility_trend\x18\x06 \x01(\x01H\x04\x88\x01\x01\x42\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x11\n\x0f_traffic_sourceB\x1f\n\x1d_your_domain_visibility_trendB&\n$_category_benchmark_visibility_trend\"e\n\x0fMarketingMethod\"R\n\x13MarketingMethodEnum\x12%\n!MARKETING_METHOD_ENUM_UNSPECIFIED\x10\x00\x12\x0b\n\x07ORGANIC\x10\x01\x12\x07\n\x03\x41\x44S\x10\x02\"a\n\tStoreType\"T\n\rStoreTypeEnum\x12\x1f\n\x1bSTORE_TYPE_ENUM_UNSPECIFIED\x10\x00\x12\x10\n\x0cONLINE_STORE\x10\x01\x12\x10\n\x0cLOCAL_STORES\x10\x02\"n\n\x11ReportGranularity\"Y\n\x15ReportGranularityEnum\x12\'\n#REPORT_GRANULARITY_ENUM_UNSPECIFIED\x10\x00\x12\n\n\x06WEEKLY\x10\x01\x12\x0b\n\x07MONTHLY\x10\x02\"\x88\x01\n\x0eRelativeDemand\"v\n\x12RelativeDemandEnum\x12$\n RELATIVE_DEMAND_ENUM_UNSPECIFIED\x10\x00\x12\x0c\n\x08VERY_LOW\x10\n\x12\x07\n\x03LOW\x10\x14\x12\n\n\x06MEDIUM\x10\x1e\x12\x08\n\x04HIGH\x10(\x12\r\n\tVERY_HIGH\x10\x32\"\x8d\x01\n\x18RelativeDemandChangeType\"q\n\x1cRelativeDemandChangeTypeEnum\x12\x30\n,RELATIVE_DEMAND_CHANGE_TYPE_ENUM_UNSPECIFIED\x10\x00\x12\n\n\x06SINKER\x10\x01\x12\x08\n\x04\x46LAT\x10\x02\x12\t\n\x05RISER\x10\x03\"h\n\rTrafficSource\"W\n\x11TrafficSourceEnum\x12#\n\x1fTRAFFIC_SOURCE_ENUM_UNSPECIFIED\x10\x00\x12\x0b\n\x07ORGANIC\x10\x01\x12\x07\n\x03\x41\x44S\x10\x02\x12\x07\n\x03\x41LL\x10\x03\x32\x90\x02\n\rReportService\x12\xb5\x01\n\x06Search\x12\x32.google.shopping.merchant.reports.v1.SearchRequest\x1a\x33.google.shopping.merchant.reports.v1.SearchResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\"./reports/v1/{parent=accounts/*}/reports:search:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xf8\x01\n\'com.google.shopping.merchant.reports.v1B\x0cReportsProtoP\x01ZGcloud.google.com/go/shopping/merchant/reports/apiv1/reportspb;reportspb\xaa\x02#Google.Shopping.Merchant.Reports.V1\xca\x02#Google\\Shopping\\Merchant\\Reports\\V1\xea\x02\'Google::Shopping::Merchant::Reports::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Reports + module V1 + SearchRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.SearchRequest").msgclass + SearchResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.SearchResponse").msgclass + ReportRow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ReportRow").msgclass + ProductPerformanceView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductPerformanceView").msgclass + ProductView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView").msgclass + ProductView::ItemIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ItemIssue").msgclass + ProductView::ItemIssue::ItemIssueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueType").msgclass + ProductView::ItemIssue::ItemIssueSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueSeverity").msgclass + ProductView::ItemIssue::ItemIssueSeverity::IssueSeverityPerReportingContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext").msgclass + ProductView::ItemIssue::ItemIssueSeverity::AggregatedIssueSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueSeverity.AggregatedIssueSeverity").enummodule + ProductView::ItemIssue::ItemIssueResolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueResolution").enummodule + ProductView::StatusPerReportingContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.StatusPerReportingContext").msgclass + ProductView::AggregatedReportingContextStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.AggregatedReportingContextStatus").enummodule + ProductView::ClickPotential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ClickPotential").enummodule + PriceCompetitivenessProductView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.PriceCompetitivenessProductView").msgclass + PriceInsightsProductView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.PriceInsightsProductView").msgclass + PriceInsightsProductView::Effectiveness = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.PriceInsightsProductView.Effectiveness").enummodule + BestSellersProductClusterView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.BestSellersProductClusterView").msgclass + BestSellersProductClusterView::InventoryStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.BestSellersProductClusterView.InventoryStatus").enummodule + BestSellersBrandView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.BestSellersBrandView").msgclass + NonProductPerformanceView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.NonProductPerformanceView").msgclass + CompetitiveVisibilityCompetitorView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.CompetitiveVisibilityCompetitorView").msgclass + CompetitiveVisibilityTopMerchantView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.CompetitiveVisibilityTopMerchantView").msgclass + CompetitiveVisibilityBenchmarkView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.CompetitiveVisibilityBenchmarkView").msgclass + MarketingMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.MarketingMethod").msgclass + MarketingMethod::MarketingMethodEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.MarketingMethod.MarketingMethodEnum").enummodule + StoreType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.StoreType").msgclass + StoreType::StoreTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.StoreType.StoreTypeEnum").enummodule + ReportGranularity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ReportGranularity").msgclass + ReportGranularity::ReportGranularityEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ReportGranularity.ReportGranularityEnum").enummodule + RelativeDemand = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.RelativeDemand").msgclass + RelativeDemand::RelativeDemandEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.RelativeDemand.RelativeDemandEnum").enummodule + RelativeDemandChangeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.RelativeDemandChangeType").msgclass + RelativeDemandChangeType::RelativeDemandChangeTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.RelativeDemandChangeType.RelativeDemandChangeTypeEnum").enummodule + TrafficSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.TrafficSource").msgclass + TrafficSource::TrafficSourceEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.TrafficSource.TrafficSourceEnum").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_services_pb.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_services_pb.rb new file mode 100644 index 000000000000..fd4268bd9362 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/reports/v1/reports.proto for package 'Google.Shopping.Merchant.Reports.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/reports/v1/reports_pb' + +module Google + module Shopping + module Merchant + module Reports + module V1 + module ReportService + # Service for retrieving reports and insights about your products, their + # performance, and their competitive environment on Google. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.reports.v1.ReportService' + + # Retrieves a report defined by a search query. The response might contain + # fewer rows than specified by `page_size`. Rely on `next_page_token` to + # determine if there are more rows to be requested. + rpc :Search, ::Google::Shopping::Merchant::Reports::V1::SearchRequest, ::Google::Shopping::Merchant::Reports::V1::SearchResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/rest.rb new file mode 100644 index 000000000000..2a235a918302 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/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/reports/v1/report_service/rest" +require "google/shopping/merchant/reports/v1/version" + +module Google + module Shopping + module Merchant + module Reports + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/reports/v1/rest" + # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/version.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/version.rb new file mode 100644 index 000000000000..b11a31574b18 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/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 Reports + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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. + # + # Note: This field should not be used in most cases. + 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. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # 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-reports-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 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-reports-v1/proto_docs/google/shopping/merchant/reports/v1/reports.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/shopping/merchant/reports/v1/reports.rb new file mode 100644 index 000000000000..aed6f4bb1da6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/shopping/merchant/reports/v1/reports.rb @@ -0,0 +1,1382 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Reports + module V1 + # Request message for the `ReportService.Search` method. + # @!attribute [rw] parent + # @return [::String] + # Required. Id of the account making the call. Must be a standalone account + # or an MCA subaccount. Format: accounts/\\{account} + # @!attribute [rw] query + # @return [::String] + # Required. Query that defines a report to be retrieved. + # + # For details on how to construct your query, see the [Query Language + # guide](/merchant/api/guides/reports/query-language). For the full list of + # available tables and fields, see the [Available + # fields][google.shopping.merchant.reports.v1.ReportRow]. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Number of `ReportRows` to retrieve in a single page. Defaults to + # 1000. Values above 100,000 are coerced to 100,000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token of the page to retrieve. If not specified, the first page + # of results is returned. In order to request the next page of results, the + # value obtained from `next_page_token` in the previous response should be + # used. + class SearchRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ReportService.Search` method. + # @!attribute [rw] results + # @return [::Array<::Google::Shopping::Merchant::Reports::V1::ReportRow>] + # Rows that matched the search query. + # @!attribute [rw] next_page_token + # @return [::String] + # Token which can be sent as `page_token` to retrieve the next page. If + # omitted, there are no subsequent pages. + class SearchResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Result row returned from the search query. + # + # Only the message corresponding to the queried table is populated in the + # response. Within the populated message, only the fields requested explicitly + # in the query are populated. + # @!attribute [rw] product_performance_view + # @return [::Google::Shopping::Merchant::Reports::V1::ProductPerformanceView] + # Fields available for query in `product_performance_view` table. + # @!attribute [rw] non_product_performance_view + # @return [::Google::Shopping::Merchant::Reports::V1::NonProductPerformanceView] + # Fields available for query in `non_product_performance_view` table. + # @!attribute [rw] product_view + # @return [::Google::Shopping::Merchant::Reports::V1::ProductView] + # Fields available for query in `product_view` table. + # @!attribute [rw] price_competitiveness_product_view + # @return [::Google::Shopping::Merchant::Reports::V1::PriceCompetitivenessProductView] + # Fields available for query in `price_competitiveness_product_view` table. + # @!attribute [rw] price_insights_product_view + # @return [::Google::Shopping::Merchant::Reports::V1::PriceInsightsProductView] + # Fields available for query in `price_insights_product_view` table. + # @!attribute [rw] best_sellers_product_cluster_view + # @return [::Google::Shopping::Merchant::Reports::V1::BestSellersProductClusterView] + # Fields available for query in `best_sellers_product_cluster_view` table. + # @!attribute [rw] best_sellers_brand_view + # @return [::Google::Shopping::Merchant::Reports::V1::BestSellersBrandView] + # Fields available for query in `best_sellers_brand_view` table. + # @!attribute [rw] competitive_visibility_competitor_view + # @return [::Google::Shopping::Merchant::Reports::V1::CompetitiveVisibilityCompetitorView] + # Fields available for query in `competitive_visibility_competitor_view` + # table. + # @!attribute [rw] competitive_visibility_top_merchant_view + # @return [::Google::Shopping::Merchant::Reports::V1::CompetitiveVisibilityTopMerchantView] + # Fields available for query in `competitive_visibility_top_merchant_view` + # table. + # @!attribute [rw] competitive_visibility_benchmark_view + # @return [::Google::Shopping::Merchant::Reports::V1::CompetitiveVisibilityBenchmarkView] + # Fields available for query in `competitive_visibility_benchmark_view` + # table. + class ReportRow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `product_performance_view` table. + # + # Product performance data for your account, including performance metrics (for + # example, `clicks`) and dimensions according to which performance metrics are + # segmented (for example, `offer_id`). Values of product dimensions, such as + # `offer_id`, reflect the state of a product at the time of the impression. + # + # Segment fields cannot be selected in queries without also selecting at least + # one metric field. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] marketing_method + # @return [::Google::Shopping::Merchant::Reports::V1::MarketingMethod::MarketingMethodEnum] + # Marketing method to which metrics apply. Segment. + # @!attribute [rw] date + # @return [::Google::Type::Date] + # Date in the merchant timezone to which metrics apply. Segment. + # + # Condition on `date` is required in the `WHERE` clause. + # @!attribute [rw] week + # @return [::Google::Type::Date] + # First day of the week (Monday) of the metrics date in the merchant + # timezone. Segment. + # @!attribute [rw] customer_country_code + # @return [::String] + # Code of the country where the customer is located at the time of the event. + # Represented in the ISO 3166 format. Segment. + # + # If the customer country cannot be determined, a special 'ZZ' code is + # returned. + # @!attribute [rw] store_type + # @return [::Google::Shopping::Merchant::Reports::V1::StoreType::StoreTypeEnum] + # Store type to which metrics apply. Can be `ONLINE_STORE` or + # `LOCAL_STORES`. Segment. + # + # For `LOCAL_STORES` store type, further segmentation by a specific store + # is not available. + # @!attribute [rw] offer_id + # @return [::String] + # Merchant-provided id of the product. Segment. + # @!attribute [rw] title + # @return [::String] + # Title of the product. Segment. + # @!attribute [rw] brand + # @return [::String] + # Brand of the product. Segment. + # @!attribute [rw] category_l1 + # @return [::String] + # [Product category (1st + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in Google's product taxonomy. Segment. + # @!attribute [rw] category_l2 + # @return [::String] + # [Product category (2nd + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in Google's product taxonomy. Segment. + # @!attribute [rw] category_l3 + # @return [::String] + # [Product category (3rd + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in Google's product taxonomy. Segment. + # @!attribute [rw] category_l4 + # @return [::String] + # [Product category (4th + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in Google's product taxonomy. Segment. + # @!attribute [rw] category_l5 + # @return [::String] + # [Product category (5th + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in Google's product taxonomy. Segment. + # @!attribute [rw] product_type_l1 + # @return [::String] + # [Product type (1st + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in merchant's own product taxonomy. Segment. + # @!attribute [rw] product_type_l2 + # @return [::String] + # [Product type (2nd + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in merchant's own product taxonomy. Segment. + # @!attribute [rw] product_type_l3 + # @return [::String] + # [Product type (3rd + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in merchant's own product taxonomy. Segment. + # @!attribute [rw] product_type_l4 + # @return [::String] + # [Product type (4th + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in merchant's own product taxonomy. Segment. + # @!attribute [rw] product_type_l5 + # @return [::String] + # [Product type (5th + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in merchant's own product taxonomy. Segment. + # @!attribute [rw] custom_label0 + # @return [::String] + # Custom label 0 for custom grouping of products. Segment. + # @!attribute [rw] custom_label1 + # @return [::String] + # Custom label 1 for custom grouping of products. Segment. + # @!attribute [rw] custom_label2 + # @return [::String] + # Custom label 2 for custom grouping of products. Segment. + # @!attribute [rw] custom_label3 + # @return [::String] + # Custom label 3 for custom grouping of products. Segment. + # @!attribute [rw] custom_label4 + # @return [::String] + # Custom label 4 for custom grouping of products. Segment. + # @!attribute [rw] clicks + # @return [::Integer] + # Number of clicks. Metric. + # @!attribute [rw] impressions + # @return [::Integer] + # Number of times merchant's products are shown. Metric. + # @!attribute [rw] click_through_rate + # @return [::Float] + # Click-through rate - the number of clicks merchant's products receive + # (clicks) divided by the number of times the products are shown + # (impressions). Metric. + # @!attribute [rw] conversions + # @return [::Float] + # Number of conversions attributed to the product, reported on the conversion + # date. Depending on the attribution model, a conversion might be distributed + # across multiple clicks, where each click gets its own credit assigned. This + # metric is a sum of all such credits. Metric. + # + # Available only for the `FREE` traffic source. + # @!attribute [rw] conversion_value + # @return [::Google::Shopping::Type::Price] + # Value of conversions attributed to the product, reported on the conversion + # date. Metric. + # + # Available only for the `FREE` traffic source. + # @!attribute [rw] conversion_rate + # @return [::Float] + # Number of conversions divided by the number of clicks, reported on the + # impression date. Metric. + # + # Available only for the `FREE` traffic source. + class ProductPerformanceView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `product_view` table. + # + # Products in the current inventory. Products in this table are the + # same as a [Product resource in Products + # sub-API](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.products) + # but not all product attributes from Products sub-API are available for query + # in this table. In contrast to Products sub-API, this table allows to filter + # the returned list of products by product attributes. To retrieve a single + # product by `id` or list all products, Products sub-API should be used. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] id + # @return [::String] + # REST ID of the product, in the form of + # `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate + # on products take this as their `name` parameter. + # + # Required in the `SELECT` clause. + # @!attribute [rw] channel + # @return [::Google::Shopping::Type::Channel::ChannelEnum] + # Channel of the product. Can be `ONLINE` or `LOCAL`. + # @!attribute [rw] language_code + # @return [::String] + # Language code of the product in BCP 47 format. + # @!attribute [rw] feed_label + # @return [::String] + # Feed label of the product. + # @!attribute [rw] offer_id + # @return [::String] + # Merchant-provided id of the product. + # @!attribute [rw] title + # @return [::String] + # Title of the product. + # @!attribute [rw] brand + # @return [::String] + # Brand of the product. + # @!attribute [rw] category_l1 + # @return [::String] + # Product category (1st level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l2 + # @return [::String] + # Product category (2nd level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l3 + # @return [::String] + # Product category (3rd level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l4 + # @return [::String] + # Product category (4th level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l5 + # @return [::String] + # Product category (5th level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] product_type_l1 + # @return [::String] + # Product type (1st level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l2 + # @return [::String] + # Product type (2nd level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l3 + # @return [::String] + # Product type (3rd level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l4 + # @return [::String] + # Product type (4th level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l5 + # @return [::String] + # Product type (5th level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Product price. Absent if the information about the price of the product is + # not available. + # @!attribute [rw] condition + # @return [::String] + # [Condition](https://support.google.com/merchants/answer/6324469) of the + # product. + # @!attribute [rw] availability + # @return [::String] + # [Availability](https://support.google.com/merchants/answer/6324448) of the + # product. + # @!attribute [rw] shipping_label + # @return [::String] + # Normalized [shipping + # label](https://support.google.com/merchants/answer/6324504) specified in + # the data source. + # @!attribute [rw] gtin + # @return [::Array<::String>] + # List of Global Trade Item Numbers (GTINs) of the product. + # @!attribute [rw] item_group_id + # @return [::String] + # Item group id provided by the merchant for grouping variants together. + # @!attribute [rw] thumbnail_link + # @return [::String] + # Link to the processed image of the product, hosted on the Google + # infrastructure. + # @!attribute [rw] creation_time + # @return [::Google::Protobuf::Timestamp] + # The time the merchant created the product in timestamp seconds. + # @!attribute [rw] expiration_date + # @return [::Google::Type::Date] + # Expiration date for the product, specified on insertion. + # @!attribute [rw] aggregated_reporting_context_status + # @return [::Google::Shopping::Merchant::Reports::V1::ProductView::AggregatedReportingContextStatus] + # Aggregated status across all reporting contexts. + # + # Reporting contexts included in the computation of the aggregated status can + # be restricted using a filter on the `reporting_context` field. + # @!attribute [rw] status_per_reporting_context + # @return [::Array<::Google::Shopping::Merchant::Reports::V1::ProductView::StatusPerReportingContext>] + # Detailed product status per reporting context. + # + # Reporting contexts included in this list can be restricted using a filter + # on the `reporting_context` field. + # + # Equivalent to + # [`ProductStatus.destination_statuses`][google.shopping.merchant.products.v1.ProductStatus] + # in Products API. + # + # **This field cannot be used for sorting or filtering the results.** + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # Reporting context to restrict the query to. + # + # Restricts the reporting contexts returned in `status_per_reporting_context` + # and `item_issues`, and used to compute + # `aggregated_reporting_context_status`. + # + # **This field can only be used in the `WHERE` clause and cannot be selected + # in the `SELECT` clause.** + # @!attribute [rw] item_issues + # @return [::Array<::Google::Shopping::Merchant::Reports::V1::ProductView::ItemIssue>] + # List of item issues for the product. + # + # **This field cannot be used for sorting the results.** + # + # **Only selected attributes of this field (for example, + # `item_issues.severity.aggregated_severity`) can be used for filtering the + # results.** + # @!attribute [rw] click_potential + # @return [::Google::Shopping::Merchant::Reports::V1::ProductView::ClickPotential] + # Estimated performance potential compared to highest performing products of + # the merchant. + # @!attribute [rw] click_potential_rank + # @return [::Integer] + # Normalized click potential of the product. Values range from 1 to 1000, + # where 1 is the highest click potential and 1000 is the theoretical lowest. + class ProductView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Item issue associated with the product. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::Reports::V1::ProductView::ItemIssue::ItemIssueType] + # Item issue type. + # @!attribute [rw] severity + # @return [::Google::Shopping::Merchant::Reports::V1::ProductView::ItemIssue::ItemIssueSeverity] + # Item issue severity. + # @!attribute [rw] resolution + # @return [::Google::Shopping::Merchant::Reports::V1::ProductView::ItemIssue::ItemIssueResolution] + # Item issue resolution. + class ItemIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Issue type. + # @!attribute [rw] code + # @return [::String] + # Error code of the issue, equivalent to the `code` of [Product + # issues](https://developers.google.com/shopping-content/guides/product-issues). + # @!attribute [rw] canonical_attribute + # @return [::String] + # Canonical attribute name for attribute-specific issues. + class ItemIssueType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # How the issue affects the serving of the product. + # @!attribute [rw] severity_per_reporting_context + # @return [::Array<::Google::Shopping::Merchant::Reports::V1::ProductView::ItemIssue::ItemIssueSeverity::IssueSeverityPerReportingContext>] + # Issue severity per reporting context. + # + # Reporting contexts included in this list can be restricted using a + # filter on the `reporting_context` field. + # @!attribute [rw] aggregated_severity + # @return [::Google::Shopping::Merchant::Reports::V1::ProductView::ItemIssue::ItemIssueSeverity::AggregatedIssueSeverity] + # Aggregated severity of the issue for all reporting contexts it affects. + # + # Reporting contexts included in the computation of the aggregated + # severity can be restricted using a filter on the `reporting_context` + # field. + # + # **This field can be used for filtering the results.** + class ItemIssueSeverity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Issue severity per reporting context. + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # Reporting context the issue applies to. + # @!attribute [rw] disapproved_countries + # @return [::Array<::String>] + # List of disapproved countries in the reporting context, represented + # in ISO 3166 format. + # @!attribute [rw] demoted_countries + # @return [::Array<::String>] + # List of demoted countries in the reporting context, represented in + # ISO 3166 format. + class IssueSeverityPerReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Issue severity aggregated for all reporting contexts. + module AggregatedIssueSeverity + # Not specified. + AGGREGATED_ISSUE_SEVERITY_UNSPECIFIED = 0 + + # Issue disapproves the product in at least one reporting context. + DISAPPROVED = 1 + + # Issue demotes the product in all reporting contexts it affects. + DEMOTED = 2 + + # Issue resolution is `PENDING_PROCESSING`. + PENDING = 3 + end + end + + # How to resolve the issue. + module ItemIssueResolution + # Not specified. + ITEM_ISSUE_RESOLUTION_UNSPECIFIED = 0 + + # The merchant has to fix the issue. + MERCHANT_ACTION = 1 + + # The issue will be resolved automatically (for example, image crawl) or + # through a Google review. No merchant action is required now. Resolution + # might lead to another issue (for example, if crawl fails). + PENDING_PROCESSING = 2 + end + end + + # Status of the product for a specific reporting context. + # + # Equivalent to + # [`DestinationStatus`][google.shopping.merchant.products.v1.ProductStatus.DestinationStatus] + # in Products API. + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # Reporting context the status applies to. + # @!attribute [rw] approved_countries + # @return [::Array<::String>] + # List of approved countries in the reporting context, represented in + # [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, for + # example, `US`. + # @!attribute [rw] disapproved_countries + # @return [::Array<::String>] + # List of disapproved countries in the reporting context, represented in + # [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, for + # example, `US`. + # @!attribute [rw] pending_countries + # @return [::Array<::String>] + # List of pending countries in the reporting context, represented in + # [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, for + # example, `US`. + class StatusPerReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Status of the product aggregated for all reporting contexts. + # + # Reporting contexts included in the computation of the aggregated status can + # be restricted using a filter on the `reporting_context` field. + # + # Here's an example of how the aggregated status is computed: + # + # Free listings | Shopping ads | Status + # --------------|--------------|------------------------------ + # Approved | Approved | ELIGIBLE + # Approved | Pending | ELIGIBLE + # Approved | Disapproved | ELIGIBLE_LIMITED + # Pending | Pending | PENDING + # Disapproved | Disapproved | NOT_ELIGIBLE_OR_DISAPPROVED + module AggregatedReportingContextStatus + # Not specified. + AGGREGATED_REPORTING_CONTEXT_STATUS_UNSPECIFIED = 0 + + # Product is not eligible or is disapproved for all reporting contexts and + # countries. + NOT_ELIGIBLE_OR_DISAPPROVED = 1 + + # Product's status is pending in all reporting contexts and countries. + PENDING = 2 + + # Product is eligible for some (but not all) reporting contexts and + # countries. + ELIGIBLE_LIMITED = 3 + + # Product is eligible for all reporting contexts and countries. + ELIGIBLE = 4 + end + + # A product's [click + # potential](https://support.google.com/merchants/answer/188488) estimates + # its performance potential compared to highest performing products of the + # merchant. Click potential of a product helps merchants to prioritize which + # products to fix and helps them understand how products are performing + # against their potential. + module ClickPotential + # Unknown predicted clicks impact. + CLICK_POTENTIAL_UNSPECIFIED = 0 + + # Potential to receive a low number of clicks compared to the highest + # performing products of the merchant. + LOW = 1 + + # Potential to receive a moderate number of clicks compared to the highest + # performing products of the merchant. + MEDIUM = 2 + + # Potential to receive a similar number of clicks as the highest performing + # products of the merchant. + HIGH = 3 + end + end + + # Fields available for query in `price_competitiveness_product_view` table. + # + # [Price competitiveness](https://support.google.com/merchants/answer/9626903) + # report. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] report_country_code + # @return [::String] + # Country of the price benchmark. Represented in the ISO 3166 format. + # + # Required in the `SELECT` clause. + # @!attribute [rw] id + # @return [::String] + # REST ID of the product, in the form of + # `channel~languageCode~feedLabel~offerId`. Can be used to join data with the + # `product_view` table. + # + # Required in the `SELECT` clause. + # @!attribute [rw] offer_id + # @return [::String] + # Merchant-provided id of the product. + # @!attribute [rw] title + # @return [::String] + # Title of the product. + # @!attribute [rw] brand + # @return [::String] + # Brand of the product. + # @!attribute [rw] category_l1 + # @return [::String] + # Product category (1st level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l2 + # @return [::String] + # Product category (2nd level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l3 + # @return [::String] + # Product category (3rd level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l4 + # @return [::String] + # Product category (4th level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l5 + # @return [::String] + # Product category (5th level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] product_type_l1 + # @return [::String] + # Product type (1st level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l2 + # @return [::String] + # Product type (2nd level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l3 + # @return [::String] + # Product type (3rd level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l4 + # @return [::String] + # Product type (4th level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l5 + # @return [::String] + # Product type (5th level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Current price of the product. + # @!attribute [rw] benchmark_price + # @return [::Google::Shopping::Type::Price] + # Latest available price benchmark for the product's catalog in the benchmark + # country. + class PriceCompetitivenessProductView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `price_insights_product_view` table. + # + # [Price insights](https://support.google.com/merchants/answer/11916926) + # report. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] id + # @return [::String] + # REST ID of the product, in the form of + # `channel~languageCode~feedLabel~offerId`. Can be used to join data with the + # `product_view` table. + # + # Required in the `SELECT` clause. + # @!attribute [rw] offer_id + # @return [::String] + # Merchant-provided id of the product. + # @!attribute [rw] title + # @return [::String] + # Title of the product. + # @!attribute [rw] brand + # @return [::String] + # Brand of the product. + # @!attribute [rw] category_l1 + # @return [::String] + # Product category (1st level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l2 + # @return [::String] + # Product category (2nd level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l3 + # @return [::String] + # Product category (3rd level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l4 + # @return [::String] + # Product category (4th level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l5 + # @return [::String] + # Product category (5th level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] product_type_l1 + # @return [::String] + # Product type (1st level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l2 + # @return [::String] + # Product type (2nd level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l3 + # @return [::String] + # Product type (3rd level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l4 + # @return [::String] + # Product type (4th level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l5 + # @return [::String] + # Product type (5th level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Current price of the product. + # @!attribute [rw] suggested_price + # @return [::Google::Shopping::Type::Price] + # Latest suggested price for the product. + # @!attribute [rw] predicted_impressions_change_fraction + # @return [::Float] + # Predicted change in impressions as a fraction after introducing the + # suggested price compared to current active price. For example, 0.05 is a 5% + # predicted increase in impressions. + # @!attribute [rw] predicted_clicks_change_fraction + # @return [::Float] + # Predicted change in clicks as a fraction after introducing the + # suggested price compared to current active price. For example, 0.05 is a 5% + # predicted increase in clicks. + # @!attribute [rw] predicted_conversions_change_fraction + # @return [::Float] + # Predicted change in conversions as a fraction after introducing the + # suggested price compared to current active price. For example, 0.05 is a 5% + # predicted increase in conversions). + # @!attribute [rw] effectiveness + # @return [::Google::Shopping::Merchant::Reports::V1::PriceInsightsProductView::Effectiveness] + # The predicted effectiveness of applying the price suggestion, bucketed. + class PriceInsightsProductView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Predicted effectiveness bucket. + # + # Effectiveness indicates which products would benefit most from price + # changes. This rating takes into consideration the performance boost + # predicted by adjusting the sale price and the difference between your + # current price and the suggested price. Price suggestions with `HIGH` + # effectiveness are predicted to drive the largest increase in performance. + module Effectiveness + # Effectiveness is unknown. + EFFECTIVENESS_UNSPECIFIED = 0 + + # Effectiveness is low. + LOW = 1 + + # Effectiveness is medium. + MEDIUM = 2 + + # Effectiveness is high. + HIGH = 3 + end + end + + # Fields available for query in `best_sellers_product_cluster_view` table. + # + # [Best sellers](https://support.google.com/merchants/answer/9488679) report + # with top product clusters. A product cluster is a grouping for different + # offers and variants that represent the same product, for example, Google + # Pixel 7. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] report_date + # @return [::Google::Type::Date] + # Report date. The value of this field can only be one of the following: + # + # * The first day of the week (Monday) for weekly reports, + # * The first day of the month for monthly reports. + # + # Required in the `SELECT` clause. If a `WHERE` condition on `report_date` is + # not specified in the query, the latest available weekly or monthly report + # is returned. + # @!attribute [rw] report_granularity + # @return [::Google::Shopping::Merchant::Reports::V1::ReportGranularity::ReportGranularityEnum] + # Granularity of the report. The ranking can be done over a week or a month + # timeframe. + # + # Required in the `SELECT` clause. Condition on `report_granularity` is + # required in the `WHERE` clause. + # @!attribute [rw] report_country_code + # @return [::String] + # Country where the ranking is calculated. Represented in the ISO 3166 + # format. + # + # Required in the `SELECT` clause. Condition on `report_country_code` is + # required in the `WHERE` clause. + # @!attribute [rw] report_category_id + # @return [::Integer] + # Google product category ID to calculate the ranking for, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # + # Required in the `SELECT` clause. If a `WHERE` condition on + # `report_category_id` is not specified in the query, rankings for all + # top-level categories are returned. + # @!attribute [rw] title + # @return [::String] + # Title of the product cluster. + # @!attribute [rw] brand + # @return [::String] + # Brand of the product cluster. + # @!attribute [rw] category_l1 + # @return [::String] + # Product category (1st level) of the product cluster, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l2 + # @return [::String] + # Product category (2nd level) of the product cluster, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l3 + # @return [::String] + # Product category (3rd level) of the product cluster, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l4 + # @return [::String] + # Product category (4th level) of the product cluster, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l5 + # @return [::String] + # Product category (5th level) of the product cluster, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] variant_gtins + # @return [::Array<::String>] + # GTINs of example variants of the product cluster. + # @!attribute [rw] inventory_status + # @return [::Google::Shopping::Merchant::Reports::V1::BestSellersProductClusterView::InventoryStatus] + # Whether the product cluster is `IN_STOCK` in your product data source in at + # least one of the countries, `OUT_OF_STOCK` in your product data source in + # all countries, or `NOT_IN_INVENTORY` at all. + # + # The field doesn't take the Best sellers report country filter into account. + # @!attribute [rw] brand_inventory_status + # @return [::Google::Shopping::Merchant::Reports::V1::BestSellersProductClusterView::InventoryStatus] + # Whether there is at least one product of the brand currently `IN_STOCK` in + # your product data source in at least one of the countries, all products are + # `OUT_OF_STOCK` in your product data source in all countries, or + # `NOT_IN_INVENTORY`. + # + # The field doesn't take the Best sellers report country filter into account. + # @!attribute [rw] rank + # @return [::Integer] + # Popularity of the product cluster on Ads and organic surfaces, in the + # selected category and country, based on the estimated number of units sold. + # @!attribute [rw] previous_rank + # @return [::Integer] + # Popularity rank in the previous week or month. + # @!attribute [rw] relative_demand + # @return [::Google::Shopping::Merchant::Reports::V1::RelativeDemand::RelativeDemandEnum] + # Estimated demand in relation to the product cluster with the highest + # popularity rank in the same category and country. + # @!attribute [rw] previous_relative_demand + # @return [::Google::Shopping::Merchant::Reports::V1::RelativeDemand::RelativeDemandEnum] + # Estimated demand in relation to the product cluster with the highest + # popularity rank in the same category and country in the previous week or + # month. + # @!attribute [rw] relative_demand_change + # @return [::Google::Shopping::Merchant::Reports::V1::RelativeDemandChangeType::RelativeDemandChangeTypeEnum] + # Change in the estimated demand. Whether it rose, sank or remained flat. + class BestSellersProductClusterView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Status of the product cluster or brand in your inventory. + module InventoryStatus + # Not specified. + INVENTORY_STATUS_UNSPECIFIED = 0 + + # You have a product for this product cluster or brand in stock. + IN_STOCK = 1 + + # You have a product for this product cluster or brand in inventory but it + # is currently out of stock. + OUT_OF_STOCK = 2 + + # You do not have a product for this product cluster or brand in inventory. + NOT_IN_INVENTORY = 3 + end + end + + # Fields available for query in `best_sellers_brand_view` table. + # + # [Best sellers](https://support.google.com/merchants/answer/9488679) report + # with top brands. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] report_date + # @return [::Google::Type::Date] + # Report date. The value of this field can only be one of the following: + # + # * The first day of the week (Monday) for weekly reports, + # * The first day of the month for monthly reports. + # + # Required in the `SELECT` clause. If a `WHERE` condition on `report_date` is + # not specified in the query, the latest available weekly or monthly report + # is returned. + # @!attribute [rw] report_granularity + # @return [::Google::Shopping::Merchant::Reports::V1::ReportGranularity::ReportGranularityEnum] + # Granularity of the report. The ranking can be done over a week or a month + # timeframe. + # + # Required in the `SELECT` clause. Condition on `report_granularity` is + # required in the `WHERE` clause. + # @!attribute [rw] report_country_code + # @return [::String] + # Country where the ranking is calculated. Represented in the ISO 3166 + # format. + # + # Required in the `SELECT` clause. Condition on `report_country_code` is + # required in the `WHERE` clause. + # @!attribute [rw] report_category_id + # @return [::Integer] + # Google product category ID to calculate the ranking for, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # + # Required in the `SELECT` clause. If a `WHERE` condition on + # `report_category_id` is not specified in the query, rankings for all + # top-level categories are returned. + # @!attribute [rw] brand + # @return [::String] + # Name of the brand. + # @!attribute [rw] rank + # @return [::Integer] + # Popularity of the brand on Ads and organic surfaces, in the selected + # category and country, based on the estimated number of units sold. + # @!attribute [rw] previous_rank + # @return [::Integer] + # Popularity rank in the previous week or month. + # @!attribute [rw] relative_demand + # @return [::Google::Shopping::Merchant::Reports::V1::RelativeDemand::RelativeDemandEnum] + # Estimated demand in relation to the brand with the highest popularity rank + # in the same category and country. + # @!attribute [rw] previous_relative_demand + # @return [::Google::Shopping::Merchant::Reports::V1::RelativeDemand::RelativeDemandEnum] + # Estimated demand in relation to the brand with the highest popularity rank + # in the same category and country in the previous week or month. + # @!attribute [rw] relative_demand_change + # @return [::Google::Shopping::Merchant::Reports::V1::RelativeDemandChangeType::RelativeDemandChangeTypeEnum] + # Change in the estimated demand. Whether it rose, sank or remained flat. + class BestSellersBrandView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `non_product_performance_view` table. + # + # Performance data on images and online store links leading to your non-product + # pages. This includes performance metrics (for example, `clicks`) + # and dimensions according to which performance metrics are segmented (for + # example, `date`). + # + # Segment fields cannot be selected in queries without also selecting at least + # one metric field. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] date + # @return [::Google::Type::Date] + # Date in the merchant timezone to which metrics apply. Segment. + # + # Condition on `date` is required in the `WHERE` clause. + # @!attribute [rw] week + # @return [::Google::Type::Date] + # First day of the week (Monday) of the metrics date in the merchant + # timezone. Segment. + # @!attribute [rw] clicks + # @return [::Integer] + # Number of clicks on images and online store links leading to your + # non-product pages. Metric. + # @!attribute [rw] impressions + # @return [::Integer] + # Number of times images and online store links leading to your non-product + # pages were shown. Metric. + # @!attribute [rw] click_through_rate + # @return [::Float] + # Click-through rate - the number of clicks (`clicks`) divided by the number + # of impressions (`impressions`) of images and online store links leading to + # your non-product pages. Metric. + class NonProductPerformanceView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `competitive_visibility_competitor_view` table. + # + # [Competitive + # visibility](https://support.google.com/merchants/answer/11366442) report with + # businesses with similar visibility. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] date + # @return [::Google::Type::Date] + # Date of this row. + # + # A condition on `date` is required in the `WHERE` clause. + # @!attribute [rw] domain + # @return [::String] + # Domain of your competitor or your domain, if 'is_your_domain' is true. + # + # Required in the `SELECT` clause. Cannot be filtered on in the 'WHERE' + # clause. + # @!attribute [rw] is_your_domain + # @return [::Boolean] + # True if this row contains data for your domain. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] report_country_code + # @return [::String] + # Country where impressions appeared. + # + # Required in the `SELECT` clause. A condition on `report_country_code` is + # required in the `WHERE` clause. + # @!attribute [rw] report_category_id + # @return [::Integer] + # Google product category ID to calculate the report for, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # + # Required in the `SELECT` clause. A condition on `report_category_id` is + # required in the `WHERE` clause. + # @!attribute [rw] traffic_source + # @return [::Google::Shopping::Merchant::Reports::V1::TrafficSource::TrafficSourceEnum] + # Traffic source of impressions. + # + # Required in the `SELECT` clause. + # @!attribute [rw] rank + # @return [::Integer] + # Position of the domain in the similar businesses ranking for the selected + # keys (`date`, `report_category_id`, `report_country_code`, + # `traffic_source`) based on impressions. 1 is the highest. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] ads_organic_ratio + # @return [::Float] + # [Ads / organic ratio] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Cads-free-ratio) + # shows how often the domain receives impressions from Shopping ads compared + # to organic traffic. The number is rounded and bucketed. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] page_overlap_rate + # @return [::Float] + # [Page overlap rate] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Cpage-overlap-rate) + # shows how frequently competing retailers’ offers are shown together with + # your offers on the same page. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] higher_position_rate + # @return [::Float] + # [Higher position rate] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Chigher-position-rate) + # shows how often a competitor’s offer got placed in a higher position on the + # page than your offer. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] relative_visibility + # @return [::Float] + # [Relative visibility] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Crelative-visibility) + # shows how often your competitors’ offers are shown compared to your offers. + # In other words, this is the number of displayed impressions of a competitor + # retailer divided by the number of your displayed impressions during a + # selected time range for a selected product category and country. + # + # Cannot be filtered on in the 'WHERE' clause. + class CompetitiveVisibilityCompetitorView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `competitive_visibility_top_merchant_view` + # table. + # + # [Competitive + # visibility](https://support.google.com/merchants/answer/11366442) report with + # business with highest visibility. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] date + # @return [::Google::Type::Date] + # Date of this row. + # + # Cannot be selected in the `SELECT` clause. A condition on `date` is + # required in the `WHERE` clause. + # @!attribute [rw] domain + # @return [::String] + # Domain of your competitor or your domain, if 'is_your_domain' is true. + # + # Required in the `SELECT` clause. Cannot be filtered on in the 'WHERE' + # clause. + # @!attribute [rw] is_your_domain + # @return [::Boolean] + # True if this row contains data for your domain. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] report_country_code + # @return [::String] + # Country where impressions appeared. + # + # Required in the `SELECT` clause. A condition on `report_country_code` is + # required in the `WHERE` clause. + # @!attribute [rw] report_category_id + # @return [::Integer] + # Google product category ID to calculate the report for, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # + # Required in the `SELECT` clause. A condition on `report_category_id` is + # required in the `WHERE` clause. + # @!attribute [rw] traffic_source + # @return [::Google::Shopping::Merchant::Reports::V1::TrafficSource::TrafficSourceEnum] + # Traffic source of impressions. + # + # Required in the `SELECT` clause. + # @!attribute [rw] rank + # @return [::Integer] + # Position of the domain in the top merchants ranking for the selected keys + # (`date`, `report_category_id`, `report_country_code`, `traffic_source`) + # based on impressions. 1 is the highest. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] ads_organic_ratio + # @return [::Float] + # [Ads / organic ratio] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Cads-free-ratio) + # shows how often the domain receives impressions from Shopping ads compared + # to organic traffic. The number is rounded and bucketed. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] page_overlap_rate + # @return [::Float] + # [Page overlap rate] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Cpage-overlap-rate) + # shows how frequently competing retailers’ offers are shown together with + # your offers on the same page. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] higher_position_rate + # @return [::Float] + # [Higher position rate] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Chigher-position-rate) + # shows how often a competitor’s offer got placed in a higher position on the + # page than your offer. + # + # Cannot be filtered on in the 'WHERE' clause. + class CompetitiveVisibilityTopMerchantView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `competitive_visibility_benchmark_view` table. + # + # [Competitive + # visibility](https://support.google.com/merchants/answer/11366442) report with + # the category benchmark. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] date + # @return [::Google::Type::Date] + # Date of this row. + # + # Required in the `SELECT` clause. A condition on `date` is required in the + # `WHERE` clause. + # @!attribute [rw] report_country_code + # @return [::String] + # Country where impressions appeared. + # + # Required in the `SELECT` clause. A condition on `report_country_code` is + # required in the `WHERE` clause. + # @!attribute [rw] report_category_id + # @return [::Integer] + # Google product category ID to calculate the report for, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # + # Required in the `SELECT` clause. A condition on `report_category_id` is + # required in the `WHERE` clause. + # @!attribute [rw] traffic_source + # @return [::Google::Shopping::Merchant::Reports::V1::TrafficSource::TrafficSourceEnum] + # Traffic source of impressions. + # + # Required in the `SELECT` clause. + # @!attribute [rw] your_domain_visibility_trend + # @return [::Float] + # Change in visibility based on impressions for your domain with respect to + # the start of the selected time range (or first day with non-zero + # impressions). + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] category_benchmark_visibility_trend + # @return [::Float] + # Change in visibility based on impressions with respect to the start of the + # selected time range (or first day with non-zero impressions) for a + # combined set of merchants with highest visibility approximating the + # market. + # + # Cannot be filtered on in the 'WHERE' clause. + class CompetitiveVisibilityBenchmarkView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Marketing method used to promote your products on Google (organic versus + # ads). + class MarketingMethod + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Marketing method values. + module MarketingMethodEnum + # Not specified. + MARKETING_METHOD_ENUM_UNSPECIFIED = 0 + + # Organic marketing. + ORGANIC = 1 + + # Ads-based marketing. + ADS = 2 + end + end + + # Store where the product is sold (online versus local stores). + class StoreType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Store types. + module StoreTypeEnum + # Not specified. + STORE_TYPE_ENUM_UNSPECIFIED = 0 + + # Online store. + ONLINE_STORE = 1 + + # Local (physical) stores. + LOCAL_STORES = 2 + end + end + + # Granularity of the Best sellers report. Best sellers reports are computed + # over a week and a month timeframe. + class ReportGranularity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Report granularity values. + module ReportGranularityEnum + # Not specified. + REPORT_GRANULARITY_ENUM_UNSPECIFIED = 0 + + # Report is computed over a week timeframe. + WEEKLY = 1 + + # Report is computed over a month timeframe. + MONTHLY = 2 + end + end + + # Relative demand of a product cluster or brand in the Best sellers report. + class RelativeDemand + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Relative demand values. + module RelativeDemandEnum + # Not specified. + RELATIVE_DEMAND_ENUM_UNSPECIFIED = 0 + + # Demand is 0-5% of the demand of the highest ranked product cluster or + # brand. + VERY_LOW = 10 + + # Demand is 6-10% of the demand of the highest ranked product cluster or + # brand. + LOW = 20 + + # Demand is 11-20% of the demand of the highest ranked product cluster or + # brand. + MEDIUM = 30 + + # Demand is 21-50% of the demand of the highest ranked product cluster or + # brand. + HIGH = 40 + + # Demand is 51-100% of the demand of the highest ranked product cluster or + # brand. + VERY_HIGH = 50 + end + end + + # Relative demand of a product cluster or brand in the Best sellers report + # compared to the previous time period. + class RelativeDemandChangeType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Relative demand change type values. + module RelativeDemandChangeTypeEnum + # Not specified. + RELATIVE_DEMAND_CHANGE_TYPE_ENUM_UNSPECIFIED = 0 + + # Relative demand is lower than the previous time period. + SINKER = 1 + + # Relative demand is equal to the previous time period. + FLAT = 2 + + # Relative demand is higher than the previous time period. + RISER = 3 + end + end + + # Traffic source of impressions in the Competitive visibility report. + class TrafficSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Traffic source values. + module TrafficSourceEnum + # Not specified. + TRAFFIC_SOURCE_ENUM_UNSPECIFIED = 0 + + # Organic traffic. + ORGANIC = 1 + + # Traffic from ads. + ADS = 2 + + # Organic and ads traffic. + ALL = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1/proto_docs/google/type/date.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..a52275cebf89 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/type/date.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module 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, with a zero year (for example, an anniversary). + # * A year on its own, with a zero month and a zero day. + # * A year and month, with a zero day (for example, a credit card expiration + # date). + # + # Related types: + # + # * [google.type.TimeOfDay][google.type.TimeOfDay] + # * [google.type.DateTime][google.type.DateTime] + # * {::Google::Protobuf::Timestamp 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-reports-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-reports-v1/snippets/Gemfile new file mode 100644 index 000000000000..6c1738151dcf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1", path: "../" +else + gem "google-shopping-merchant-reports-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-reports-v1/snippets/report_service/search.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/snippets/report_service/search.rb new file mode 100644 index 000000000000..8ef0dd60d2ee --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/snippets/report_service/search.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_ReportService_Search_sync] +require "google/shopping/merchant/reports/v1" + +## +# Snippet for the search call in the ReportService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Reports::V1::ReportService::Client#search. +# +def search + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Reports::V1::ReportService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Reports::V1::SearchRequest.new + + # Call the search method. + result = client.search request + + # The returned object is of type Gapic::PagedEnumerable. You can 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::Reports::V1::ReportRow. + p item + end +end +# [END merchantapi_v1_generated_ReportService_Search_sync] diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/snippets/snippet_metadata_google.shopping.merchant.reports.v1.json b/owl-bot-staging/google-shopping-merchant-reports-v1/snippets/snippet_metadata_google.shopping.merchant.reports.v1.json new file mode 100644 index 000000000000..7585e5455b25 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/snippets/snippet_metadata_google.shopping.merchant.reports.v1.json @@ -0,0 +1,55 @@ +{ + "client_library": { + "name": "google-shopping-merchant-reports-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.reports.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_ReportService_Search_sync", + "title": "Snippet for the search call in the ReportService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reports::V1::ReportService::Client#search.", + "file": "report_service/search.rb", + "language": "RUBY", + "client_method": { + "short_name": "search", + "full_name": "::Google::Shopping::Merchant::Reports::V1::ReportService::Client#search", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Reports::V1::SearchRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Reports::V1::SearchResponse", + "client": { + "short_name": "ReportService::Client", + "full_name": "::Google::Shopping::Merchant::Reports::V1::ReportService::Client" + }, + "method": { + "short_name": "Search", + "full_name": "google.shopping.merchant.reports.v1.ReportService.Search", + "service": { + "short_name": "ReportService", + "full_name": "google.shopping.merchant.reports.v1.ReportService" + } + } + }, + "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-reports-v1/test/google/shopping/merchant/reports/v1/report_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_rest_test.rb new file mode 100644 index 000000000000..a19467753f43 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_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/reports/v1/reports_pb" +require "google/shopping/merchant/reports/v1/report_service/rest" + + +class ::Google::Shopping::Merchant::Reports::V1::ReportService::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_search + # Create test objects. + client_result = ::Google::Shopping::Merchant::Reports::V1::SearchResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + + search_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::ServiceStub.stub :transcode_search_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.search({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.search parent: parent, query: query, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.search ::Google::Shopping::Merchant::Reports::V1::SearchRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.search({ parent: parent, query: query, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.search(::Google::Shopping::Merchant::Reports::V1::SearchRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_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::Reports::V1::ReportService::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::Reports::V1::ReportService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_test.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_test.rb new file mode 100644 index 000000000000..7f5c30b2cc09 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_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/reports/v1/reports_pb" +require "google/shopping/merchant/reports/v1/report_service" + +class ::Google::Shopping::Merchant::Reports::V1::ReportService::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_search + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Reports::V1::SearchResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + + search_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search, name + assert_kind_of ::Google::Shopping::Merchant::Reports::V1::SearchRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["query"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.search({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.search parent: parent, query: query, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.search ::Google::Shopping::Merchant::Reports::V1::SearchRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.search({ parent: parent, query: query, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.search(::Google::Shopping::Merchant::Reports::V1::SearchRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::Reports::V1::ReportService::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::Reports::V1::ReportService::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::Reports::V1::ReportService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Reports::V1::ReportService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +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-reports-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-reports-v1beta/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/.gitignore @@ -0,0 +1,20 @@ +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-reports-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-reports-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..b92bd94847dc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta", + "distribution_name": "google-shopping-merchant-reports-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-reports-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-reports 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-reports-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-reports-v1beta/.rubocop.yml new file mode 100644 index 000000000000..85545d4fdb3f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-reports-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-reports-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-reports-v1beta/.yardopts new file mode 100644 index 000000000000..3ddd15e0cf87 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-reports-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..9c435ebe08ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-reports-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-reports-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/reports/v1beta" + +client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::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/reports/v1beta" + +::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::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-reports-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/reports/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::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-reports-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-reports-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-reports-v1beta/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/Gemfile @@ -0,0 +1,15 @@ +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-reporters", "~> 1.8.0", require: false +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-reports-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-reports-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-reports-v1beta/README.md new file mode 100644 index 000000000000..5b638c86ee7b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports](https://rubygems.org/gems/google-shopping-merchant-reports). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-reports-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/reports/v1beta" + +client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new +request = ::Google::Shopping::Merchant::Reports::V1beta::SearchRequest.new # (request fields as keyword arguments...) +response = client.search request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-reports-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/reports/v1beta" +require "logger" + +client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::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.2+. + +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-reports`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-reports-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-reports`. +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-reports-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-reports-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-reports-v1beta/Rakefile new file mode 100644 index 000000000000..82433d3dd4c3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-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/reports/v1beta/report_service/credentials" + ::Google::Shopping::Merchant::Reports::V1beta::ReportService::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-reports-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-reports-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-reports-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-reports-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-reports-v1beta" + header "google-shopping-merchant-reports-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-reports-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-reports-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-reports-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-reports-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-reports-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-reports-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..fb2ba43f41e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/gapic_metadata.json @@ -0,0 +1,23 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.reports.v1beta", + "libraryPackage": "::Google::Shopping::Merchant::Reports::V1beta", + "services": { + "ReportService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client", + "rpcs": { + "Search": { + "methods": [ + "search" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/google-shopping-merchant-reports-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-reports-v1beta/google-shopping-merchant-reports-v1beta.gemspec new file mode 100644 index 000000000000..2ce231f4da78 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/google-shopping-merchant-reports-v1beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/reports/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-reports-v1beta" + gem.version = Google::Shopping::Merchant::Reports::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-reports-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-reports 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.3" + 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-reports-v1beta/lib/google-shopping-merchant-reports-v1beta.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google-shopping-merchant-reports-v1beta.rb new file mode 100644 index 000000000000..48b97fd3f8a8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google-shopping-merchant-reports-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/reports/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta.rb new file mode 100644 index 000000000000..8f2e15f900dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/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/reports/v1beta/report_service" +require "google/shopping/merchant/reports/v1beta/version" + +module Google + module Shopping + module Merchant + module Reports + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/reports/v1beta" + # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/reports/v1beta" + # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/shopping/merchant/reports/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service.rb new file mode 100644 index 000000000000..86b087e5ecff --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_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/reports/v1beta/version" + +require "google/shopping/merchant/reports/v1beta/report_service/credentials" +require "google/shopping/merchant/reports/v1beta/report_service/client" +require "google/shopping/merchant/reports/v1beta/report_service/rest" + +module Google + module Shopping + module Merchant + module Reports + module V1beta + ## + # Service for retrieving reports and insights about your products, their + # performance, and their competitive environment on Google. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/reports/v1beta/report_service" + # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/reports/v1beta/report_service/rest" + # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new + # + module ReportService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "report_service", "helpers.rb" +require "google/shopping/merchant/reports/v1beta/report_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/client.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/client.rb new file mode 100644 index 000000000000..10901e1cdd1f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/client.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 "google/cloud/errors" +require "google/shopping/merchant/reports/v1beta/reports_pb" + +module Google + module Shopping + module Merchant + module Reports + module V1beta + module ReportService + ## + # Client for the ReportService service. + # + # Service for retrieving reports and insights about your products, their + # performance, and their competitive environment on Google. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :report_service_stub + + ## + # Configure the ReportService Client class. + # + # See {::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ReportService clients + # ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.configure do |config| + # config.timeout = 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", "Reports", "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 ReportService Client instance. + # + # The configuration is set to the derived mode, meaning that values 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::Reports::V1beta::ReportService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @report_service_stub.universe_domain + end + + ## + # Create a new ReportService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ReportService 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/reports/v1beta/reports_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 + + @report_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @report_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 + @report_service_stub.logger + end + + # Service calls + + ## + # Retrieves a report defined by a search query. The response might contain + # fewer rows than specified by `page_size`. Rely on `next_page_token` to + # determine if there are more rows to be requested. + # + # @overload search(request, options = nil) + # Pass arguments to `search` via a request object, either of type + # {::Google::Shopping::Merchant::Reports::V1beta::SearchRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reports::V1beta::SearchRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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(parent: nil, query: nil, page_size: nil, page_token: nil) + # Pass arguments to `search` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Id of the account making the call. Must be a standalone account + # or an MCA subaccount. Format: accounts/\\{account} + # @param query [::String] + # Required. Query that defines a report to be retrieved. + # + # For details on how to construct your query, see the Query Language + # guide. For the full list of available tables and fields, see the Available + # fields. + # @param page_size [::Integer] + # Optional. Number of `ReportRows` to retrieve in a single page. Defaults to + # 1000. Values above 5000 are coerced to 5000. + # @param page_token [::String] + # Optional. Token of the page to retrieve. If not specified, the first page + # of results is returned. In order to request the next page of results, the + # value obtained from `next_page_token` in the previous response should be + # used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1beta::ReportRow>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1beta::ReportRow>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/reports/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reports::V1beta::SearchRequest.new + # + # # Call the search method. + # result = client.search request + # + # # The returned object is of type Gapic::PagedEnumerable. You can 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::Reports::V1beta::ReportRow. + # p item + # end + # + def search request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reports::V1beta::SearchRequest + + # Converts hash and nil to 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.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Reports::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.search.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @report_service_stub.call_rpc :search, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @report_service_stub, :search, request, response, 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 ReportService API. + # + # This class represents the configuration for ReportService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # search to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.search.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.search.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::Reports::V1beta::ReportService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ReportService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `search` + # @return [::Gapic::Config::Method] + # + attr_reader :search + + # @private + def initialize parent_rpcs = nil + search_config = parent_rpcs.search if parent_rpcs.respond_to? :search + @search = ::Gapic::Config::Method.new search_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-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/credentials.rb new file mode 100644 index 000000000000..c11c7a9481d1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_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 Reports + module V1beta + module ReportService + # Credentials for the ReportService 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-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest.rb new file mode 100644 index 000000000000..94cbe550a4c6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_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/reports/v1beta/version" + +require "google/shopping/merchant/reports/v1beta/report_service/credentials" +require "google/shopping/merchant/reports/v1beta/report_service/rest/client" + +module Google + module Shopping + module Merchant + module Reports + module V1beta + ## + # Service for retrieving reports and insights about your products, their + # performance, and their competitive environment on Google. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/reports/v1beta/report_service/rest" + # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new + # + module ReportService + # 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/reports/v1beta/report_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/client.rb new file mode 100644 index 000000000000..3740e0847bdd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/client.rb @@ -0,0 +1,455 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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/reports/v1beta/reports_pb" +require "google/shopping/merchant/reports/v1beta/report_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Reports + module V1beta + module ReportService + module Rest + ## + # REST client for the ReportService service. + # + # Service for retrieving reports and insights about your products, their + # performance, and their competitive environment on Google. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :report_service_stub + + ## + # Configure the ReportService Client class. + # + # See {::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ReportService clients + # ::Google::Shopping::Merchant::Reports::V1beta::ReportService::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", "Reports", "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 ReportService Client instance. + # + # The configuration is set to the derived mode, meaning that values 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::Reports::V1beta::ReportService::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 + @report_service_stub.universe_domain + end + + ## + # Create a new ReportService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ReportService 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 + + @report_service_stub = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @report_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 + @report_service_stub.logger + end + + # Service calls + + ## + # Retrieves a report defined by a search query. The response might contain + # fewer rows than specified by `page_size`. Rely on `next_page_token` to + # determine if there are more rows to be requested. + # + # @overload search(request, options = nil) + # Pass arguments to `search` via a request object, either of type + # {::Google::Shopping::Merchant::Reports::V1beta::SearchRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reports::V1beta::SearchRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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(parent: nil, query: nil, page_size: nil, page_token: nil) + # Pass arguments to `search` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Id of the account making the call. Must be a standalone account + # or an MCA subaccount. Format: accounts/\\{account} + # @param query [::String] + # Required. Query that defines a report to be retrieved. + # + # For details on how to construct your query, see the Query Language + # guide. For the full list of available tables and fields, see the Available + # fields. + # @param page_size [::Integer] + # Optional. Number of `ReportRows` to retrieve in a single page. Defaults to + # 1000. Values above 5000 are coerced to 5000. + # @param page_token [::String] + # Optional. Token of the page to retrieve. If not specified, the first page + # of results is returned. In order to request the next page of results, the + # value obtained from `next_page_token` in the previous response should be + # used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1beta::ReportRow>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1beta::ReportRow>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/reports/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reports::V1beta::SearchRequest.new + # + # # Call the search method. + # result = client.search request + # + # # The returned object is of type Gapic::PagedEnumerable. You can 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::Reports::V1beta::ReportRow. + # p item + # end + # + def search request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reports::V1beta::SearchRequest + + # Converts hash and nil to an 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.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Reports::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.search.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @report_service_stub.search request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @report_service_stub, :search, "results", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ReportService REST API. + # + # This class represents the configuration for ReportService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # search to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.search.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.search.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the ReportService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `search` + # @return [::Gapic::Config::Method] + # + attr_reader :search + + # @private + def initialize parent_rpcs = nil + search_config = parent_rpcs.search if parent_rpcs.respond_to? :search + @search = ::Gapic::Config::Method.new search_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-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/service_stub.rb new file mode 100644 index 000000000000..319484db68ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_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/reports/v1beta/reports_pb" + +module Google + module Shopping + module Merchant + module Reports + module V1beta + module ReportService + module Rest + ## + # REST service stub for the ReportService 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 search REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reports::V1beta::SearchRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Reports::V1beta::SearchResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Reports::V1beta::SearchResponse] + # A result object deserialized from the server's reply + def search request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Reports::V1beta::SearchResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the search REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reports::V1beta::SearchRequest] + # 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_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/reports/v1beta/{parent}/reports:search", + 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-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_pb.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_pb.rb new file mode 100644 index 000000000000..e11221ebe26a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_pb.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/reports/v1beta/reports.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' +require 'google/shopping/type/types_pb' +require 'google/type/date_pb' + + +descriptor_data = "\n5google/shopping/merchant/reports/v1beta/reports.proto\x12\'google.shopping.merchant.reports.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\x1a\x16google/type/date.proto\"i\n\rSearchRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"n\n\x0eSearchResponse\x12\x43\n\x07results\x18\x01 \x03(\x0b\x32\x32.google.shopping.merchant.reports.v1beta.ReportRow\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd0\x08\n\tReportRow\x12\x61\n\x18product_performance_view\x18\x01 \x01(\x0b\x32?.google.shopping.merchant.reports.v1beta.ProductPerformanceView\x12h\n\x1cnon_product_performance_view\x18\x07 \x01(\x0b\x32\x42.google.shopping.merchant.reports.v1beta.NonProductPerformanceView\x12J\n\x0cproduct_view\x18\x02 \x01(\x0b\x32\x34.google.shopping.merchant.reports.v1beta.ProductView\x12t\n\"price_competitiveness_product_view\x18\x03 \x01(\x0b\x32H.google.shopping.merchant.reports.v1beta.PriceCompetitivenessProductView\x12\x66\n\x1bprice_insights_product_view\x18\x04 \x01(\x0b\x32\x41.google.shopping.merchant.reports.v1beta.PriceInsightsProductView\x12q\n!best_sellers_product_cluster_view\x18\x05 \x01(\x0b\x32\x46.google.shopping.merchant.reports.v1beta.BestSellersProductClusterView\x12^\n\x17\x62\x65st_sellers_brand_view\x18\x06 \x01(\x0b\x32=.google.shopping.merchant.reports.v1beta.BestSellersBrandView\x12|\n&competitive_visibility_competitor_view\x18\x08 \x01(\x0b\x32L.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityCompetitorView\x12\x7f\n(competitive_visibility_top_merchant_view\x18\t \x01(\x0b\x32M.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityTopMerchantView\x12z\n%competitive_visibility_benchmark_view\x18\n \x01(\x0b\x32K.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityBenchmarkView\"\xc1\n\n\x16ProductPerformanceView\x12k\n\x10marketing_method\x18\x01 \x01(\x0e\x32L.google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnumH\x00\x88\x01\x01\x12\x1f\n\x04\x64\x61te\x18\x02 \x01(\x0b\x32\x11.google.type.Date\x12\x1f\n\x04week\x18\x03 \x01(\x0b\x32\x11.google.type.Date\x12\"\n\x15\x63ustomer_country_code\x18\x04 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x08offer_id\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x12\n\x05title\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x07 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\t \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\n \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\x0b \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\x0c \x01(\tH\t\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18\r \x01(\tH\n\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18\x0e \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18\x0f \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18\x10 \x01(\tH\r\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18\x11 \x01(\tH\x0e\x88\x01\x01\x12\x1a\n\rcustom_label0\x18\x12 \x01(\tH\x0f\x88\x01\x01\x12\x1a\n\rcustom_label1\x18\x13 \x01(\tH\x10\x88\x01\x01\x12\x1a\n\rcustom_label2\x18\x14 \x01(\tH\x11\x88\x01\x01\x12\x1a\n\rcustom_label3\x18\x15 \x01(\tH\x12\x88\x01\x01\x12\x1a\n\rcustom_label4\x18\x16 \x01(\tH\x13\x88\x01\x01\x12\x13\n\x06\x63licks\x18\x17 \x01(\x03H\x14\x88\x01\x01\x12\x18\n\x0bimpressions\x18\x18 \x01(\x03H\x15\x88\x01\x01\x12\x1f\n\x12\x63lick_through_rate\x18\x19 \x01(\x01H\x16\x88\x01\x01\x12\x18\n\x0b\x63onversions\x18\x1a \x01(\x01H\x17\x88\x01\x01\x12\x35\n\x10\x63onversion_value\x18\x1b \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x1c\n\x0f\x63onversion_rate\x18\x1c \x01(\x01H\x18\x88\x01\x01\x42\x13\n\x11_marketing_methodB\x18\n\x16_customer_country_codeB\x0b\n\t_offer_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5B\x10\n\x0e_custom_label0B\x10\n\x0e_custom_label1B\x10\n\x0e_custom_label2B\x10\n\x0e_custom_label3B\x10\n\x0e_custom_label4B\t\n\x07_clicksB\x0e\n\x0c_impressionsB\x15\n\x13_click_through_rateB\x0e\n\x0c_conversionsB\x12\n\x10_conversion_rate\"\xc2\x17\n\x0bProductView\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12?\n\x07\x63hannel\x18\x1c \x01(\x0e\x32).google.shopping.type.Channel.ChannelEnumH\x01\x88\x01\x01\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tH\x02\x88\x01\x01\x12\x17\n\nfeed_label\x18\x03 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08offer_id\x18\x04 \x01(\tH\x04\x88\x01\x01\x12\x12\n\x05title\x18\x05 \x01(\tH\x05\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x06 \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x07 \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\x08 \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\t \x01(\tH\t\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\n \x01(\tH\n\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\x0b \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18\x0c \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18\r \x01(\tH\r\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18\x0e \x01(\tH\x0e\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18\x0f \x01(\tH\x0f\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18\x10 \x01(\tH\x10\x88\x01\x01\x12*\n\x05price\x18\x11 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x16\n\tcondition\x18\x12 \x01(\tH\x11\x88\x01\x01\x12\x19\n\x0c\x61vailability\x18\x13 \x01(\tH\x12\x88\x01\x01\x12\x1b\n\x0eshipping_label\x18\x14 \x01(\tH\x13\x88\x01\x01\x12\x0c\n\x04gtin\x18\x15 \x03(\t\x12\x1a\n\ritem_group_id\x18\x16 \x01(\tH\x14\x88\x01\x01\x12\x1b\n\x0ethumbnail_link\x18\x17 \x01(\tH\x15\x88\x01\x01\x12\x31\n\rcreation_time\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x0f\x65xpiration_date\x18\x19 \x01(\x0b\x32\x11.google.type.Date\x12\x87\x01\n#aggregated_reporting_context_status\x18\x1a \x01(\x0e\x32U.google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatusH\x16\x88\x01\x01\x12S\n\x0bitem_issues\x18\x1b \x03(\x0b\x32>.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue\x12\\\n\x0f\x63lick_potential\x18\x1d \x01(\x0e\x32\x43.google.shopping.merchant.reports.v1beta.ProductView.ClickPotential\x12!\n\x14\x63lick_potential_rank\x18\x1e \x01(\x03H\x17\x88\x01\x01\x1a\xb3\t\n\tItemIssue\x12Z\n\x04type\x18\x01 \x01(\x0b\x32L.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueType\x12\x62\n\x08severity\x18\x02 \x01(\x0b\x32P.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity\x12k\n\nresolution\x18\x03 \x01(\x0e\x32R.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueResolutionH\x00\x88\x01\x01\x1a\x65\n\rItemIssueType\x12\x11\n\x04\x63ode\x18\x01 \x01(\tH\x00\x88\x01\x01\x12 \n\x13\x63\x61nonical_attribute\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_codeB\x16\n\x14_canonical_attribute\x1a\x97\x05\n\x11ItemIssueSeverity\x12\x99\x01\n\x1eseverity_per_reporting_context\x18\x01 \x03(\x0b\x32q.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext\x12\x8a\x01\n\x13\x61ggregated_severity\x18\x02 \x01(\x0e\x32h.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.AggregatedIssueSeverityH\x00\x88\x01\x01\x1a\xcf\x01\n IssueSeverityPerReportingContext\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x00\x88\x01\x01\x12\x1d\n\x15\x64isapproved_countries\x18\x02 \x03(\t\x12\x19\n\x11\x64\x65moted_countries\x18\x03 \x03(\tB\x14\n\x12_reporting_context\"o\n\x17\x41ggregatedIssueSeverity\x12)\n%AGGREGATED_ISSUE_SEVERITY_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x44ISAPPROVED\x10\x01\x12\x0b\n\x07\x44\x45MOTED\x10\x02\x12\x0b\n\x07PENDING\x10\x03\x42\x16\n\x14_aggregated_severity\"i\n\x13ItemIssueResolution\x12%\n!ITEM_ISSUE_RESOLUTION_UNSPECIFIED\x10\x00\x12\x13\n\x0fMERCHANT_ACTION\x10\x01\x12\x16\n\x12PENDING_PROCESSING\x10\x02\x42\r\n\x0b_resolution\"\xa9\x01\n AggregatedReportingContextStatus\x12\x33\n/AGGREGATED_REPORTING_CONTEXT_STATUS_UNSPECIFIED\x10\x00\x12\x1f\n\x1bNOT_ELIGIBLE_OR_DISAPPROVED\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x14\n\x10\x45LIGIBLE_LIMITED\x10\x03\x12\x0c\n\x08\x45LIGIBLE\x10\x04\"P\n\x0e\x43lickPotential\x12\x1f\n\x1b\x43LICK_POTENTIAL_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x42\x05\n\x03_idB\n\n\x08_channelB\x10\n\x0e_language_codeB\r\n\x0b_feed_labelB\x0b\n\t_offer_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5B\x0c\n\n_conditionB\x0f\n\r_availabilityB\x11\n\x0f_shipping_labelB\x10\n\x0e_item_group_idB\x11\n\x0f_thumbnail_linkB&\n$_aggregated_reporting_context_statusB\x17\n\x15_click_potential_rank\"\x81\x06\n\x1fPriceCompetitivenessProductView\x12 \n\x13report_country_code\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x0f\n\x02id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x08offer_id\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x12\n\x05title\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\x07 \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\x08 \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\t \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\n \x01(\tH\t\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18\x0b \x01(\tH\n\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18\x0c \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18\r \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18\x0e \x01(\tH\r\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18\x0f \x01(\tH\x0e\x88\x01\x01\x12*\n\x05price\x18\x10 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x34\n\x0f\x62\x65nchmark_price\x18\x11 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x16\n\x14_report_country_codeB\x05\n\x03_idB\x0b\n\t_offer_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5\"\x87\t\n\x18PriceInsightsProductView\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08offer_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05title\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\x07 \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\x08 \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\t \x01(\tH\x08\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18\n \x01(\tH\t\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18\x0b \x01(\tH\n\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18\x0c \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18\r \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18\x0e \x01(\tH\r\x88\x01\x01\x12*\n\x05price\x18\x0f \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x34\n\x0fsuggested_price\x18\x10 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x32\n%predicted_impressions_change_fraction\x18\x11 \x01(\x01H\x0e\x88\x01\x01\x12-\n predicted_clicks_change_fraction\x18\x12 \x01(\x01H\x0f\x88\x01\x01\x12\x32\n%predicted_conversions_change_fraction\x18\x13 \x01(\x01H\x10\x88\x01\x01\x12\x66\n\reffectiveness\x18\x16 \x01(\x0e\x32O.google.shopping.merchant.reports.v1beta.PriceInsightsProductView.Effectiveness\"M\n\rEffectiveness\x12\x1d\n\x19\x45\x46\x46\x45\x43TIVENESS_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x42\x05\n\x03_idB\x0b\n\t_offer_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5B(\n&_predicted_impressions_change_fractionB#\n!_predicted_clicks_change_fractionB(\n&_predicted_conversions_change_fraction\"\xf0\x0b\n\x1d\x42\x65stSellersProductClusterView\x12&\n\x0breport_date\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12q\n\x12report_granularity\x18\x02 \x01(\x0e\x32P.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnumH\x00\x88\x01\x01\x12 \n\x13report_country_code\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x04 \x01(\x03H\x02\x88\x01\x01\x12\x12\n\x05title\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x07 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\t \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\n \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\x0b \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\x0c \x01(\tH\t\x88\x01\x01\x12\x15\n\rvariant_gtins\x18\r \x03(\t\x12u\n\x10inventory_status\x18\x0e \x01(\x0e\x32V.google.shopping.merchant.reports.v1beta.BestSellersProductClusterView.InventoryStatusH\n\x88\x01\x01\x12{\n\x16\x62rand_inventory_status\x18\x0f \x01(\x0e\x32V.google.shopping.merchant.reports.v1beta.BestSellersProductClusterView.InventoryStatusH\x0b\x88\x01\x01\x12\x11\n\x04rank\x18\x10 \x01(\x03H\x0c\x88\x01\x01\x12\x1a\n\rprevious_rank\x18\x11 \x01(\x03H\r\x88\x01\x01\x12h\n\x0frelative_demand\x18\x12 \x01(\x0e\x32J.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnumH\x0e\x88\x01\x01\x12q\n\x18previous_relative_demand\x18\x13 \x01(\x0e\x32J.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnumH\x0f\x88\x01\x01\x12\x83\x01\n\x16relative_demand_change\x18\x14 \x01(\x0e\x32^.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnumH\x10\x88\x01\x01\"i\n\x0fInventoryStatus\x12 \n\x1cINVENTORY_STATUS_UNSPECIFIED\x10\x00\x12\x0c\n\x08IN_STOCK\x10\x01\x12\x10\n\x0cOUT_OF_STOCK\x10\x02\x12\x14\n\x10NOT_IN_INVENTORY\x10\x03\x42\x15\n\x13_report_granularityB\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x13\n\x11_inventory_statusB\x19\n\x17_brand_inventory_statusB\x07\n\x05_rankB\x10\n\x0e_previous_rankB\x12\n\x10_relative_demandB\x1b\n\x19_previous_relative_demandB\x19\n\x17_relative_demand_change\"\xd1\x06\n\x14\x42\x65stSellersBrandView\x12&\n\x0breport_date\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12q\n\x12report_granularity\x18\x02 \x01(\x0e\x32P.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnumH\x00\x88\x01\x01\x12 \n\x13report_country_code\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x04 \x01(\x03H\x02\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x11\n\x04rank\x18\x07 \x01(\x03H\x04\x88\x01\x01\x12\x1a\n\rprevious_rank\x18\x08 \x01(\x03H\x05\x88\x01\x01\x12h\n\x0frelative_demand\x18\t \x01(\x0e\x32J.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnumH\x06\x88\x01\x01\x12q\n\x18previous_relative_demand\x18\n \x01(\x0e\x32J.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnumH\x07\x88\x01\x01\x12\x83\x01\n\x16relative_demand_change\x18\x0b \x01(\x0e\x32^.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnumH\x08\x88\x01\x01\x42\x15\n\x13_report_granularityB\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x08\n\x06_brandB\x07\n\x05_rankB\x10\n\x0e_previous_rankB\x12\n\x10_relative_demandB\x1b\n\x19_previous_relative_demandB\x19\n\x17_relative_demand_change\"\xdf\x01\n\x19NonProductPerformanceView\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12\x1f\n\x04week\x18\x02 \x01(\x0b\x32\x11.google.type.Date\x12\x13\n\x06\x63licks\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12\x18\n\x0bimpressions\x18\x04 \x01(\x03H\x01\x88\x01\x01\x12\x1f\n\x12\x63lick_through_rate\x18\x05 \x01(\x01H\x02\x88\x01\x01\x42\t\n\x07_clicksB\x0e\n\x0c_impressionsB\x15\n\x13_click_through_rate\"\x80\x05\n#CompetitiveVisibilityCompetitorView\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12\x13\n\x06\x64omain\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0eis_your_domain\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12 \n\x13report_country_code\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12\x65\n\x0etraffic_source\x18\x06 \x01(\x0e\x32H.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnumH\x04\x88\x01\x01\x12\x11\n\x04rank\x18\x07 \x01(\x03H\x05\x88\x01\x01\x12\x1e\n\x11\x61\x64s_organic_ratio\x18\x08 \x01(\x01H\x06\x88\x01\x01\x12\x1e\n\x11page_overlap_rate\x18\t \x01(\x01H\x07\x88\x01\x01\x12!\n\x14higher_position_rate\x18\n \x01(\x01H\x08\x88\x01\x01\x12 \n\x13relative_visibility\x18\x0b \x01(\x01H\t\x88\x01\x01\x42\t\n\x07_domainB\x11\n\x0f_is_your_domainB\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x11\n\x0f_traffic_sourceB\x07\n\x05_rankB\x14\n\x12_ads_organic_ratioB\x14\n\x12_page_overlap_rateB\x17\n\x15_higher_position_rateB\x16\n\x14_relative_visibility\"\xc7\x04\n$CompetitiveVisibilityTopMerchantView\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12\x13\n\x06\x64omain\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0eis_your_domain\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12 \n\x13report_country_code\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12\x65\n\x0etraffic_source\x18\x06 \x01(\x0e\x32H.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnumH\x04\x88\x01\x01\x12\x11\n\x04rank\x18\x07 \x01(\x03H\x05\x88\x01\x01\x12\x1e\n\x11\x61\x64s_organic_ratio\x18\x08 \x01(\x01H\x06\x88\x01\x01\x12\x1e\n\x11page_overlap_rate\x18\t \x01(\x01H\x07\x88\x01\x01\x12!\n\x14higher_position_rate\x18\n \x01(\x01H\x08\x88\x01\x01\x42\t\n\x07_domainB\x11\n\x0f_is_your_domainB\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x11\n\x0f_traffic_sourceB\x07\n\x05_rankB\x14\n\x12_ads_organic_ratioB\x14\n\x12_page_overlap_rateB\x17\n\x15_higher_position_rate\"\xd7\x03\n\"CompetitiveVisibilityBenchmarkView\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12 \n\x13report_country_code\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x03 \x01(\x03H\x01\x88\x01\x01\x12\x65\n\x0etraffic_source\x18\x04 \x01(\x0e\x32H.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnumH\x02\x88\x01\x01\x12)\n\x1cyour_domain_visibility_trend\x18\x05 \x01(\x01H\x03\x88\x01\x01\x12\x30\n#category_benchmark_visibility_trend\x18\x06 \x01(\x01H\x04\x88\x01\x01\x42\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x11\n\x0f_traffic_sourceB\x1f\n\x1d_your_domain_visibility_trendB&\n$_category_benchmark_visibility_trend\"e\n\x0fMarketingMethod\"R\n\x13MarketingMethodEnum\x12%\n!MARKETING_METHOD_ENUM_UNSPECIFIED\x10\x00\x12\x0b\n\x07ORGANIC\x10\x01\x12\x07\n\x03\x41\x44S\x10\x02\"n\n\x11ReportGranularity\"Y\n\x15ReportGranularityEnum\x12\'\n#REPORT_GRANULARITY_ENUM_UNSPECIFIED\x10\x00\x12\n\n\x06WEEKLY\x10\x01\x12\x0b\n\x07MONTHLY\x10\x02\"\x88\x01\n\x0eRelativeDemand\"v\n\x12RelativeDemandEnum\x12$\n RELATIVE_DEMAND_ENUM_UNSPECIFIED\x10\x00\x12\x0c\n\x08VERY_LOW\x10\n\x12\x07\n\x03LOW\x10\x14\x12\n\n\x06MEDIUM\x10\x1e\x12\x08\n\x04HIGH\x10(\x12\r\n\tVERY_HIGH\x10\x32\"\x8d\x01\n\x18RelativeDemandChangeType\"q\n\x1cRelativeDemandChangeTypeEnum\x12\x30\n,RELATIVE_DEMAND_CHANGE_TYPE_ENUM_UNSPECIFIED\x10\x00\x12\n\n\x06SINKER\x10\x01\x12\x08\n\x04\x46LAT\x10\x02\x12\t\n\x05RISER\x10\x03\"h\n\rTrafficSource\"W\n\x11TrafficSourceEnum\x12#\n\x1fTRAFFIC_SOURCE_ENUM_UNSPECIFIED\x10\x00\x12\x0b\n\x07ORGANIC\x10\x01\x12\x07\n\x03\x41\x44S\x10\x02\x12\x07\n\x03\x41LL\x10\x03\x32\x9c\x02\n\rReportService\x12\xc1\x01\n\x06Search\x12\x36.google.shopping.merchant.reports.v1beta.SearchRequest\x1a\x37.google.shopping.merchant.reports.v1beta.SearchResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\"2/reports/v1beta/{parent=accounts/*}/reports:search:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8a\x01\n+com.google.shopping.merchant.reports.v1betaB\x0cReportsProtoP\x01ZKcloud.google.com/go/shopping/merchant/reports/apiv1beta/reportspb;reportspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Reports + module V1beta + SearchRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.SearchRequest").msgclass + SearchResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.SearchResponse").msgclass + ReportRow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ReportRow").msgclass + ProductPerformanceView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ProductPerformanceView").msgclass + ProductView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ProductView").msgclass + ProductView::ItemIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ProductView.ItemIssue").msgclass + ProductView::ItemIssue::ItemIssueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueType").msgclass + ProductView::ItemIssue::ItemIssueSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity").msgclass + ProductView::ItemIssue::ItemIssueSeverity::IssueSeverityPerReportingContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext").msgclass + ProductView::ItemIssue::ItemIssueSeverity::AggregatedIssueSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.AggregatedIssueSeverity").enummodule + ProductView::ItemIssue::ItemIssueResolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueResolution").enummodule + ProductView::AggregatedReportingContextStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus").enummodule + ProductView::ClickPotential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ProductView.ClickPotential").enummodule + PriceCompetitivenessProductView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.PriceCompetitivenessProductView").msgclass + PriceInsightsProductView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.PriceInsightsProductView").msgclass + PriceInsightsProductView::Effectiveness = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.PriceInsightsProductView.Effectiveness").enummodule + BestSellersProductClusterView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.BestSellersProductClusterView").msgclass + BestSellersProductClusterView::InventoryStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.BestSellersProductClusterView.InventoryStatus").enummodule + BestSellersBrandView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.BestSellersBrandView").msgclass + NonProductPerformanceView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.NonProductPerformanceView").msgclass + CompetitiveVisibilityCompetitorView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.CompetitiveVisibilityCompetitorView").msgclass + CompetitiveVisibilityTopMerchantView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.CompetitiveVisibilityTopMerchantView").msgclass + CompetitiveVisibilityBenchmarkView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.CompetitiveVisibilityBenchmarkView").msgclass + MarketingMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.MarketingMethod").msgclass + MarketingMethod::MarketingMethodEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum").enummodule + ReportGranularity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ReportGranularity").msgclass + ReportGranularity::ReportGranularityEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum").enummodule + RelativeDemand = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.RelativeDemand").msgclass + RelativeDemand::RelativeDemandEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum").enummodule + RelativeDemandChangeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.RelativeDemandChangeType").msgclass + RelativeDemandChangeType::RelativeDemandChangeTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum").enummodule + TrafficSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.TrafficSource").msgclass + TrafficSource::TrafficSourceEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_services_pb.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_services_pb.rb new file mode 100644 index 000000000000..bfe851e2efdf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/reports/v1beta/reports.proto for package 'google.shopping.merchant.reports.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/reports/v1beta/reports_pb' + +module Google + module Shopping + module Merchant + module Reports + module V1beta + module ReportService + # Service for retrieving reports and insights about your products, their + # performance, and their competitive environment on Google. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.reports.v1beta.ReportService' + + # Retrieves a report defined by a search query. The response might contain + # fewer rows than specified by `page_size`. Rely on `next_page_token` to + # determine if there are more rows to be requested. + rpc :Search, ::Google::Shopping::Merchant::Reports::V1beta::SearchRequest, ::Google::Shopping::Merchant::Reports::V1beta::SearchResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/rest.rb new file mode 100644 index 000000000000..85baeb6c6a29 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/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/reports/v1beta/report_service/rest" +require "google/shopping/merchant/reports/v1beta/version" + +module Google + module Shopping + module Merchant + module Reports + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/reports/v1beta/rest" + # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new + # + module V1beta + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/version.rb new file mode 100644 index 000000000000..bf3fe029d973 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/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 Reports + module V1beta + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..03467a3756be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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. + # + # Note: This field should not be used in most cases. + 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. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # 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-reports-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 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-reports-v1beta/proto_docs/google/shopping/merchant/reports/v1beta/reports.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/merchant/reports/v1beta/reports.rb new file mode 100644 index 000000000000..3ab2c2d9864c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/merchant/reports/v1beta/reports.rb @@ -0,0 +1,1291 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Reports + module V1beta + # Request message for the `ReportService.Search` method. + # @!attribute [rw] parent + # @return [::String] + # Required. Id of the account making the call. Must be a standalone account + # or an MCA subaccount. Format: accounts/\\{account} + # @!attribute [rw] query + # @return [::String] + # Required. Query that defines a report to be retrieved. + # + # For details on how to construct your query, see the Query Language + # guide. For the full list of available tables and fields, see the Available + # fields. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Number of `ReportRows` to retrieve in a single page. Defaults to + # 1000. Values above 5000 are coerced to 5000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token of the page to retrieve. If not specified, the first page + # of results is returned. In order to request the next page of results, the + # value obtained from `next_page_token` in the previous response should be + # used. + class SearchRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ReportService.Search` method. + # @!attribute [rw] results + # @return [::Array<::Google::Shopping::Merchant::Reports::V1beta::ReportRow>] + # Rows that matched the search query. + # @!attribute [rw] next_page_token + # @return [::String] + # Token which can be sent as `page_token` to retrieve the next page. If + # omitted, there are no subsequent pages. + class SearchResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Result row returned from the search query. + # + # Only the message corresponding to the queried table is populated in the + # response. Within the populated message, only the fields requested explicitly + # in the query are populated. + # @!attribute [rw] product_performance_view + # @return [::Google::Shopping::Merchant::Reports::V1beta::ProductPerformanceView] + # Fields available for query in `product_performance_view` table. + # @!attribute [rw] non_product_performance_view + # @return [::Google::Shopping::Merchant::Reports::V1beta::NonProductPerformanceView] + # Fields available for query in `non_product_performance_view` table. + # @!attribute [rw] product_view + # @return [::Google::Shopping::Merchant::Reports::V1beta::ProductView] + # Fields available for query in `product_view` table. + # @!attribute [rw] price_competitiveness_product_view + # @return [::Google::Shopping::Merchant::Reports::V1beta::PriceCompetitivenessProductView] + # Fields available for query in `price_competitiveness_product_view` table. + # @!attribute [rw] price_insights_product_view + # @return [::Google::Shopping::Merchant::Reports::V1beta::PriceInsightsProductView] + # Fields available for query in `price_insights_product_view` table. + # @!attribute [rw] best_sellers_product_cluster_view + # @return [::Google::Shopping::Merchant::Reports::V1beta::BestSellersProductClusterView] + # Fields available for query in `best_sellers_product_cluster_view` table. + # @!attribute [rw] best_sellers_brand_view + # @return [::Google::Shopping::Merchant::Reports::V1beta::BestSellersBrandView] + # Fields available for query in `best_sellers_brand_view` table. + # @!attribute [rw] competitive_visibility_competitor_view + # @return [::Google::Shopping::Merchant::Reports::V1beta::CompetitiveVisibilityCompetitorView] + # Fields available for query in `competitive_visibility_competitor_view` + # table. + # @!attribute [rw] competitive_visibility_top_merchant_view + # @return [::Google::Shopping::Merchant::Reports::V1beta::CompetitiveVisibilityTopMerchantView] + # Fields available for query in `competitive_visibility_top_merchant_view` + # table. + # @!attribute [rw] competitive_visibility_benchmark_view + # @return [::Google::Shopping::Merchant::Reports::V1beta::CompetitiveVisibilityBenchmarkView] + # Fields available for query in `competitive_visibility_benchmark_view` + # table. + class ReportRow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `product_performance_view` table. + # + # Product performance data for your account, including performance metrics (for + # example, `clicks`) and dimensions according to which performance metrics are + # segmented (for example, `offer_id`). Values of product dimensions, such as + # `offer_id`, reflect the state of a product at the time of the impression. + # + # Segment fields cannot be selected in queries without also selecting at least + # one metric field. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] marketing_method + # @return [::Google::Shopping::Merchant::Reports::V1beta::MarketingMethod::MarketingMethodEnum] + # Marketing method to which metrics apply. Segment. + # @!attribute [rw] date + # @return [::Google::Type::Date] + # Date in the merchant timezone to which metrics apply. Segment. + # + # Condition on `date` is required in the `WHERE` clause. + # @!attribute [rw] week + # @return [::Google::Type::Date] + # First day of the week (Monday) of the metrics date in the merchant + # timezone. Segment. + # @!attribute [rw] customer_country_code + # @return [::String] + # Code of the country where the customer is located at the time of the event. + # Represented in the ISO 3166 format. Segment. + # + # If the customer country cannot be determined, a special 'ZZ' code is + # returned. + # @!attribute [rw] offer_id + # @return [::String] + # Merchant-provided id of the product. Segment. + # @!attribute [rw] title + # @return [::String] + # Title of the product. Segment. + # @!attribute [rw] brand + # @return [::String] + # Brand of the product. Segment. + # @!attribute [rw] category_l1 + # @return [::String] + # [Product category (1st + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in Google's product taxonomy. Segment. + # @!attribute [rw] category_l2 + # @return [::String] + # [Product category (2nd + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in Google's product taxonomy. Segment. + # @!attribute [rw] category_l3 + # @return [::String] + # [Product category (3rd + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in Google's product taxonomy. Segment. + # @!attribute [rw] category_l4 + # @return [::String] + # [Product category (4th + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in Google's product taxonomy. Segment. + # @!attribute [rw] category_l5 + # @return [::String] + # [Product category (5th + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in Google's product taxonomy. Segment. + # @!attribute [rw] product_type_l1 + # @return [::String] + # [Product type (1st + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in merchant's own product taxonomy. Segment. + # @!attribute [rw] product_type_l2 + # @return [::String] + # [Product type (2nd + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in merchant's own product taxonomy. Segment. + # @!attribute [rw] product_type_l3 + # @return [::String] + # [Product type (3rd + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in merchant's own product taxonomy. Segment. + # @!attribute [rw] product_type_l4 + # @return [::String] + # [Product type (4th + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in merchant's own product taxonomy. Segment. + # @!attribute [rw] product_type_l5 + # @return [::String] + # [Product type (5th + # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + # in merchant's own product taxonomy. Segment. + # @!attribute [rw] custom_label0 + # @return [::String] + # Custom label 0 for custom grouping of products. Segment. + # @!attribute [rw] custom_label1 + # @return [::String] + # Custom label 1 for custom grouping of products. Segment. + # @!attribute [rw] custom_label2 + # @return [::String] + # Custom label 2 for custom grouping of products. Segment. + # @!attribute [rw] custom_label3 + # @return [::String] + # Custom label 3 for custom grouping of products. Segment. + # @!attribute [rw] custom_label4 + # @return [::String] + # Custom label 4 for custom grouping of products. Segment. + # @!attribute [rw] clicks + # @return [::Integer] + # Number of clicks. Metric. + # @!attribute [rw] impressions + # @return [::Integer] + # Number of times merchant's products are shown. Metric. + # @!attribute [rw] click_through_rate + # @return [::Float] + # Click-through rate - the number of clicks merchant's products receive + # (clicks) divided by the number of times the products are shown + # (impressions). Metric. + # @!attribute [rw] conversions + # @return [::Float] + # Number of conversions attributed to the product, reported on the conversion + # date. Depending on the attribution model, a conversion might be distributed + # across multiple clicks, where each click gets its own credit assigned. This + # metric is a sum of all such credits. Metric. + # + # Available only for the `FREE` traffic source. + # @!attribute [rw] conversion_value + # @return [::Google::Shopping::Type::Price] + # Value of conversions attributed to the product, reported on the conversion + # date. Metric. + # + # Available only for the `FREE` traffic source. + # @!attribute [rw] conversion_rate + # @return [::Float] + # Number of conversions divided by the number of clicks, reported on the + # impression date. Metric. + # + # Available only for the `FREE` traffic source. + class ProductPerformanceView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `product_view` table. + # + # Products in the current inventory. Products in this table are the same as in + # Products sub-API but not all product attributes from Products sub-API are + # available for query in this table. In contrast to Products sub-API, this + # table allows to filter the returned list of products by product attributes. + # To retrieve a single product by `id` or list all products, Products sub-API + # should be used. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] id + # @return [::String] + # REST ID of the product, in the form of + # `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate + # on products take this as their `name` parameter. + # + # Required in the `SELECT` clause. + # @!attribute [rw] channel + # @return [::Google::Shopping::Type::Channel::ChannelEnum] + # Channel of the product. Can be `ONLINE` or `LOCAL`. + # @!attribute [rw] language_code + # @return [::String] + # Language code of the product in BCP 47 format. + # @!attribute [rw] feed_label + # @return [::String] + # Feed label of the product. + # @!attribute [rw] offer_id + # @return [::String] + # Merchant-provided id of the product. + # @!attribute [rw] title + # @return [::String] + # Title of the product. + # @!attribute [rw] brand + # @return [::String] + # Brand of the product. + # @!attribute [rw] category_l1 + # @return [::String] + # Product category (1st level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l2 + # @return [::String] + # Product category (2nd level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l3 + # @return [::String] + # Product category (3rd level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l4 + # @return [::String] + # Product category (4th level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l5 + # @return [::String] + # Product category (5th level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] product_type_l1 + # @return [::String] + # Product type (1st level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l2 + # @return [::String] + # Product type (2nd level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l3 + # @return [::String] + # Product type (3rd level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l4 + # @return [::String] + # Product type (4th level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l5 + # @return [::String] + # Product type (5th level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Product price. Absent if the information about the price of the product is + # not available. + # @!attribute [rw] condition + # @return [::String] + # [Condition](https://support.google.com/merchants/answer/6324469) of the + # product. + # @!attribute [rw] availability + # @return [::String] + # [Availability](https://support.google.com/merchants/answer/6324448) of the + # product. + # @!attribute [rw] shipping_label + # @return [::String] + # Normalized [shipping + # label](https://support.google.com/merchants/answer/6324504) specified in + # the data source. + # @!attribute [rw] gtin + # @return [::Array<::String>] + # List of Global Trade Item Numbers (GTINs) of the product. + # @!attribute [rw] item_group_id + # @return [::String] + # Item group id provided by the merchant for grouping variants together. + # @!attribute [rw] thumbnail_link + # @return [::String] + # Link to the processed image of the product, hosted on the Google + # infrastructure. + # @!attribute [rw] creation_time + # @return [::Google::Protobuf::Timestamp] + # The time the merchant created the product in timestamp seconds. + # @!attribute [rw] expiration_date + # @return [::Google::Type::Date] + # Expiration date for the product, specified on insertion. + # @!attribute [rw] aggregated_reporting_context_status + # @return [::Google::Shopping::Merchant::Reports::V1beta::ProductView::AggregatedReportingContextStatus] + # Aggregated status. + # @!attribute [rw] item_issues + # @return [::Array<::Google::Shopping::Merchant::Reports::V1beta::ProductView::ItemIssue>] + # List of item issues for the product. + # + # **This field cannot be used for sorting the results.** + # + # **Only selected attributes of this field (for example, + # `item_issues.severity.aggregated_severity`) can be used for filtering the + # results.** + # @!attribute [rw] click_potential + # @return [::Google::Shopping::Merchant::Reports::V1beta::ProductView::ClickPotential] + # Estimated performance potential compared to highest performing products of + # the merchant. + # @!attribute [rw] click_potential_rank + # @return [::Integer] + # Rank of the product based on its click potential. A product with + # `click_potential_rank` 1 has the highest click potential among the + # merchant's products that fulfill the search query conditions. + class ProductView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Item issue associated with the product. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::Reports::V1beta::ProductView::ItemIssue::ItemIssueType] + # Item issue type. + # @!attribute [rw] severity + # @return [::Google::Shopping::Merchant::Reports::V1beta::ProductView::ItemIssue::ItemIssueSeverity] + # Item issue severity. + # @!attribute [rw] resolution + # @return [::Google::Shopping::Merchant::Reports::V1beta::ProductView::ItemIssue::ItemIssueResolution] + # Item issue resolution. + class ItemIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Issue type. + # @!attribute [rw] code + # @return [::String] + # Error code of the issue, equivalent to the `code` of [Product + # issues](https://developers.google.com/shopping-content/guides/product-issues). + # @!attribute [rw] canonical_attribute + # @return [::String] + # Canonical attribute name for attribute-specific issues. + class ItemIssueType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # How the issue affects the serving of the product. + # @!attribute [rw] severity_per_reporting_context + # @return [::Array<::Google::Shopping::Merchant::Reports::V1beta::ProductView::ItemIssue::ItemIssueSeverity::IssueSeverityPerReportingContext>] + # Issue severity per reporting context. + # @!attribute [rw] aggregated_severity + # @return [::Google::Shopping::Merchant::Reports::V1beta::ProductView::ItemIssue::ItemIssueSeverity::AggregatedIssueSeverity] + # Aggregated severity of the issue for all reporting contexts it affects. + # + # **This field can be used for filtering the results.** + class ItemIssueSeverity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Issue severity per reporting context. + # @!attribute [rw] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # Reporting context the issue applies to. + # @!attribute [rw] disapproved_countries + # @return [::Array<::String>] + # List of disapproved countries in the reporting context, represented + # in ISO 3166 format. + # @!attribute [rw] demoted_countries + # @return [::Array<::String>] + # List of demoted countries in the reporting context, represented in + # ISO 3166 format. + class IssueSeverityPerReportingContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Issue severity aggregated for all reporting contexts. + module AggregatedIssueSeverity + # Not specified. + AGGREGATED_ISSUE_SEVERITY_UNSPECIFIED = 0 + + # Issue disapproves the product in at least one reporting context. + DISAPPROVED = 1 + + # Issue demotes the product in all reporting contexts it affects. + DEMOTED = 2 + + # Issue resolution is `PENDING_PROCESSING`. + PENDING = 3 + end + end + + # How to resolve the issue. + module ItemIssueResolution + # Not specified. + ITEM_ISSUE_RESOLUTION_UNSPECIFIED = 0 + + # The merchant has to fix the issue. + MERCHANT_ACTION = 1 + + # The issue will be resolved automatically (for example, image crawl) or + # through a Google review. No merchant action is required now. Resolution + # might lead to another issue (for example, if crawl fails). + PENDING_PROCESSING = 2 + end + end + + # Status of the product aggregated for all reporting contexts. + # + # Here's an example of how the aggregated status is computed: + # + # Free listings | Shopping ads | Status + # --------------|--------------|------------------------------ + # Approved | Approved | ELIGIBLE + # Approved | Pending | ELIGIBLE + # Approved | Disapproved | ELIGIBLE_LIMITED + # Pending | Pending | PENDING + # Disapproved | Disapproved | NOT_ELIGIBLE_OR_DISAPPROVED + module AggregatedReportingContextStatus + # Not specified. + AGGREGATED_REPORTING_CONTEXT_STATUS_UNSPECIFIED = 0 + + # Product is not eligible or is disapproved for all reporting contexts. + NOT_ELIGIBLE_OR_DISAPPROVED = 1 + + # Product's status is pending in all reporting contexts. + PENDING = 2 + + # Product is eligible for some (but not all) reporting contexts. + ELIGIBLE_LIMITED = 3 + + # Product is eligible for all reporting contexts. + ELIGIBLE = 4 + end + + # A product's [click + # potential](https://support.google.com/merchants/answer/188488) estimates + # its performance potential compared to highest performing products of the + # merchant. Click potential of a product helps merchants to prioritize which + # products to fix and helps them understand how products are performing + # against their potential. + module ClickPotential + # Unknown predicted clicks impact. + CLICK_POTENTIAL_UNSPECIFIED = 0 + + # Potential to receive a low number of clicks compared to the highest + # performing products of the merchant. + LOW = 1 + + # Potential to receive a moderate number of clicks compared to the highest + # performing products of the merchant. + MEDIUM = 2 + + # Potential to receive a similar number of clicks as the highest performing + # products of the merchant. + HIGH = 3 + end + end + + # Fields available for query in `price_competitiveness_product_view` table. + # + # [Price competitiveness](https://support.google.com/merchants/answer/9626903) + # report. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] report_country_code + # @return [::String] + # Country of the price benchmark. Represented in the ISO 3166 format. + # + # Required in the `SELECT` clause. + # @!attribute [rw] id + # @return [::String] + # REST ID of the product, in the form of + # `channel~languageCode~feedLabel~offerId`. Can be used to join data with the + # `product_view` table. + # + # Required in the `SELECT` clause. + # @!attribute [rw] offer_id + # @return [::String] + # Merchant-provided id of the product. + # @!attribute [rw] title + # @return [::String] + # Title of the product. + # @!attribute [rw] brand + # @return [::String] + # Brand of the product. + # @!attribute [rw] category_l1 + # @return [::String] + # Product category (1st level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l2 + # @return [::String] + # Product category (2nd level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l3 + # @return [::String] + # Product category (3rd level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l4 + # @return [::String] + # Product category (4th level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l5 + # @return [::String] + # Product category (5th level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] product_type_l1 + # @return [::String] + # Product type (1st level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l2 + # @return [::String] + # Product type (2nd level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l3 + # @return [::String] + # Product type (3rd level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l4 + # @return [::String] + # Product type (4th level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l5 + # @return [::String] + # Product type (5th level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Current price of the product. + # @!attribute [rw] benchmark_price + # @return [::Google::Shopping::Type::Price] + # Latest available price benchmark for the product's catalog in the benchmark + # country. + class PriceCompetitivenessProductView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `price_insights_product_view` table. + # + # [Price insights](https://support.google.com/merchants/answer/11916926) + # report. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] id + # @return [::String] + # REST ID of the product, in the form of + # `channel~languageCode~feedLabel~offerId`. Can be used to join data with the + # `product_view` table. + # + # Required in the `SELECT` clause. + # @!attribute [rw] offer_id + # @return [::String] + # Merchant-provided id of the product. + # @!attribute [rw] title + # @return [::String] + # Title of the product. + # @!attribute [rw] brand + # @return [::String] + # Brand of the product. + # @!attribute [rw] category_l1 + # @return [::String] + # Product category (1st level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l2 + # @return [::String] + # Product category (2nd level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l3 + # @return [::String] + # Product category (3rd level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l4 + # @return [::String] + # Product category (4th level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l5 + # @return [::String] + # Product category (5th level) in [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] product_type_l1 + # @return [::String] + # Product type (1st level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l2 + # @return [::String] + # Product type (2nd level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l3 + # @return [::String] + # Product type (3rd level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l4 + # @return [::String] + # Product type (4th level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] product_type_l5 + # @return [::String] + # Product type (5th level) in merchant's own [product + # taxonomy](https://support.google.com/merchants/answer/6324406). + # @!attribute [rw] price + # @return [::Google::Shopping::Type::Price] + # Current price of the product. + # @!attribute [rw] suggested_price + # @return [::Google::Shopping::Type::Price] + # Latest suggested price for the product. + # @!attribute [rw] predicted_impressions_change_fraction + # @return [::Float] + # Predicted change in impressions as a fraction after introducing the + # suggested price compared to current active price. For example, 0.05 is a 5% + # predicted increase in impressions. + # @!attribute [rw] predicted_clicks_change_fraction + # @return [::Float] + # Predicted change in clicks as a fraction after introducing the + # suggested price compared to current active price. For example, 0.05 is a 5% + # predicted increase in clicks. + # @!attribute [rw] predicted_conversions_change_fraction + # @return [::Float] + # Predicted change in conversions as a fraction after introducing the + # suggested price compared to current active price. For example, 0.05 is a 5% + # predicted increase in conversions). + # @!attribute [rw] effectiveness + # @return [::Google::Shopping::Merchant::Reports::V1beta::PriceInsightsProductView::Effectiveness] + # The predicted effectiveness of applying the price suggestion, bucketed. + class PriceInsightsProductView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Predicted effectiveness bucket. + # + # Effectiveness indicates which products would benefit most from price + # changes. This rating takes into consideration the performance boost + # predicted by adjusting the sale price and the difference between your + # current price and the suggested price. Price suggestions with `HIGH` + # effectiveness are predicted to drive the largest increase in performance. + module Effectiveness + # Effectiveness is unknown. + EFFECTIVENESS_UNSPECIFIED = 0 + + # Effectiveness is low. + LOW = 1 + + # Effectiveness is medium. + MEDIUM = 2 + + # Effectiveness is high. + HIGH = 3 + end + end + + # Fields available for query in `best_sellers_product_cluster_view` table. + # + # [Best sellers](https://support.google.com/merchants/answer/9488679) report + # with top product clusters. A product cluster is a grouping for different + # offers and variants that represent the same product, for example, Google + # Pixel 7. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] report_date + # @return [::Google::Type::Date] + # Report date. The value of this field can only be one of the following: + # + # * The first day of the week (Monday) for weekly reports, + # * The first day of the month for monthly reports. + # + # Required in the `SELECT` clause. If a `WHERE` condition on `report_date` is + # not specified in the query, the latest available weekly or monthly report + # is returned. + # @!attribute [rw] report_granularity + # @return [::Google::Shopping::Merchant::Reports::V1beta::ReportGranularity::ReportGranularityEnum] + # Granularity of the report. The ranking can be done over a week or a month + # timeframe. + # + # Required in the `SELECT` clause. Condition on `report_granularity` is + # required in the `WHERE` clause. + # @!attribute [rw] report_country_code + # @return [::String] + # Country where the ranking is calculated. Represented in the ISO 3166 + # format. + # + # Required in the `SELECT` clause. Condition on `report_country_code` is + # required in the `WHERE` clause. + # @!attribute [rw] report_category_id + # @return [::Integer] + # Google product category ID to calculate the ranking for, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # + # Required in the `SELECT` clause. If a `WHERE` condition on + # `report_category_id` is not specified in the query, rankings for all + # top-level categories are returned. + # @!attribute [rw] title + # @return [::String] + # Title of the product cluster. + # @!attribute [rw] brand + # @return [::String] + # Brand of the product cluster. + # @!attribute [rw] category_l1 + # @return [::String] + # Product category (1st level) of the product cluster, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l2 + # @return [::String] + # Product category (2nd level) of the product cluster, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l3 + # @return [::String] + # Product category (3rd level) of the product cluster, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l4 + # @return [::String] + # Product category (4th level) of the product cluster, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] category_l5 + # @return [::String] + # Product category (5th level) of the product cluster, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # @!attribute [rw] variant_gtins + # @return [::Array<::String>] + # GTINs of example variants of the product cluster. + # @!attribute [rw] inventory_status + # @return [::Google::Shopping::Merchant::Reports::V1beta::BestSellersProductClusterView::InventoryStatus] + # Whether the product cluster is `IN_STOCK` in your product data source in at + # least one of the countries, `OUT_OF_STOCK` in your product data source in + # all countries, or `NOT_IN_INVENTORY` at all. + # + # The field doesn't take the Best sellers report country filter into account. + # @!attribute [rw] brand_inventory_status + # @return [::Google::Shopping::Merchant::Reports::V1beta::BestSellersProductClusterView::InventoryStatus] + # Whether there is at least one product of the brand currently `IN_STOCK` in + # your product data source in at least one of the countries, all products are + # `OUT_OF_STOCK` in your product data source in all countries, or + # `NOT_IN_INVENTORY`. + # + # The field doesn't take the Best sellers report country filter into account. + # @!attribute [rw] rank + # @return [::Integer] + # Popularity of the product cluster on Ads and organic surfaces, in the + # selected category and country, based on the estimated number of units sold. + # @!attribute [rw] previous_rank + # @return [::Integer] + # Popularity rank in the previous week or month. + # @!attribute [rw] relative_demand + # @return [::Google::Shopping::Merchant::Reports::V1beta::RelativeDemand::RelativeDemandEnum] + # Estimated demand in relation to the product cluster with the highest + # popularity rank in the same category and country. + # @!attribute [rw] previous_relative_demand + # @return [::Google::Shopping::Merchant::Reports::V1beta::RelativeDemand::RelativeDemandEnum] + # Estimated demand in relation to the product cluster with the highest + # popularity rank in the same category and country in the previous week or + # month. + # @!attribute [rw] relative_demand_change + # @return [::Google::Shopping::Merchant::Reports::V1beta::RelativeDemandChangeType::RelativeDemandChangeTypeEnum] + # Change in the estimated demand. Whether it rose, sank or remained flat. + class BestSellersProductClusterView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Status of the product cluster or brand in your inventory. + module InventoryStatus + # Not specified. + INVENTORY_STATUS_UNSPECIFIED = 0 + + # You have a product for this product cluster or brand in stock. + IN_STOCK = 1 + + # You have a product for this product cluster or brand in inventory but it + # is currently out of stock. + OUT_OF_STOCK = 2 + + # You do not have a product for this product cluster or brand in inventory. + NOT_IN_INVENTORY = 3 + end + end + + # Fields available for query in `best_sellers_brand_view` table. + # + # [Best sellers](https://support.google.com/merchants/answer/9488679) report + # with top brands. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] report_date + # @return [::Google::Type::Date] + # Report date. The value of this field can only be one of the following: + # + # * The first day of the week (Monday) for weekly reports, + # * The first day of the month for monthly reports. + # + # Required in the `SELECT` clause. If a `WHERE` condition on `report_date` is + # not specified in the query, the latest available weekly or monthly report + # is returned. + # @!attribute [rw] report_granularity + # @return [::Google::Shopping::Merchant::Reports::V1beta::ReportGranularity::ReportGranularityEnum] + # Granularity of the report. The ranking can be done over a week or a month + # timeframe. + # + # Required in the `SELECT` clause. Condition on `report_granularity` is + # required in the `WHERE` clause. + # @!attribute [rw] report_country_code + # @return [::String] + # Country where the ranking is calculated. Represented in the ISO 3166 + # format. + # + # Required in the `SELECT` clause. Condition on `report_country_code` is + # required in the `WHERE` clause. + # @!attribute [rw] report_category_id + # @return [::Integer] + # Google product category ID to calculate the ranking for, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # + # Required in the `SELECT` clause. If a `WHERE` condition on + # `report_category_id` is not specified in the query, rankings for all + # top-level categories are returned. + # @!attribute [rw] brand + # @return [::String] + # Name of the brand. + # @!attribute [rw] rank + # @return [::Integer] + # Popularity of the brand on Ads and organic surfaces, in the selected + # category and country, based on the estimated number of units sold. + # @!attribute [rw] previous_rank + # @return [::Integer] + # Popularity rank in the previous week or month. + # @!attribute [rw] relative_demand + # @return [::Google::Shopping::Merchant::Reports::V1beta::RelativeDemand::RelativeDemandEnum] + # Estimated demand in relation to the brand with the highest popularity rank + # in the same category and country. + # @!attribute [rw] previous_relative_demand + # @return [::Google::Shopping::Merchant::Reports::V1beta::RelativeDemand::RelativeDemandEnum] + # Estimated demand in relation to the brand with the highest popularity rank + # in the same category and country in the previous week or month. + # @!attribute [rw] relative_demand_change + # @return [::Google::Shopping::Merchant::Reports::V1beta::RelativeDemandChangeType::RelativeDemandChangeTypeEnum] + # Change in the estimated demand. Whether it rose, sank or remained flat. + class BestSellersBrandView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `non_product_performance_view` table. + # + # Performance data on images and online store links leading to your non-product + # pages. This includes performance metrics (for example, `clicks`) + # and dimensions according to which performance metrics are segmented (for + # example, `date`). + # + # Segment fields cannot be selected in queries without also selecting at least + # one metric field. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] date + # @return [::Google::Type::Date] + # Date in the merchant timezone to which metrics apply. Segment. + # + # Condition on `date` is required in the `WHERE` clause. + # @!attribute [rw] week + # @return [::Google::Type::Date] + # First day of the week (Monday) of the metrics date in the merchant + # timezone. Segment. + # @!attribute [rw] clicks + # @return [::Integer] + # Number of clicks on images and online store links leading to your + # non-product pages. Metric. + # @!attribute [rw] impressions + # @return [::Integer] + # Number of times images and online store links leading to your non-product + # pages were shown. Metric. + # @!attribute [rw] click_through_rate + # @return [::Float] + # Click-through rate - the number of clicks (`clicks`) divided by the number + # of impressions (`impressions`) of images and online store links leading to + # your non-product pages. Metric. + class NonProductPerformanceView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `competitive_visibility_competitor_view` table. + # + # [Competitive + # visibility](https://support.google.com/merchants/answer/11366442) report with + # businesses with similar visibility. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] date + # @return [::Google::Type::Date] + # Date of this row. + # + # A condition on `date` is required in the `WHERE` clause. + # @!attribute [rw] domain + # @return [::String] + # Domain of your competitor or your domain, if 'is_your_domain' is true. + # + # Required in the `SELECT` clause. Cannot be filtered on in the 'WHERE' + # clause. + # @!attribute [rw] is_your_domain + # @return [::Boolean] + # True if this row contains data for your domain. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] report_country_code + # @return [::String] + # Country where impressions appeared. + # + # Required in the `SELECT` clause. A condition on `report_country_code` is + # required in the `WHERE` clause. + # @!attribute [rw] report_category_id + # @return [::Integer] + # Google product category ID to calculate the report for, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # + # Required in the `SELECT` clause. A condition on `report_category_id` is + # required in the `WHERE` clause. + # @!attribute [rw] traffic_source + # @return [::Google::Shopping::Merchant::Reports::V1beta::TrafficSource::TrafficSourceEnum] + # Traffic source of impressions. + # + # Required in the `SELECT` clause. + # @!attribute [rw] rank + # @return [::Integer] + # Position of the domain in the similar businesses ranking for the selected + # keys (`date`, `report_category_id`, `report_country_code`, + # `traffic_source`) based on impressions. 1 is the highest. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] ads_organic_ratio + # @return [::Float] + # [Ads / organic ratio] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Cads-free-ratio) + # shows how often the domain receives impressions from Shopping ads compared + # to organic traffic. The number is rounded and bucketed. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] page_overlap_rate + # @return [::Float] + # [Page overlap rate] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Cpage-overlap-rate) + # shows how frequently competing retailers’ offers are shown together with + # your offers on the same page. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] higher_position_rate + # @return [::Float] + # [Higher position rate] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Chigher-position-rate) + # shows how often a competitor’s offer got placed in a higher position on the + # page than your offer. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] relative_visibility + # @return [::Float] + # [Relative visibility] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Crelative-visibility) + # shows how often your competitors’ offers are shown compared to your offers. + # In other words, this is the number of displayed impressions of a competitor + # retailer divided by the number of your displayed impressions during a + # selected time range for a selected product category and country. + # + # Cannot be filtered on in the 'WHERE' clause. + class CompetitiveVisibilityCompetitorView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `competitive_visibility_top_merchant_view` + # table. + # + # [Competitive + # visibility](https://support.google.com/merchants/answer/11366442) report with + # business with highest visibility. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] date + # @return [::Google::Type::Date] + # Date of this row. + # + # Cannot be selected in the `SELECT` clause. A condition on `date` is + # required in the `WHERE` clause. + # @!attribute [rw] domain + # @return [::String] + # Domain of your competitor or your domain, if 'is_your_domain' is true. + # + # Required in the `SELECT` clause. Cannot be filtered on in the 'WHERE' + # clause. + # @!attribute [rw] is_your_domain + # @return [::Boolean] + # True if this row contains data for your domain. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] report_country_code + # @return [::String] + # Country where impressions appeared. + # + # Required in the `SELECT` clause. A condition on `report_country_code` is + # required in the `WHERE` clause. + # @!attribute [rw] report_category_id + # @return [::Integer] + # Google product category ID to calculate the report for, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # + # Required in the `SELECT` clause. A condition on `report_category_id` is + # required in the `WHERE` clause. + # @!attribute [rw] traffic_source + # @return [::Google::Shopping::Merchant::Reports::V1beta::TrafficSource::TrafficSourceEnum] + # Traffic source of impressions. + # + # Required in the `SELECT` clause. + # @!attribute [rw] rank + # @return [::Integer] + # Position of the domain in the top merchants ranking for the selected keys + # (`date`, `report_category_id`, `report_country_code`, `traffic_source`) + # based on impressions. 1 is the highest. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] ads_organic_ratio + # @return [::Float] + # [Ads / organic ratio] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Cads-free-ratio) + # shows how often the domain receives impressions from Shopping ads compared + # to organic traffic. The number is rounded and bucketed. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] page_overlap_rate + # @return [::Float] + # [Page overlap rate] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Cpage-overlap-rate) + # shows how frequently competing retailers’ offers are shown together with + # your offers on the same page. + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] higher_position_rate + # @return [::Float] + # [Higher position rate] + # (https://support.google.com/merchants/answer/11366442#zippy=%2Chigher-position-rate) + # shows how often a competitor’s offer got placed in a higher position on the + # page than your offer. + # + # Cannot be filtered on in the 'WHERE' clause. + class CompetitiveVisibilityTopMerchantView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields available for query in `competitive_visibility_benchmark_view` table. + # + # [Competitive + # visibility](https://support.google.com/merchants/answer/11366442) report with + # the category benchmark. + # + # Values are only set for fields requested explicitly in the request's search + # query. + # @!attribute [rw] date + # @return [::Google::Type::Date] + # Date of this row. + # + # Required in the `SELECT` clause. A condition on `date` is required in the + # `WHERE` clause. + # @!attribute [rw] report_country_code + # @return [::String] + # Country where impressions appeared. + # + # Required in the `SELECT` clause. A condition on `report_country_code` is + # required in the `WHERE` clause. + # @!attribute [rw] report_category_id + # @return [::Integer] + # Google product category ID to calculate the report for, represented in + # [Google's product + # taxonomy](https://support.google.com/merchants/answer/6324436). + # + # Required in the `SELECT` clause. A condition on `report_category_id` is + # required in the `WHERE` clause. + # @!attribute [rw] traffic_source + # @return [::Google::Shopping::Merchant::Reports::V1beta::TrafficSource::TrafficSourceEnum] + # Traffic source of impressions. + # + # Required in the `SELECT` clause. + # @!attribute [rw] your_domain_visibility_trend + # @return [::Float] + # Change in visibility based on impressions for your domain with respect to + # the start of the selected time range (or first day with non-zero + # impressions). + # + # Cannot be filtered on in the 'WHERE' clause. + # @!attribute [rw] category_benchmark_visibility_trend + # @return [::Float] + # Change in visibility based on impressions with respect to the start of the + # selected time range (or first day with non-zero impressions) for a + # combined set of merchants with highest visibility approximating the + # market. + # + # Cannot be filtered on in the 'WHERE' clause. + class CompetitiveVisibilityBenchmarkView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Marketing method used to promote your products on Google (organic versus + # ads). + class MarketingMethod + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Marketing method values. + module MarketingMethodEnum + # Not specified. + MARKETING_METHOD_ENUM_UNSPECIFIED = 0 + + # Organic marketing. + ORGANIC = 1 + + # Ads-based marketing. + ADS = 2 + end + end + + # Granularity of the Best sellers report. Best sellers reports are computed + # over a week and a month timeframe. + class ReportGranularity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Report granularity values. + module ReportGranularityEnum + # Not specified. + REPORT_GRANULARITY_ENUM_UNSPECIFIED = 0 + + # Report is computed over a week timeframe. + WEEKLY = 1 + + # Report is computed over a month timeframe. + MONTHLY = 2 + end + end + + # Relative demand of a product cluster or brand in the Best sellers report. + class RelativeDemand + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Relative demand values. + module RelativeDemandEnum + # Not specified. + RELATIVE_DEMAND_ENUM_UNSPECIFIED = 0 + + # Demand is 0-5% of the demand of the highest ranked product cluster or + # brand. + VERY_LOW = 10 + + # Demand is 6-10% of the demand of the highest ranked product cluster or + # brand. + LOW = 20 + + # Demand is 11-20% of the demand of the highest ranked product cluster or + # brand. + MEDIUM = 30 + + # Demand is 21-50% of the demand of the highest ranked product cluster or + # brand. + HIGH = 40 + + # Demand is 51-100% of the demand of the highest ranked product cluster or + # brand. + VERY_HIGH = 50 + end + end + + # Relative demand of a product cluster or brand in the Best sellers report + # compared to the previous time period. + class RelativeDemandChangeType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Relative demand change type values. + module RelativeDemandChangeTypeEnum + # Not specified. + RELATIVE_DEMAND_CHANGE_TYPE_ENUM_UNSPECIFIED = 0 + + # Relative demand is lower than the previous time period. + SINKER = 1 + + # Relative demand is equal to the previous time period. + FLAT = 2 + + # Relative demand is higher than the previous time period. + RISER = 3 + end + end + + # Traffic source of impressions in the Competitive visibility report. + class TrafficSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Traffic source values. + module TrafficSourceEnum + # Not specified. + TRAFFIC_SOURCE_ENUM_UNSPECIFIED = 0 + + # Organic traffic. + ORGANIC = 1 + + # Traffic from ads. + ADS = 2 + + # Organic and ads traffic. + ALL = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta/proto_docs/google/type/date.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..a52275cebf89 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/type/date.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module 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, with a zero year (for example, an anniversary). + # * A year on its own, with a zero month and a zero day. + # * A year and month, with a zero day (for example, a credit card expiration + # date). + # + # Related types: + # + # * [google.type.TimeOfDay][google.type.TimeOfDay] + # * [google.type.DateTime][google.type.DateTime] + # * {::Google::Protobuf::Timestamp 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-reports-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..0ebf60951004 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta", path: "../" +else + gem "google-shopping-merchant-reports-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-reports-v1beta/snippets/report_service/search.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/report_service/search.rb new file mode 100644 index 000000000000..1615fd5bbdd2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/report_service/search.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_ReportService_Search_sync] +require "google/shopping/merchant/reports/v1beta" + +## +# Snippet for the search call in the ReportService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Reports::V1beta::ReportService::Client#search. +# +def search + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Reports::V1beta::SearchRequest.new + + # Call the search method. + result = client.search request + + # The returned object is of type Gapic::PagedEnumerable. You can 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::Reports::V1beta::ReportRow. + p item + end +end +# [END merchantapi_v1beta_generated_ReportService_Search_sync] diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/snippet_metadata_google.shopping.merchant.reports.v1beta.json b/owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/snippet_metadata_google.shopping.merchant.reports.v1beta.json new file mode 100644 index 000000000000..d30b4debe46b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/snippet_metadata_google.shopping.merchant.reports.v1beta.json @@ -0,0 +1,55 @@ +{ + "client_library": { + "name": "google-shopping-merchant-reports-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.reports.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1beta_generated_ReportService_Search_sync", + "title": "Snippet for the search call in the ReportService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reports::V1beta::ReportService::Client#search.", + "file": "report_service/search.rb", + "language": "RUBY", + "client_method": { + "short_name": "search", + "full_name": "::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client#search", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Reports::V1beta::SearchRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Reports::V1beta::SearchResponse", + "client": { + "short_name": "ReportService::Client", + "full_name": "::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client" + }, + "method": { + "short_name": "Search", + "full_name": "google.shopping.merchant.reports.v1beta.ReportService.Search", + "service": { + "short_name": "ReportService", + "full_name": "google.shopping.merchant.reports.v1beta.ReportService" + } + } + }, + "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-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_rest_test.rb new file mode 100644 index 000000000000..ff77f66f0d41 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_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/reports/v1beta/reports_pb" +require "google/shopping/merchant/reports/v1beta/report_service/rest" + + +class ::Google::Shopping::Merchant::Reports::V1beta::ReportService::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_search + # Create test objects. + client_result = ::Google::Shopping::Merchant::Reports::V1beta::SearchResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + + search_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::ServiceStub.stub :transcode_search_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.search({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.search parent: parent, query: query, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.search ::Google::Shopping::Merchant::Reports::V1beta::SearchRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.search({ parent: parent, query: query, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.search(::Google::Shopping::Merchant::Reports::V1beta::SearchRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_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::Reports::V1beta::ReportService::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::Reports::V1beta::ReportService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_test.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_test.rb new file mode 100644 index 000000000000..7f566f792f0c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_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/reports/v1beta/reports_pb" +require "google/shopping/merchant/reports/v1beta/report_service" + +class ::Google::Shopping::Merchant::Reports::V1beta::ReportService::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_search + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Reports::V1beta::SearchResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + + search_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search, name + assert_kind_of ::Google::Shopping::Merchant::Reports::V1beta::SearchRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["query"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.search({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.search parent: parent, query: query, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.search ::Google::Shopping::Merchant::Reports::V1beta::SearchRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.search({ parent: parent, query: query, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.search(::Google::Shopping::Merchant::Reports::V1beta::SearchRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::Reports::V1beta::ReportService::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::Reports::V1beta::ReportService::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::Reports::V1beta::ReportService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +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-reviews-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.gitignore @@ -0,0 +1,20 @@ +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-reviews-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..6c6a221d183b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta", + "distribution_name": "google-shopping-merchant-reviews-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-reviews-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-reviews 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-reviews-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.rubocop.yml new file mode 100644 index 000000000000..c64b27708406 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-reviews-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-reviews-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.yardopts new file mode 100644 index 000000000000..3ddd15e0cf87 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..c9f59a83b49d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-reviews-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-reviews-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/reviews/v1beta" + +client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::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/reviews/v1beta" + +::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::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-reviews-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/reviews/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::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-reviews-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/Gemfile @@ -0,0 +1,15 @@ +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-reporters", "~> 1.8.0", require: false +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-reviews-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/README.md new file mode 100644 index 000000000000..946835efee1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-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-reviews](https://rubygems.org/gems/google-shopping-merchant-reviews). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-reviews-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/reviews/v1beta" + +client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new +request = ::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest.new # (request fields as keyword arguments...) +response = client.get_merchant_review request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-reviews-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/reviews/v1beta" +require "logger" + +client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::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.2+. + +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-reviews`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-reviews-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-reviews`. +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-reviews-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-reviews-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/Rakefile new file mode 100644 index 000000000000..5c1b99f6600f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-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/reviews/v1beta/merchant_reviews_service/credentials" + ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::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-reviews-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-reviews-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-reviews-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-reviews-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-reviews-v1beta" + header "google-shopping-merchant-reviews-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-reviews-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-reviews-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-reviews-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-reviews-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-reviews-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..d25158b3844a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/gapic_metadata.json @@ -0,0 +1,67 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.reviews.v1beta", + "libraryPackage": "::Google::Shopping::Merchant::Reviews::V1beta", + "services": { + "MerchantReviewsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client", + "rpcs": { + "GetMerchantReview": { + "methods": [ + "get_merchant_review" + ] + }, + "ListMerchantReviews": { + "methods": [ + "list_merchant_reviews" + ] + }, + "InsertMerchantReview": { + "methods": [ + "insert_merchant_review" + ] + }, + "DeleteMerchantReview": { + "methods": [ + "delete_merchant_review" + ] + } + } + } + } + }, + "ProductReviewsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client", + "rpcs": { + "GetProductReview": { + "methods": [ + "get_product_review" + ] + }, + "ListProductReviews": { + "methods": [ + "list_product_reviews" + ] + }, + "InsertProductReview": { + "methods": [ + "insert_product_review" + ] + }, + "DeleteProductReview": { + "methods": [ + "delete_product_review" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/google-shopping-merchant-reviews-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/google-shopping-merchant-reviews-v1beta.gemspec new file mode 100644 index 000000000000..7ef7a3cecb77 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/google-shopping-merchant-reviews-v1beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/reviews/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-reviews-v1beta" + gem.version = Google::Shopping::Merchant::Reviews::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-reviews-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-reviews 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.3" + 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-reviews-v1beta/lib/google-shopping-merchant-reviews-v1beta.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google-shopping-merchant-reviews-v1beta.rb new file mode 100644 index 000000000000..ca8a9748a650 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google-shopping-merchant-reviews-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/reviews/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta.rb new file mode 100644 index 000000000000..38eb44df819d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/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/reviews/v1beta/merchant_reviews_service" +require "google/shopping/merchant/reviews/v1beta/product_reviews_service" +require "google/shopping/merchant/reviews/v1beta/version" + +module Google + module Shopping + module Merchant + module Reviews + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/reviews/v1beta" + # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/reviews/v1beta" + # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/shopping/merchant/reviews/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service.rb new file mode 100644 index 000000000000..efe1e7c73e64 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_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/reviews/v1beta/version" + +require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/credentials" +require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/paths" +require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/client" +require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest" + +module Google + module Shopping + module Merchant + module Reviews + module V1beta + ## + # Service to manage merchant reviews. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service" + # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest" + # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new + # + module MerchantReviewsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "merchant_reviews_service", "helpers.rb" +require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/client.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/client.rb new file mode 100644 index 000000000000..379d7601a5f2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_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/reviews/v1beta/merchantreviews_pb" + +module Google + module Shopping + module Merchant + module Reviews + module V1beta + module MerchantReviewsService + ## + # Client for the MerchantReviewsService service. + # + # Service to manage merchant reviews. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :merchant_reviews_service_stub + + ## + # Configure the MerchantReviewsService Client class. + # + # See {::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all MerchantReviewsService clients + # ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.configure do |config| + # config.timeout = 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", "Reviews", "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 MerchantReviewsService Client instance. + # + # The configuration is set to the derived mode, meaning that values 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::Reviews::V1beta::MerchantReviewsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @merchant_reviews_service_stub.universe_domain + end + + ## + # Create a new MerchantReviewsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the MerchantReviewsService 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/reviews/v1beta/merchantreviews_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 + + @merchant_reviews_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @merchant_reviews_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 + @merchant_reviews_service_stub.logger + end + + # Service calls + + ## + # Gets a merchant review. + # + # @overload get_merchant_review(request, options = nil) + # Pass arguments to `get_merchant_review` via a request object, either of type + # {::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_merchant_review(name: nil) + # Pass arguments to `get_merchant_review` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The ID of the merchant review. + # Format: accounts/\\{account}/merchantReviews/\\{merchantReview} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/reviews/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest.new + # + # # Call the get_merchant_review method. + # result = client.get_merchant_review request + # + # # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::MerchantReview. + # p result + # + def get_merchant_review request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_merchant_review.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Reviews::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_merchant_review.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_merchant_review.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @merchant_reviews_service_stub.call_rpc :get_merchant_review, request, 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 merchant reviews. + # + # @overload list_merchant_reviews(request, options = nil) + # Pass arguments to `list_merchant_reviews` via a request object, either of type + # {::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_merchant_reviews(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_merchant_reviews` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 merchant reviews for. + # Format: accounts/\\{account} + # @param page_size [::Integer] + # Optional. The maximum number of merchant reviews to return. The service can + # return fewer than this value. The maximum value is 1000; values above 1000 + # are coerced to 1000. If unspecified, the maximum number of reviews is + # returned. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListMerchantReviews` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMerchantReviews` + # 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::Reviews::V1beta::MerchantReview>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/reviews/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest.new + # + # # Call the list_merchant_reviews method. + # result = client.list_merchant_reviews request + # + # # The returned object is of type Gapic::PagedEnumerable. You can 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::Reviews::V1beta::MerchantReview. + # p item + # end + # + def list_merchant_reviews request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_merchant_reviews.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Reviews::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_merchant_reviews.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_merchant_reviews.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @merchant_reviews_service_stub.call_rpc :list_merchant_reviews, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @merchant_reviews_service_stub, :list_merchant_reviews, request, response, 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 review for your Merchant Center account. If the review + # already exists, then the review is replaced with the new instance. + # + # @overload insert_merchant_review(request, options = nil) + # Pass arguments to `insert_merchant_review` via a request object, either of type + # {::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_merchant_review(parent: nil, merchant_review: nil, data_source: nil) + # Pass arguments to `insert_merchant_review` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 the merchant review will be inserted. + # Format: accounts/\\{account} + # @param merchant_review [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview, ::Hash] + # Required. The merchant review to insert. + # @param data_source [::String] + # Required. The data source of the + # [merchantreview](https://support.google.com/merchants/answer/7045996?sjid=5253581244217581976-EU) + # Format: + # `accounts/{account}/dataSources/{datasource}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/reviews/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest.new + # + # # Call the insert_merchant_review method. + # result = client.insert_merchant_review request + # + # # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::MerchantReview. + # p result + # + def insert_merchant_review request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest + + # Converts hash and nil to 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_merchant_review.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Reviews::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_merchant_review.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_merchant_review.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @merchant_reviews_service_stub.call_rpc :insert_merchant_review, request, 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 merchant review. + # + # @overload delete_merchant_review(request, options = nil) + # Pass arguments to `delete_merchant_review` via a request object, either of type + # {::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_merchant_review(name: nil) + # Pass arguments to `delete_merchant_review` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The ID of the merchant review. + # Format: accounts/\\{account}/merchantReviews/\\{merchantReview} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::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/reviews/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest.new + # + # # Call the delete_merchant_review method. + # result = client.delete_merchant_review request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_merchant_review request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_merchant_review.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Reviews::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_merchant_review.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_merchant_review.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @merchant_reviews_service_stub.call_rpc :delete_merchant_review, request, 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 MerchantReviewsService API. + # + # This class represents the configuration for MerchantReviewsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_merchant_review to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_merchant_review.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_merchant_review.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::Reviews::V1beta::MerchantReviewsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the MerchantReviewsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_merchant_review` + # @return [::Gapic::Config::Method] + # + attr_reader :get_merchant_review + ## + # RPC-specific configuration for `list_merchant_reviews` + # @return [::Gapic::Config::Method] + # + attr_reader :list_merchant_reviews + ## + # RPC-specific configuration for `insert_merchant_review` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_merchant_review + ## + # RPC-specific configuration for `delete_merchant_review` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_merchant_review + + # @private + def initialize parent_rpcs = nil + get_merchant_review_config = parent_rpcs.get_merchant_review if parent_rpcs.respond_to? :get_merchant_review + @get_merchant_review = ::Gapic::Config::Method.new get_merchant_review_config + list_merchant_reviews_config = parent_rpcs.list_merchant_reviews if parent_rpcs.respond_to? :list_merchant_reviews + @list_merchant_reviews = ::Gapic::Config::Method.new list_merchant_reviews_config + insert_merchant_review_config = parent_rpcs.insert_merchant_review if parent_rpcs.respond_to? :insert_merchant_review + @insert_merchant_review = ::Gapic::Config::Method.new insert_merchant_review_config + delete_merchant_review_config = parent_rpcs.delete_merchant_review if parent_rpcs.respond_to? :delete_merchant_review + @delete_merchant_review = ::Gapic::Config::Method.new delete_merchant_review_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-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/credentials.rb new file mode 100644 index 000000000000..c277eb07bc1a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_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 Reviews + module V1beta + module MerchantReviewsService + # Credentials for the MerchantReviewsService 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-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/paths.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/paths.rb new file mode 100644 index 000000000000..c9dd533a8f41 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_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 Reviews + module V1beta + module MerchantReviewsService + # Path helper methods for the MerchantReviewsService 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 MerchantReview resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/merchantReviews/{name}` + # + # @param account [String] + # @param name [String] + # + # @return [::String] + def merchant_review_path account:, name: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/merchantReviews/#{name}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest.rb new file mode 100644 index 000000000000..baa41dc04a30 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_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/reviews/v1beta/version" + +require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/credentials" +require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/paths" +require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/client" + +module Google + module Shopping + module Merchant + module Reviews + module V1beta + ## + # Service to manage merchant reviews. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest" + # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new + # + module MerchantReviewsService + # 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/reviews/v1beta/merchant_reviews_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/client.rb new file mode 100644 index 000000000000..342d19d3e30b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_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/reviews/v1beta/merchantreviews_pb" +require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Reviews + module V1beta + module MerchantReviewsService + module Rest + ## + # REST client for the MerchantReviewsService service. + # + # Service to manage merchant reviews. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :merchant_reviews_service_stub + + ## + # Configure the MerchantReviewsService Client class. + # + # See {::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all MerchantReviewsService clients + # ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::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", "Reviews", "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 MerchantReviewsService Client instance. + # + # The configuration is set to the derived mode, meaning that values 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::Reviews::V1beta::MerchantReviewsService::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 + @merchant_reviews_service_stub.universe_domain + end + + ## + # Create a new MerchantReviewsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the MerchantReviewsService 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 + + @merchant_reviews_service_stub = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @merchant_reviews_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 + @merchant_reviews_service_stub.logger + end + + # Service calls + + ## + # Gets a merchant review. + # + # @overload get_merchant_review(request, options = nil) + # Pass arguments to `get_merchant_review` via a request object, either of type + # {::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_merchant_review(name: nil) + # Pass arguments to `get_merchant_review` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The ID of the merchant review. + # Format: accounts/\\{account}/merchantReviews/\\{merchantReview} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/reviews/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest.new + # + # # Call the get_merchant_review method. + # result = client.get_merchant_review request + # + # # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::MerchantReview. + # p result + # + def get_merchant_review request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_merchant_review.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Reviews::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_merchant_review.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_merchant_review.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @merchant_reviews_service_stub.get_merchant_review request, 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 merchant reviews. + # + # @overload list_merchant_reviews(request, options = nil) + # Pass arguments to `list_merchant_reviews` via a request object, either of type + # {::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_merchant_reviews(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_merchant_reviews` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 merchant reviews for. + # Format: accounts/\\{account} + # @param page_size [::Integer] + # Optional. The maximum number of merchant reviews to return. The service can + # return fewer than this value. The maximum value is 1000; values above 1000 + # are coerced to 1000. If unspecified, the maximum number of reviews is + # returned. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListMerchantReviews` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMerchantReviews` + # 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::Reviews::V1beta::MerchantReview>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/reviews/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest.new + # + # # Call the list_merchant_reviews method. + # result = client.list_merchant_reviews request + # + # # The returned object is of type Gapic::PagedEnumerable. You can 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::Reviews::V1beta::MerchantReview. + # p item + # end + # + def list_merchant_reviews request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_merchant_reviews.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Reviews::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_merchant_reviews.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_merchant_reviews.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @merchant_reviews_service_stub.list_merchant_reviews request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @merchant_reviews_service_stub, :list_merchant_reviews, "merchant_reviews", request, result, 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 review for your Merchant Center account. If the review + # already exists, then the review is replaced with the new instance. + # + # @overload insert_merchant_review(request, options = nil) + # Pass arguments to `insert_merchant_review` via a request object, either of type + # {::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_merchant_review(parent: nil, merchant_review: nil, data_source: nil) + # Pass arguments to `insert_merchant_review` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 the merchant review will be inserted. + # Format: accounts/\\{account} + # @param merchant_review [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview, ::Hash] + # Required. The merchant review to insert. + # @param data_source [::String] + # Required. The data source of the + # [merchantreview](https://support.google.com/merchants/answer/7045996?sjid=5253581244217581976-EU) + # Format: + # `accounts/{account}/dataSources/{datasource}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/reviews/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest.new + # + # # Call the insert_merchant_review method. + # result = client.insert_merchant_review request + # + # # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::MerchantReview. + # p result + # + def insert_merchant_review request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest + + # Converts hash and nil to an 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_merchant_review.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Reviews::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_merchant_review.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_merchant_review.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @merchant_reviews_service_stub.insert_merchant_review request, 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 merchant review. + # + # @overload delete_merchant_review(request, options = nil) + # Pass arguments to `delete_merchant_review` via a request object, either of type + # {::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_merchant_review(name: nil) + # Pass arguments to `delete_merchant_review` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The ID of the merchant review. + # Format: accounts/\\{account}/merchantReviews/\\{merchantReview} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @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/reviews/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest.new + # + # # Call the delete_merchant_review method. + # result = client.delete_merchant_review request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_merchant_review request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_merchant_review.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Reviews::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_merchant_review.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_merchant_review.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @merchant_reviews_service_stub.delete_merchant_review request, 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 MerchantReviewsService REST API. + # + # This class represents the configuration for MerchantReviewsService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_merchant_review to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_merchant_review.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_merchant_review.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the MerchantReviewsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_merchant_review` + # @return [::Gapic::Config::Method] + # + attr_reader :get_merchant_review + ## + # RPC-specific configuration for `list_merchant_reviews` + # @return [::Gapic::Config::Method] + # + attr_reader :list_merchant_reviews + ## + # RPC-specific configuration for `insert_merchant_review` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_merchant_review + ## + # RPC-specific configuration for `delete_merchant_review` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_merchant_review + + # @private + def initialize parent_rpcs = nil + get_merchant_review_config = parent_rpcs.get_merchant_review if parent_rpcs.respond_to? :get_merchant_review + @get_merchant_review = ::Gapic::Config::Method.new get_merchant_review_config + list_merchant_reviews_config = parent_rpcs.list_merchant_reviews if parent_rpcs.respond_to? :list_merchant_reviews + @list_merchant_reviews = ::Gapic::Config::Method.new list_merchant_reviews_config + insert_merchant_review_config = parent_rpcs.insert_merchant_review if parent_rpcs.respond_to? :insert_merchant_review + @insert_merchant_review = ::Gapic::Config::Method.new insert_merchant_review_config + delete_merchant_review_config = parent_rpcs.delete_merchant_review if parent_rpcs.respond_to? :delete_merchant_review + @delete_merchant_review = ::Gapic::Config::Method.new delete_merchant_review_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-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/service_stub.rb new file mode 100644 index 000000000000..deaba97f1960 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_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/reviews/v1beta/merchantreviews_pb" + +module Google + module Shopping + module Merchant + module Reviews + module V1beta + module MerchantReviewsService + module Rest + ## + # REST service stub for the MerchantReviewsService 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_merchant_review REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] + # A result object deserialized from the server's reply + def get_merchant_review request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_merchant_review_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_merchant_review", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_merchant_reviews REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsResponse] + # A result object deserialized from the server's reply + def list_merchant_reviews request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_merchant_reviews_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_merchant_reviews", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsResponse.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_merchant_review REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] + # A result object deserialized from the server's reply + def insert_merchant_review request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_merchant_review_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_merchant_review", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_merchant_review REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_merchant_review request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_merchant_review_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_merchant_review", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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_merchant_review REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_merchant_review_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/reviews/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/merchantReviews/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_merchant_reviews REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_merchant_reviews_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/reviews/v1beta/{parent}/merchantReviews", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the insert_merchant_review REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest] + # 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_merchant_review_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/reviews/v1beta/{parent}/merchantReviews:insert", + body: "merchant_review", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_merchant_review REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_merchant_review_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/reviews/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/merchantReviews/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_common_pb.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_common_pb.rb new file mode 100644 index 000000000000..20cb7dc784db --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_common_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/reviews/v1beta/merchantreviews_common.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\nDgoogle/shopping/merchant/reviews/v1beta/merchantreviews_common.proto\x12\'google.shopping.merchant.reviews.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xa5\x08\n\x18MerchantReviewAttributes\x12\x1d\n\x0bmerchant_id\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\'\n\x15merchant_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1f\n\rmerchant_link\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12&\n\x14merchant_rating_link\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x1c\n\nmin_rating\x18\x05 \x01(\x03\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1c\n\nmax_rating\x18\x06 \x01(\x03\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x18\n\x06rating\x18\x07 \x01(\x01\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x17\n\x05title\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x19\n\x07\x63ontent\x18\t \x01(\tB\x03\xe0\x41\x02H\x08\x88\x01\x01\x12\x1d\n\x0breviewer_id\x18\n \x01(\tB\x03\xe0\x41\x01H\t\x88\x01\x01\x12#\n\x11reviewer_username\x18\x0b \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x1e\n\x0cis_anonymous\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12w\n\x11\x63ollection_method\x18\r \x01(\x0e\x32R.google.shopping.merchant.reviews.v1beta.MerchantReviewAttributes.CollectionMethodB\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12\x39\n\x0breview_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02H\r\x88\x01\x01\x12!\n\x0freview_language\x18\x0f \x01(\tB\x03\xe0\x41\x01H\x0e\x88\x01\x01\x12 \n\x0ereview_country\x18\x10 \x01(\tB\x03\xe0\x41\x01H\x0f\x88\x01\x01\"y\n\x10\x43ollectionMethod\x12!\n\x1d\x43OLLECTION_METHOD_UNSPECIFIED\x10\x00\x12\x18\n\x14MERCHANT_UNSOLICITED\x10\x01\x12\x11\n\rPOINT_OF_SALE\x10\x02\x12\x15\n\x11\x41\x46TER_FULFILLMENT\x10\x03\x42\x0e\n\x0c_merchant_idB\x18\n\x16_merchant_display_nameB\x10\n\x0e_merchant_linkB\x17\n\x15_merchant_rating_linkB\r\n\x0b_min_ratingB\r\n\x0b_max_ratingB\t\n\x07_ratingB\x08\n\x06_titleB\n\n\x08_contentB\x0e\n\x0c_reviewer_idB\x14\n\x12_reviewer_usernameB\x0f\n\r_is_anonymousB\x14\n\x12_collection_methodB\x0e\n\x0c_review_timeB\x12\n\x10_review_languageB\x11\n\x0f_review_country\"\xd8\x07\n\x14MerchantReviewStatus\x12\x80\x01\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32].google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewDestinationStatusB\x03\xe0\x41\x03\x12z\n\x11item_level_issues\x18\x04 \x03(\x0b\x32Z.google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewItemLevelIssueB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_update_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a~\n\x1fMerchantReviewDestinationStatus\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x1a\xcf\x03\n\x1cMerchantReviewItemLevelIssue\x12\x11\n\x04\x63ode\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12z\n\x08severity\x18\x02 \x01(\x0e\x32\x63.google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewItemLevelIssue.SeverityB\x03\xe0\x41\x03\x12\x17\n\nresolution\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tattribute\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12[\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rdocumentation\x18\x08 \x01(\tB\x03\xe0\x41\x03\"G\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_IMPACTED\x10\x01\x12\x0f\n\x0b\x44ISAPPROVED\x10\x02\x42\x9a\x02\n+com.google.shopping.merchant.reviews.v1betaB\x1aMerchantReviewsCommonProtoP\x01ZKcloud.google.com/go/shopping/merchant/reviews/apiv1beta/reviewspb;reviewspb\xaa\x02\'Google.Shopping.Merchant.Reviews.V1Beta\xca\x02\'Google\\Shopping\\Merchant\\Reviews\\V1beta\xea\x02+Google::Shopping::Merchant::Reviews::V1betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Reviews + module V1beta + MerchantReviewAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReviewAttributes").msgclass + MerchantReviewAttributes::CollectionMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReviewAttributes.CollectionMethod").enummodule + MerchantReviewStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReviewStatus").msgclass + MerchantReviewStatus::MerchantReviewDestinationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewDestinationStatus").msgclass + MerchantReviewStatus::MerchantReviewItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewItemLevelIssue").msgclass + MerchantReviewStatus::MerchantReviewItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewItemLevelIssue.Severity").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_pb.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_pb.rb new file mode 100644 index 000000000000..5828c3308e80 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/reviews/v1beta/merchantreviews.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/reviews/v1beta/merchantreviews_common_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n=google/shopping/merchant/reviews/v1beta/merchantreviews.proto\x12\'google.shopping.merchant.reviews.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\x44google/shopping/merchant/reviews/v1beta/merchantreviews_common.proto\x1a google/shopping/type/types.proto\"[\n\x18GetMerchantReviewRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/MerchantReview\"^\n\x1b\x44\x65leteMerchantReviewRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/MerchantReview\"\x90\x01\n\x1aListMerchantReviewsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)merchantapi.googleapis.com/MerchantReview\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\"\xa3\x01\n\x1bInsertMerchantReviewRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12U\n\x0fmerchant_review\x18\x02 \x01(\x0b\x32\x37.google.shopping.merchant.reviews.v1beta.MerchantReviewB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x89\x01\n\x1bListMerchantReviewsResponse\x12Q\n\x10merchant_reviews\x18\x01 \x03(\x0b\x32\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xf1\x03\n\x0eMerchantReview\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1f\n\x12merchant_review_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12j\n\x1amerchant_review_attributes\x18\x03 \x01(\x0b\x32\x41.google.shopping.merchant.reviews.v1beta.MerchantReviewAttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\x04 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x61ta_source\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x62\n\x16merchant_review_status\x18\x06 \x01(\x0b\x32=.google.shopping.merchant.reviews.v1beta.MerchantReviewStatusB\x03\xe0\x41\x03:z\xea\x41w\n)merchantapi.googleapis.com/MerchantReview\x12)accounts/{account}/merchantReviews/{name}*\x0fmerchantReviews2\x0emerchantReview2\xc8\x07\n\x16MerchantReviewsService\x12\xd3\x01\n\x11GetMerchantReview\x12\x41.google.shopping.merchant.reviews.v1beta.GetMerchantReviewRequest\x1a\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/reviews/v1beta/{name=accounts/*/merchantReviews/*}\x12\xe6\x01\n\x13ListMerchantReviews\x12\x43.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsRequest\x1a\x44.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/reviews/v1beta/{parent=accounts/*}/merchantReviews\x12\xea\x01\n\x14InsertMerchantReview\x12\x44.google.shopping.merchant.reviews.v1beta.InsertMerchantReviewRequest\x1a\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\"S\x82\xd3\xe4\x93\x02M\":/reviews/v1beta/{parent=accounts/*}/merchantReviews:insert:\x0fmerchant_review\x12\xb8\x01\n\x14\x44\x65leteMerchantReview\x12\x44.google.shopping.merchant.reviews.v1beta.DeleteMerchantReviewRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/reviews/v1beta/{name=accounts/*/merchantReviews/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xcf\x02\n+com.google.shopping.merchant.reviews.v1betaB\x14MerchantReviewsProtoP\x01ZKcloud.google.com/go/shopping/merchant/reviews/apiv1beta/reviewspb;reviewspb\xaa\x02\'Google.Shopping.Merchant.Reviews.V1Beta\xca\x02\'Google\\Shopping\\Merchant\\Reviews\\V1beta\xea\x02+Google::Shopping::Merchant::Reviews::V1beta\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 Reviews + module V1beta + GetMerchantReviewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.GetMerchantReviewRequest").msgclass + DeleteMerchantReviewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.DeleteMerchantReviewRequest").msgclass + ListMerchantReviewsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ListMerchantReviewsRequest").msgclass + InsertMerchantReviewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.InsertMerchantReviewRequest").msgclass + ListMerchantReviewsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ListMerchantReviewsResponse").msgclass + MerchantReview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReview").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_services_pb.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_services_pb.rb new file mode 100644 index 000000000000..30579619d852 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_services_pb.rb @@ -0,0 +1,54 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/reviews/v1beta/merchantreviews.proto for package 'Google.Shopping.Merchant.Reviews.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/reviews/v1beta/merchantreviews_pb' + +module Google + module Shopping + module Merchant + module Reviews + module V1beta + module MerchantReviewsService + # Service to manage merchant reviews. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.reviews.v1beta.MerchantReviewsService' + + # Gets a merchant review. + rpc :GetMerchantReview, ::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest, ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview + # Lists merchant reviews. + rpc :ListMerchantReviews, ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest, ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsResponse + # Inserts a review for your Merchant Center account. If the review + # already exists, then the review is replaced with the new instance. + rpc :InsertMerchantReview, ::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest, ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview + # Deletes merchant review. + rpc :DeleteMerchantReview, ::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service.rb new file mode 100644 index 000000000000..6f1a62d59ed3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_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/reviews/v1beta/version" + +require "google/shopping/merchant/reviews/v1beta/product_reviews_service/credentials" +require "google/shopping/merchant/reviews/v1beta/product_reviews_service/paths" +require "google/shopping/merchant/reviews/v1beta/product_reviews_service/client" +require "google/shopping/merchant/reviews/v1beta/product_reviews_service/rest" + +module Google + module Shopping + module Merchant + module Reviews + module V1beta + ## + # Service to manage product reviews. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/reviews/v1beta/product_reviews_service" + # client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/reviews/v1beta/product_reviews_service/rest" + # client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new + # + module ProductReviewsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "product_reviews_service", "helpers.rb" +require "google/shopping/merchant/reviews/v1beta/product_reviews_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/client.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/client.rb new file mode 100644 index 000000000000..ad77c4e2b829 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_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/merchant/reviews/v1beta/productreviews_pb" + +module Google + module Shopping + module Merchant + module Reviews + module V1beta + module ProductReviewsService + ## + # Client for the ProductReviewsService service. + # + # Service to manage product reviews. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :product_reviews_service_stub + + ## + # Configure the ProductReviewsService Client class. + # + # See {::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProductReviewsService clients + # ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.configure do |config| + # config.timeout = 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", "Reviews", "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 ProductReviewsService Client instance. + # + # The configuration is set to the derived mode, meaning that values 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::Reviews::V1beta::ProductReviewsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @product_reviews_service_stub.universe_domain + end + + ## + # Create a new ProductReviewsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProductReviewsService 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/reviews/v1beta/productreviews_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 + + @product_reviews_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @product_reviews_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 + @product_reviews_service_stub.logger + end + + # Service calls + + ## + # Gets a product review. + # + # @overload get_product_review(request, options = nil) + # Pass arguments to `get_product_review` via a request object, either of type + # {::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_product_review(name: nil) + # Pass arguments to `get_product_review` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The ID of the merchant review. + # Format: accounts/\\{account}/productReviews/\\{productReview} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/reviews/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest.new + # + # # Call the get_product_review method. + # result = client.get_product_review request + # + # # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::ProductReview. + # p result + # + def get_product_review request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_product_review.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Reviews::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_product_review.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_product_review.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_reviews_service_stub.call_rpc :get_product_review, request, 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 product reviews. + # + # @overload list_product_reviews(request, options = nil) + # Pass arguments to `list_product_reviews` via a request object, either of type + # {::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_product_reviews(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_product_reviews` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 product reviews for. + # Format: accounts/\\{account} + # @param page_size [::Integer] + # Optional. The maximum number of products to return. The service may return + # fewer than this value. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListProductReviews` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListProductReviews` + # 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::Reviews::V1beta::ProductReview>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Reviews::V1beta::ProductReview>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/reviews/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest.new + # + # # Call the list_product_reviews method. + # result = client.list_product_reviews request + # + # # The returned object is of type Gapic::PagedEnumerable. You can 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::Reviews::V1beta::ProductReview. + # p item + # end + # + def list_product_reviews request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_product_reviews.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Reviews::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_product_reviews.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_product_reviews.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_reviews_service_stub.call_rpc :list_product_reviews, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @product_reviews_service_stub, :list_product_reviews, request, response, 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 product review. + # + # @overload insert_product_review(request, options = nil) + # Pass arguments to `insert_product_review` via a request object, either of type + # {::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_product_review(parent: nil, product_review: nil, data_source: nil) + # Pass arguments to `insert_product_review` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 the product review will be inserted. + # Format: accounts/\\{account} + # @param product_review [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview, ::Hash] + # Required. The product review to insert. + # @param data_source [::String] + # Required. Format: + # `accounts/{account}/dataSources/{datasource}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/reviews/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest.new + # + # # Call the insert_product_review method. + # result = client.insert_product_review request + # + # # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::ProductReview. + # p result + # + def insert_product_review request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest + + # Converts hash and nil to 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_product_review.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Reviews::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_product_review.timeout, + metadata: metadata, + retry_policy: @config.rpcs.insert_product_review.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_reviews_service_stub.call_rpc :insert_product_review, request, 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 product review. + # + # @overload delete_product_review(request, options = nil) + # Pass arguments to `delete_product_review` via a request object, either of type + # {::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_product_review(name: nil) + # Pass arguments to `delete_product_review` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The ID of the Product review. + # Format: accounts/\\{account}/productReviews/\\{productReview} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::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/reviews/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest.new + # + # # Call the delete_product_review method. + # result = client.delete_product_review request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_product_review request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_product_review.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Reviews::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_product_review.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_product_review.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_reviews_service_stub.call_rpc :delete_product_review, request, 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 ProductReviewsService API. + # + # This class represents the configuration for ProductReviewsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_product_review to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_product_review.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_product_review.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::Reviews::V1beta::ProductReviewsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ProductReviewsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_product_review` + # @return [::Gapic::Config::Method] + # + attr_reader :get_product_review + ## + # RPC-specific configuration for `list_product_reviews` + # @return [::Gapic::Config::Method] + # + attr_reader :list_product_reviews + ## + # RPC-specific configuration for `insert_product_review` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_product_review + ## + # RPC-specific configuration for `delete_product_review` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_product_review + + # @private + def initialize parent_rpcs = nil + get_product_review_config = parent_rpcs.get_product_review if parent_rpcs.respond_to? :get_product_review + @get_product_review = ::Gapic::Config::Method.new get_product_review_config + list_product_reviews_config = parent_rpcs.list_product_reviews if parent_rpcs.respond_to? :list_product_reviews + @list_product_reviews = ::Gapic::Config::Method.new list_product_reviews_config + insert_product_review_config = parent_rpcs.insert_product_review if parent_rpcs.respond_to? :insert_product_review + @insert_product_review = ::Gapic::Config::Method.new insert_product_review_config + delete_product_review_config = parent_rpcs.delete_product_review if parent_rpcs.respond_to? :delete_product_review + @delete_product_review = ::Gapic::Config::Method.new delete_product_review_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-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/credentials.rb new file mode 100644 index 000000000000..231c7c4249c4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_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 Reviews + module V1beta + module ProductReviewsService + # Credentials for the ProductReviewsService 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-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/paths.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/paths.rb new file mode 100644 index 000000000000..98e8ac0fe1e8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_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 Reviews + module V1beta + module ProductReviewsService + # Path helper methods for the ProductReviewsService 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 ProductReview resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/productReviews/{productreview}` + # + # @param account [String] + # @param productreview [String] + # + # @return [::String] + def product_review_path account:, productreview: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/productReviews/#{productreview}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest.rb new file mode 100644 index 000000000000..a767cf6fe81a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_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/reviews/v1beta/version" + +require "google/shopping/merchant/reviews/v1beta/product_reviews_service/credentials" +require "google/shopping/merchant/reviews/v1beta/product_reviews_service/paths" +require "google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/client" + +module Google + module Shopping + module Merchant + module Reviews + module V1beta + ## + # Service to manage product reviews. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/reviews/v1beta/product_reviews_service/rest" + # client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new + # + module ProductReviewsService + # 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/reviews/v1beta/product_reviews_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/client.rb new file mode 100644 index 000000000000..17e4811cb802 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_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/merchant/reviews/v1beta/productreviews_pb" +require "google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Reviews + module V1beta + module ProductReviewsService + module Rest + ## + # REST client for the ProductReviewsService service. + # + # Service to manage product reviews. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :product_reviews_service_stub + + ## + # Configure the ProductReviewsService Client class. + # + # See {::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProductReviewsService clients + # ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::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", "Reviews", "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 ProductReviewsService Client instance. + # + # The configuration is set to the derived mode, meaning that values 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::Reviews::V1beta::ProductReviewsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @product_reviews_service_stub.universe_domain + end + + ## + # Create a new ProductReviewsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProductReviewsService 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 + + @product_reviews_service_stub = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @product_reviews_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 + @product_reviews_service_stub.logger + end + + # Service calls + + ## + # Gets a product review. + # + # @overload get_product_review(request, options = nil) + # Pass arguments to `get_product_review` via a request object, either of type + # {::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_product_review(name: nil) + # Pass arguments to `get_product_review` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The ID of the merchant review. + # Format: accounts/\\{account}/productReviews/\\{productReview} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/reviews/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest.new + # + # # Call the get_product_review method. + # result = client.get_product_review request + # + # # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::ProductReview. + # p result + # + def get_product_review request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_product_review.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Reviews::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_product_review.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_product_review.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_reviews_service_stub.get_product_review request, 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 product reviews. + # + # @overload list_product_reviews(request, options = nil) + # Pass arguments to `list_product_reviews` via a request object, either of type + # {::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_product_reviews(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_product_reviews` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 product reviews for. + # Format: accounts/\\{account} + # @param page_size [::Integer] + # Optional. The maximum number of products to return. The service may return + # fewer than this value. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListProductReviews` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListProductReviews` + # 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::Reviews::V1beta::ProductReview>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Reviews::V1beta::ProductReview>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/reviews/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest.new + # + # # Call the list_product_reviews method. + # result = client.list_product_reviews request + # + # # The returned object is of type Gapic::PagedEnumerable. You can 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::Reviews::V1beta::ProductReview. + # p item + # end + # + def list_product_reviews request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_product_reviews.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Reviews::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_product_reviews.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_product_reviews.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_reviews_service_stub.list_product_reviews request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @product_reviews_service_stub, :list_product_reviews, "product_reviews", request, result, 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 product review. + # + # @overload insert_product_review(request, options = nil) + # Pass arguments to `insert_product_review` via a request object, either of type + # {::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_product_review(parent: nil, product_review: nil, data_source: nil) + # Pass arguments to `insert_product_review` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 the product review will be inserted. + # Format: accounts/\\{account} + # @param product_review [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview, ::Hash] + # Required. The product review to insert. + # @param data_source [::String] + # Required. Format: + # `accounts/{account}/dataSources/{datasource}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/reviews/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest.new + # + # # Call the insert_product_review method. + # result = client.insert_product_review request + # + # # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::ProductReview. + # p result + # + def insert_product_review request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest + + # Converts hash and nil to an 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_product_review.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Reviews::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_product_review.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.insert_product_review.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_reviews_service_stub.insert_product_review request, 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 product review. + # + # @overload delete_product_review(request, options = nil) + # Pass arguments to `delete_product_review` via a request object, either of type + # {::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_product_review(name: nil) + # Pass arguments to `delete_product_review` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The ID of the Product review. + # Format: accounts/\\{account}/productReviews/\\{productReview} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @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/reviews/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest.new + # + # # Call the delete_product_review method. + # result = client.delete_product_review request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_product_review request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_product_review.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Reviews::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_product_review.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_product_review.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_reviews_service_stub.delete_product_review request, 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 ProductReviewsService REST API. + # + # This class represents the configuration for ProductReviewsService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_product_review to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_product_review.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_product_review.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the ProductReviewsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_product_review` + # @return [::Gapic::Config::Method] + # + attr_reader :get_product_review + ## + # RPC-specific configuration for `list_product_reviews` + # @return [::Gapic::Config::Method] + # + attr_reader :list_product_reviews + ## + # RPC-specific configuration for `insert_product_review` + # @return [::Gapic::Config::Method] + # + attr_reader :insert_product_review + ## + # RPC-specific configuration for `delete_product_review` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_product_review + + # @private + def initialize parent_rpcs = nil + get_product_review_config = parent_rpcs.get_product_review if parent_rpcs.respond_to? :get_product_review + @get_product_review = ::Gapic::Config::Method.new get_product_review_config + list_product_reviews_config = parent_rpcs.list_product_reviews if parent_rpcs.respond_to? :list_product_reviews + @list_product_reviews = ::Gapic::Config::Method.new list_product_reviews_config + insert_product_review_config = parent_rpcs.insert_product_review if parent_rpcs.respond_to? :insert_product_review + @insert_product_review = ::Gapic::Config::Method.new insert_product_review_config + delete_product_review_config = parent_rpcs.delete_product_review if parent_rpcs.respond_to? :delete_product_review + @delete_product_review = ::Gapic::Config::Method.new delete_product_review_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-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/service_stub.rb new file mode 100644 index 000000000000..ded40943cc71 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_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/reviews/v1beta/productreviews_pb" + +module Google + module Shopping + module Merchant + module Reviews + module V1beta + module ProductReviewsService + module Rest + ## + # REST service stub for the ProductReviewsService 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_product_review REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] + # A result object deserialized from the server's reply + def get_product_review request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_product_review_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_product_review", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReview.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_product_reviews REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsResponse] + # A result object deserialized from the server's reply + def list_product_reviews request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_product_reviews_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_product_reviews", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsResponse.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_product_review REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] + # A result object deserialized from the server's reply + def insert_product_review request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_insert_product_review_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_product_review", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReview.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_product_review REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_product_review request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_product_review_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_product_review", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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_product_review REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_product_review_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/reviews/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/productReviews/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_product_reviews REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_product_reviews_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/reviews/v1beta/{parent}/productReviews", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the insert_product_review REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest] + # 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_product_review_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/reviews/v1beta/{parent}/productReviews:insert", + body: "product_review", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_product_review REST call + # + # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_product_review_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/reviews/v1beta/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/productReviews/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_common_pb.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_common_pb.rb new file mode 100644 index 000000000000..f21e1d5a5cc0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_common_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/reviews/v1beta/productreviews_common.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\nCgoogle/shopping/merchant/reviews/v1beta/productreviews_common.proto\x12\'google.shopping.merchant.reviews.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xb2\r\n\x17ProductReviewAttributes\x12!\n\x0f\x61ggregator_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12 \n\x0esubclient_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12 \n\x0epublisher_name\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12#\n\x11publisher_favicon\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x1d\n\x0breviewer_id\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\'\n\x15reviewer_is_anonymous\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12#\n\x11reviewer_username\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12!\n\x0freview_language\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12 \n\x0ereview_country\x18\t \x01(\tB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12\x34\n\x0breview_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x17\n\x05title\x18\x0b \x01(\tB\x03\xe0\x41\x01H\t\x88\x01\x01\x12\x19\n\x07\x63ontent\x18\x0c \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x11\n\x04pros\x18\r \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x63ons\x18\x0e \x03(\tB\x03\xe0\x41\x01\x12\x65\n\x0breview_link\x18\x0f \x01(\x0b\x32K.google.shopping.merchant.reviews.v1beta.ProductReviewAttributes.ReviewLinkB\x03\xe0\x41\x01\x12!\n\x14reviewer_image_links\x18\x10 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\nmin_rating\x18\x11 \x01(\x03\x42\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\x1c\n\nmax_rating\x18\x12 \x01(\x03\x42\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12\x18\n\x06rating\x18\x13 \x01(\x01\x42\x03\xe0\x41\x01H\r\x88\x01\x01\x12\x1a\n\rproduct_names\x18\x14 \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\rproduct_links\x18\x15 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x61sins\x18\x16 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05gtins\x18\x17 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04mpns\x18\x18 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04skus\x18\x19 \x03(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x62rands\x18\x1a \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x07is_spam\x18\x1b \x01(\x08\x42\x03\xe0\x41\x01H\x0e\x88\x01\x01\x12&\n\x14is_verified_purchase\x18\x1e \x01(\x08\x42\x03\xe0\x41\x01H\x0f\x88\x01\x01\x12(\n\x16is_incentivized_review\x18\x1f \x01(\x08\x42\x03\xe0\x41\x01H\x10\x88\x01\x01\x12q\n\x11\x63ollection_method\x18\x1c \x01(\x0e\x32Q.google.shopping.merchant.reviews.v1beta.ProductReviewAttributes.CollectionMethodB\x03\xe0\x41\x01\x12\x1b\n\x0etransaction_id\x18\x1d \x01(\tB\x03\xe0\x41\x01\x1a\xbc\x01\n\nReviewLink\x12\x63\n\x04type\x18\x01 \x01(\x0e\x32P.google.shopping.merchant.reviews.v1beta.ProductReviewAttributes.ReviewLink.TypeB\x03\xe0\x41\x01\x12\x11\n\x04link\x18\x02 \x01(\tB\x03\xe0\x41\x01\"6\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tSINGLETON\x10\x01\x12\t\n\x05GROUP\x10\x02\"\\\n\x10\x43ollectionMethod\x12!\n\x1d\x43OLLECTION_METHOD_UNSPECIFIED\x10\x00\x12\x0f\n\x0bUNSOLICITED\x10\x01\x12\x14\n\x10POST_FULFILLMENT\x10\x02\x42\x12\n\x10_aggregator_nameB\x11\n\x0f_subclient_nameB\x11\n\x0f_publisher_nameB\x14\n\x12_publisher_faviconB\x0e\n\x0c_reviewer_idB\x18\n\x16_reviewer_is_anonymousB\x14\n\x12_reviewer_usernameB\x12\n\x10_review_languageB\x11\n\x0f_review_countryB\x08\n\x06_titleB\n\n\x08_contentB\r\n\x0b_min_ratingB\r\n\x0b_max_ratingB\t\n\x07_ratingB\n\n\x08_is_spamB\x17\n\x15_is_verified_purchaseB\x19\n\x17_is_incentivized_review\"\xce\x07\n\x13ProductReviewStatus\x12~\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32[.google.shopping.merchant.reviews.v1beta.ProductReviewStatus.ProductReviewDestinationStatusB\x03\xe0\x41\x03\x12x\n\x11item_level_issues\x18\x04 \x03(\x0b\x32X.google.shopping.merchant.reviews.v1beta.ProductReviewStatus.ProductReviewItemLevelIssueB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_update_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a}\n\x1eProductReviewDestinationStatus\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x1a\xcc\x03\n\x1bProductReviewItemLevelIssue\x12\x11\n\x04\x63ode\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12x\n\x08severity\x18\x02 \x01(\x0e\x32\x61.google.shopping.merchant.reviews.v1beta.ProductReviewStatus.ProductReviewItemLevelIssue.SeverityB\x03\xe0\x41\x03\x12\x17\n\nresolution\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tattribute\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12[\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rdocumentation\x18\x08 \x01(\tB\x03\xe0\x41\x03\"G\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_IMPACTED\x10\x01\x12\x0f\n\x0b\x44ISAPPROVED\x10\x02\x42\x99\x02\n+com.google.shopping.merchant.reviews.v1betaB\x19ProductReviewsCommonProtoP\x01ZKcloud.google.com/go/shopping/merchant/reviews/apiv1beta/reviewspb;reviewspb\xaa\x02\'Google.Shopping.Merchant.Reviews.V1Beta\xca\x02\'Google\\Shopping\\Merchant\\Reviews\\V1beta\xea\x02+Google::Shopping::Merchant::Reviews::V1betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Reviews + module V1beta + ProductReviewAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ProductReviewAttributes").msgclass + ProductReviewAttributes::ReviewLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ProductReviewAttributes.ReviewLink").msgclass + ProductReviewAttributes::ReviewLink::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ProductReviewAttributes.ReviewLink.Type").enummodule + ProductReviewAttributes::CollectionMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ProductReviewAttributes.CollectionMethod").enummodule + ProductReviewStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ProductReviewStatus").msgclass + ProductReviewStatus::ProductReviewDestinationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ProductReviewStatus.ProductReviewDestinationStatus").msgclass + ProductReviewStatus::ProductReviewItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ProductReviewStatus.ProductReviewItemLevelIssue").msgclass + ProductReviewStatus::ProductReviewItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ProductReviewStatus.ProductReviewItemLevelIssue.Severity").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_pb.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_pb.rb new file mode 100644 index 000000000000..bb4debd8711a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/reviews/v1beta/productreviews.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/reviews/v1beta/productreviews_common_pb' +require 'google/shopping/type/types_pb' + + +descriptor_data = "\n\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(merchantapi.googleapis.com/ProductReview\"\\\n\x1a\x44\x65leteProductReviewRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(merchantapi.googleapis.com/ProductReview\"\x8e\x01\n\x19ListProductReviewsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(merchantapi.googleapis.com/ProductReview\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\"\xa0\x01\n\x1aInsertProductReviewRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12S\n\x0eproduct_review\x18\x02 \x01(\x0b\x32\x36.google.shopping.merchant.reviews.v1beta.ProductReviewB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x86\x01\n\x1aListProductReviewsResponse\x12O\n\x0fproduct_reviews\x18\x01 \x03(\x0b\x32\x36.google.shopping.merchant.reviews.v1beta.ProductReview\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xf0\x03\n\rProductReview\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x11product_review_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12h\n\x19product_review_attributes\x18\x03 \x01(\x0b\x32@.google.shopping.merchant.reviews.v1beta.ProductReviewAttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\x04 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x61ta_source\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12`\n\x15product_review_status\x18\x06 \x01(\x0b\x32<.google.shopping.merchant.reviews.v1beta.ProductReviewStatusB\x03\xe0\x41\x03:\x7f\xea\x41|\n(merchantapi.googleapis.com/ProductReview\x12\x31\x61\x63\x63ounts/{account}/productReviews/{productreview}*\x0eproductReviews2\rproductReview2\xb7\x07\n\x15ProductReviewsService\x12\xcf\x01\n\x10GetProductReview\x12@.google.shopping.merchant.reviews.v1beta.GetProductReviewRequest\x1a\x36.google.shopping.merchant.reviews.v1beta.ProductReview\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/reviews/v1beta/{name=accounts/*/productReviews/*}\x12\xe2\x01\n\x12ListProductReviews\x12\x42.google.shopping.merchant.reviews.v1beta.ListProductReviewsRequest\x1a\x43.google.shopping.merchant.reviews.v1beta.ListProductReviewsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/reviews/v1beta/{parent=accounts/*}/productReviews\x12\xe5\x01\n\x13InsertProductReview\x12\x43.google.shopping.merchant.reviews.v1beta.InsertProductReviewRequest\x1a\x36.google.shopping.merchant.reviews.v1beta.ProductReview\"Q\x82\xd3\xe4\x93\x02K\"9/reviews/v1beta/{parent=accounts/*}/productReviews:insert:\x0eproduct_review\x12\xb5\x01\n\x13\x44\x65leteProductReview\x12\x43.google.shopping.merchant.reviews.v1beta.DeleteProductReviewRequest\x1a\x16.google.protobuf.Empty\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/reviews/v1beta/{name=accounts/*/productReviews/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x93\x02\n+com.google.shopping.merchant.reviews.v1betaB\x13ProductReviewsProtoP\x01ZKcloud.google.com/go/shopping/merchant/reviews/apiv1beta/reviewspb;reviewspb\xaa\x02\'Google.Shopping.Merchant.Reviews.V1Beta\xca\x02\'Google\\Shopping\\Merchant\\Reviews\\V1beta\xea\x02+Google::Shopping::Merchant::Reviews::V1betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Reviews + module V1beta + GetProductReviewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.GetProductReviewRequest").msgclass + DeleteProductReviewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.DeleteProductReviewRequest").msgclass + ListProductReviewsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ListProductReviewsRequest").msgclass + InsertProductReviewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.InsertProductReviewRequest").msgclass + ListProductReviewsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ListProductReviewsResponse").msgclass + ProductReview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ProductReview").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_services_pb.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_services_pb.rb new file mode 100644 index 000000000000..3e404da80652 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_services_pb.rb @@ -0,0 +1,53 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/reviews/v1beta/productreviews.proto for package 'Google.Shopping.Merchant.Reviews.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/reviews/v1beta/productreviews_pb' + +module Google + module Shopping + module Merchant + module Reviews + module V1beta + module ProductReviewsService + # Service to manage product reviews. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.reviews.v1beta.ProductReviewsService' + + # Gets a product review. + rpc :GetProductReview, ::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest, ::Google::Shopping::Merchant::Reviews::V1beta::ProductReview + # Lists product reviews. + rpc :ListProductReviews, ::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest, ::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsResponse + # Inserts a product review. + rpc :InsertProductReview, ::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest, ::Google::Shopping::Merchant::Reviews::V1beta::ProductReview + # Deletes a product review. + rpc :DeleteProductReview, ::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/rest.rb new file mode 100644 index 000000000000..142e981525a3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/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/reviews/v1beta/merchant_reviews_service/rest" +require "google/shopping/merchant/reviews/v1beta/product_reviews_service/rest" +require "google/shopping/merchant/reviews/v1beta/version" + +module Google + module Shopping + module Merchant + module Reviews + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/reviews/v1beta/rest" + # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new + # + module V1beta + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/version.rb new file mode 100644 index 000000000000..83df16b2ffd9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/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 Reviews + module V1beta + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..03467a3756be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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. + # + # Note: This field should not be used in most cases. + 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. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # 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-reviews-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 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-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.rb new file mode 100644 index 000000000000..c4751d5e0cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.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 Reviews + module V1beta + # Request message for the `GetMerchantReview` method. + # @!attribute [rw] name + # @return [::String] + # Required. The ID of the merchant review. + # Format: accounts/\\{account}/merchantReviews/\\{merchantReview} + class GetMerchantReviewRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteMerchantReview` method. + # @!attribute [rw] name + # @return [::String] + # Required. The ID of the merchant review. + # Format: accounts/\\{account}/merchantReviews/\\{merchantReview} + class DeleteMerchantReviewRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListMerchantsReview` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to list merchant reviews for. + # Format: accounts/\\{account} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of merchant reviews to return. The service can + # return fewer than this value. The maximum value is 1000; values above 1000 + # are coerced to 1000. If unspecified, the maximum number of reviews is + # returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListMerchantReviews` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMerchantReviews` + # must match the call that provided the page token. + class ListMerchantReviewsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertMerchantReview` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account where the merchant review will be inserted. + # Format: accounts/\\{account} + # @!attribute [rw] merchant_review + # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] + # Required. The merchant review to insert. + # @!attribute [rw] data_source + # @return [::String] + # Required. The data source of the + # [merchantreview](https://support.google.com/merchants/answer/7045996?sjid=5253581244217581976-EU) + # Format: + # `accounts/{account}/dataSources/{datasource}`. + class InsertMerchantReviewRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListMerchantsReview` method. + # @!attribute [rw] merchant_reviews + # @return [::Array<::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview>] + # The merchant review. + # @!attribute [rw] next_page_token + # @return [::String] + # The token to retrieve the next page of results. + class ListMerchantReviewsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A review for a merchant. For more information, see + # [Introduction to Merchant Review + # Feeds](https://developers.google.com/merchant-review-feeds) + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the merchant review. + # Format: + # `"{merchantreview.name=accounts/{account}/merchantReviews/{merchantReview}}"` + # @!attribute [rw] merchant_review_id + # @return [::String] + # Required. The user provided merchant review ID to uniquely identify the + # merchant review. + # @!attribute [rw] merchant_review_attributes + # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewAttributes] + # Optional. A list of merchant review attributes. + # @!attribute [rw] custom_attributes + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Optional. A list of custom (merchant-provided) attributes. It can also be + # used for submitting any attribute of the data 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 experimental attributes. + # Maximum allowed number of characters for each + # custom attribute is 10240 (represents sum of characters for name and + # value). Maximum 2500 custom attributes can be set per product, with total + # size of 102.4kB. Underscores in custom attribute names are replaced by + # spaces upon insertion. + # @!attribute [r] data_source + # @return [::String] + # Output only. The primary data source of the merchant review. + # @!attribute [r] merchant_review_status + # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewStatus] + # Output only. The status of a merchant review, data validation issues, that + # is, information about a merchant review computed asynchronously. + class MerchantReview + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews_common.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews_common.rb new file mode 100644 index 000000000000..00152a39458c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews_common.rb @@ -0,0 +1,187 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Reviews + module V1beta + # Attributes. + # @!attribute [rw] merchant_id + # @return [::String] + # Required. Must be unique and stable across all requests. In other words, if + # a request today and another 90 days ago refer to the same merchant, they + # must have the same id. + # @!attribute [rw] merchant_display_name + # @return [::String] + # Optional. Human-readable display name for the merchant. + # @!attribute [rw] merchant_link + # @return [::String] + # Optional. URL to the merchant's main website. Do not use a redirect URL for + # this value. In other words, the value should point directly to the + # merchant's site. + # @!attribute [rw] merchant_rating_link + # @return [::String] + # Optional. URL to the landing page that hosts the reviews for this merchant. + # Do not use a redirect URL. + # @!attribute [rw] min_rating + # @return [::Integer] + # Optional. The minimum possible number for the rating. This should be the + # worst possible rating and should not be a value for no rating. + # @!attribute [rw] max_rating + # @return [::Integer] + # Optional. The maximum possible number for the rating. The value of the max + # rating must be greater than the value of the min rating. + # @!attribute [rw] rating + # @return [::Float] + # Optional. The reviewer's overall rating of the merchant. + # @!attribute [rw] title + # @return [::String] + # Optional. The title of the review. + # @!attribute [rw] content + # @return [::String] + # Required. This should be any freeform text provided by the user and should + # not be truncated. If multiple responses to different questions are + # provided, all responses should be included, with the minimal context for + # the responses to make sense. Context should not be provided if questions + # were left unanswered. + # @!attribute [rw] reviewer_id + # @return [::String] + # Optional. A permanent, unique identifier for the author of the review in + # the publisher's system. + # @!attribute [rw] reviewer_username + # @return [::String] + # Optional. Display name of the review author. + # @!attribute [rw] is_anonymous + # @return [::Boolean] + # Optional. Set to true if the reviewer should remain anonymous. + # @!attribute [rw] collection_method + # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewAttributes::CollectionMethod] + # Optional. The method used to collect the review. + # @!attribute [rw] review_time + # @return [::Google::Protobuf::Timestamp] + # Required. The timestamp indicating when the review was written. + # @!attribute [rw] review_language + # @return [::String] + # Optional. The language of the review defined by BCP-47 language code. + # @!attribute [rw] review_country + # @return [::String] + # Optional. The country where the reviewer made the order defined by ISO + # 3166-1 Alpha-2 Country Code. + class MerchantReviewAttributes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The method used to collect the review. + module CollectionMethod + # Collection method unspecified. + COLLECTION_METHOD_UNSPECIFIED = 0 + + # The user was not responding to a specific solicitation when they + # submitted the review. + MERCHANT_UNSOLICITED = 1 + + # The user submitted the review in response to a solicitation when the + # user placed an order. + POINT_OF_SALE = 2 + + # The user submitted the review in response to a solicitation after + # fulfillment of the user's order. + AFTER_FULFILLMENT = 3 + end + end + + # The status of a merchant review, data validation issues, that is, information + # about a merchant review computed asynchronously. + # @!attribute [r] destination_statuses + # @return [::Array<::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewStatus::MerchantReviewDestinationStatus>] + # Output only. The intended destinations for the merchant review. + # @!attribute [r] item_level_issues + # @return [::Array<::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewStatus::MerchantReviewItemLevelIssue>] + # Output only. A list of all issues associated with the merchant review. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Date on which the item has been created, in [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + # @!attribute [r] last_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Date on which the item has been last updated, in [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + class MerchantReviewStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The destination status of the merchant review status. + # @!attribute [r] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # Output only. The name of the reporting context. + class MerchantReviewDestinationStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The ItemLevelIssue of the merchant review status. + # @!attribute [r] code + # @return [::String] + # Output only. The error code of the issue. + # @!attribute [r] severity + # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewStatus::MerchantReviewItemLevelIssue::Severity] + # Output only. How this issue affects serving of the merchant review. + # @!attribute [r] resolution + # @return [::String] + # Output only. Whether the issue can be resolved by the merchant. + # @!attribute [r] attribute + # @return [::String] + # Output only. The attribute's name, if the issue is caused by a single + # attribute. + # @!attribute [r] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # Output only. The reporting context the issue applies to. + # @!attribute [r] description + # @return [::String] + # Output only. A short issue description in English. + # @!attribute [r] detail + # @return [::String] + # Output only. A detailed issue description in English. + # @!attribute [r] documentation + # @return [::String] + # Output only. The URL of a web page to help with resolving this issue. + class MerchantReviewItemLevelIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # How the issue affects the serving of the merchant review. + module Severity + # Not specified. + SEVERITY_UNSPECIFIED = 0 + + # This issue represents a warning and does not have a direct affect + # on the merchant review. + NOT_IMPACTED = 1 + + # Issue disapproves the merchant review. + DISAPPROVED = 2 + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews.rb new file mode 100644 index 000000000000..6305806f1589 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews.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 Reviews + module V1beta + # Request message for the GetProductReview method. + # @!attribute [rw] name + # @return [::String] + # Required. The ID of the merchant review. + # Format: accounts/\\{account}/productReviews/\\{productReview} + class GetProductReviewRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DeleteProductReview` method. + # @!attribute [rw] name + # @return [::String] + # Required. The ID of the Product review. + # Format: accounts/\\{account}/productReviews/\\{productReview} + class DeleteProductReviewRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListProductReviews method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account to list product reviews for. + # Format: accounts/\\{account} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of products to return. The service may return + # fewer than this value. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListProductReviews` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListProductReviews` + # must match the call that provided the page token. + class ListProductReviewsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `InsertProductReview` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The account where the product review will be inserted. + # Format: accounts/\\{account} + # @!attribute [rw] product_review + # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] + # Required. The product review to insert. + # @!attribute [rw] data_source + # @return [::String] + # Required. Format: + # `accounts/{account}/dataSources/{datasource}`. + class InsertProductReviewRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # response message for the ListProductReviews method. + # @!attribute [rw] product_reviews + # @return [::Array<::Google::Shopping::Merchant::Reviews::V1beta::ProductReview>] + # The product review. + # @!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 ListProductReviewsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A review for a product. For more information, see + # [Introduction to Product Review + # Feeds](https://developers.google.com/product-review-feeds) + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the product review. + # Format: + # `"{productreview.name=accounts/{account}/productReviews/{productReview}}"` + # @!attribute [rw] product_review_id + # @return [::String] + # Required. The permanent, unique identifier for the product review in the + # publisher’s system. + # @!attribute [rw] product_review_attributes + # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewAttributes] + # Optional. A list of product review attributes. + # @!attribute [rw] custom_attributes + # @return [::Array<::Google::Shopping::Type::CustomAttribute>] + # Optional. A list of custom (merchant-provided) attributes. + # @!attribute [r] data_source + # @return [::String] + # Output only. The primary data source of the product review. + # @!attribute [r] product_review_status + # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewStatus] + # Output only. The status of a product review, data validation issues, that + # is, information about a product review computed asynchronously. + class ProductReview + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews_common.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews_common.rb new file mode 100644 index 000000000000..c3f0ca94ed2b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews_common.rb @@ -0,0 +1,273 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Reviews + module V1beta + # Attributes. + # @!attribute [rw] aggregator_name + # @return [::String] + # Optional. The name of the aggregator of the product reviews. + # + # A publisher may use a reviews aggregator to manage reviews and provide + # the feeds. This element indicates the use of an aggregator and contains + # information about the aggregator. + # @!attribute [rw] subclient_name + # @return [::String] + # Optional. The name of the subclient of the product reviews. + # + # The subclient is an identifier of the product review source. + # It should be equivalent to the directory provided in the file data source + # path. + # @!attribute [rw] publisher_name + # @return [::String] + # Optional. The name of the publisher of the product reviews. + # + # The information about the publisher, which may be a retailer, + # manufacturer, reviews service company, or any entity that publishes + # product reviews. + # @!attribute [rw] publisher_favicon + # @return [::String] + # Optional. A link to the company favicon of the publisher. The image + # dimensions should be favicon size: 16x16 pixels. The image format should be + # GIF, JPG or PNG. + # @!attribute [rw] reviewer_id + # @return [::String] + # Optional. The author of the product review. + # + # A permanent, unique identifier for the author of the review in the + # publisher's system. + # @!attribute [rw] reviewer_is_anonymous + # @return [::Boolean] + # Optional. Set to true if the reviewer should remain anonymous. + # @!attribute [rw] reviewer_username + # @return [::String] + # Optional. The name of the reviewer of the product review. + # @!attribute [rw] review_language + # @return [::String] + # Optional. The language of the review defined by BCP-47 language code. + # @!attribute [rw] review_country + # @return [::String] + # Optional. The country of the review defined by ISO 3166-1 Alpha-2 Country + # Code. + # @!attribute [rw] review_time + # @return [::Google::Protobuf::Timestamp] + # Required. The timestamp indicating when the review was written. + # @!attribute [rw] title + # @return [::String] + # Optional. The title of the review. + # @!attribute [rw] content + # @return [::String] + # Optional. The content of the review. If empty, the content might still get + # populated from pros and cons. + # @!attribute [rw] pros + # @return [::Array<::String>] + # Optional. Contains the advantages based on the opinion of the reviewer. + # Omit boilerplate text like "pro:" unless it was written by the reviewer. + # @!attribute [rw] cons + # @return [::Array<::String>] + # Optional. Contains the disadvantages based on the opinion of the reviewer. + # Omit boilerplate text like "con:" unless it was written by the reviewer. + # @!attribute [rw] review_link + # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewAttributes::ReviewLink] + # Optional. The URI of the review landing page. + # @!attribute [rw] reviewer_image_links + # @return [::Array<::String>] + # Optional. A URI to an image of the reviewed product created by the review + # author. The URI does not have to end with an image file extension. + # @!attribute [rw] min_rating + # @return [::Integer] + # Optional. Contains the ratings associated with the review. + # The minimum possible number for the rating. This should be the worst + # possible rating and should not be a value for no rating. + # @!attribute [rw] max_rating + # @return [::Integer] + # Optional. The maximum possible number for the rating. The value of the max + # rating must be greater than the value of the min attribute. + # @!attribute [rw] rating + # @return [::Float] + # Optional. The reviewer's overall rating of the product. + # @!attribute [rw] product_names + # @return [::Array<::String>] + # Optional. Descriptive name of a product. + # @!attribute [rw] product_links + # @return [::Array<::String>] + # Optional. The URI of the product. This URI can have the same value as the + # `review_link` element, if the review URI and the product URI are the + # same. + # @!attribute [rw] asins + # @return [::Array<::String>] + # Optional. Contains ASINs (Amazon Standard Identification Numbers) + # associated with a product. + # @!attribute [rw] gtins + # @return [::Array<::String>] + # Optional. Contains GTINs (global trade item numbers) associated with a + # product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported. + # @!attribute [rw] mpns + # @return [::Array<::String>] + # Optional. Contains MPNs (manufacturer part numbers) associated with a + # product. + # @!attribute [rw] skus + # @return [::Array<::String>] + # Optional. Contains SKUs (stock keeping units) associated with a product. + # Often this matches the product Offer Id in the product feed. + # @!attribute [rw] brands + # @return [::Array<::String>] + # Optional. Contains brand names associated with a product. + # @!attribute [rw] is_spam + # @return [::Boolean] + # Optional. Indicates whether the review is marked as spam in the publisher's + # system. + # @!attribute [rw] is_verified_purchase + # @return [::Boolean] + # Optional. Indicates whether the reviewer's purchase is verified. + # @!attribute [rw] is_incentivized_review + # @return [::Boolean] + # Optional. Indicates whether the review is incentivized. + # @!attribute [rw] collection_method + # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewAttributes::CollectionMethod] + # Optional. The method used to collect the review. + # @!attribute [rw] transaction_id + # @return [::String] + # Optional. A permanent, unique identifier for the transaction associated + # with the review in the publisher's system. This ID can be used to indicate + # that multiple reviews are associated with the same transaction. + class ProductReviewAttributes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The URI of the review landing page. + # @!attribute [rw] type + # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewAttributes::ReviewLink::Type] + # Optional. Type of the review URI. + # @!attribute [rw] link + # @return [::String] + # Optional. The URI of the review landing page. + # For example: `http://www.example.com/review_5.html`. + class ReviewLink + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of the review URI. + module Type + # Type unspecified. + TYPE_UNSPECIFIED = 0 + + # The review page contains only this single review. + SINGLETON = 1 + + # The review page contains a group of reviews including this review. + GROUP = 2 + end + end + + # The method used to collect the review. + module CollectionMethod + # Collection method unspecified. + COLLECTION_METHOD_UNSPECIFIED = 0 + + # The user was not responding to a specific solicitation when they + # submitted the review. + UNSOLICITED = 1 + + # The user submitted the review in response to a solicitation after + # fulfillment of the user's order. + POST_FULFILLMENT = 2 + end + end + + # Product review status. + # @!attribute [r] destination_statuses + # @return [::Array<::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewStatus::ProductReviewDestinationStatus>] + # Output only. The intended destinations for the product review. + # @!attribute [r] item_level_issues + # @return [::Array<::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewStatus::ProductReviewItemLevelIssue>] + # Output only. A list of all issues associated with the product review. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Date on which the item has been created, in [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + # @!attribute [r] last_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Date on which the item has been last updated, in [ISO + # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + class ProductReviewStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The destination status of the product review status. + # @!attribute [r] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # Output only. The name of the reporting context. + class ProductReviewDestinationStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The ItemLevelIssue of the product review status. + # @!attribute [r] code + # @return [::String] + # Output only. The error code of the issue. + # @!attribute [r] severity + # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewStatus::ProductReviewItemLevelIssue::Severity] + # Output only. How this issue affects serving of the product review. + # @!attribute [r] resolution + # @return [::String] + # Output only. Whether the issue can be resolved by the merchant. + # @!attribute [r] attribute + # @return [::String] + # Output only. The attribute's name, if the issue is caused by a single + # attribute. + # @!attribute [r] reporting_context + # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] + # Output only. The reporting context the issue applies to. + # @!attribute [r] description + # @return [::String] + # Output only. A short issue description in English. + # @!attribute [r] detail + # @return [::String] + # Output only. A detailed issue description in English. + # @!attribute [r] documentation + # @return [::String] + # Output only. The URL of a web page to help with resolving this issue. + class ProductReviewItemLevelIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # How the issue affects the serving of the product review. + module Severity + # Not specified. + SEVERITY_UNSPECIFIED = 0 + + # This issue represents a warning and does not have a direct affect + # on the product review. + NOT_IMPACTED = 1 + + # Issue disapproves the product review. + DISAPPROVED = 2 + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..fc9a55054e31 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta", path: "../" +else + gem "google-shopping-merchant-reviews-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-reviews-v1beta/snippets/merchant_reviews_service/delete_merchant_review.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/delete_merchant_review.rb new file mode 100644 index 000000000000..3bf6ab341e33 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/delete_merchant_review.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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_MerchantReviewsService_DeleteMerchantReview_sync] +require "google/shopping/merchant/reviews/v1beta" + +## +# Snippet for the delete_merchant_review call in the MerchantReviewsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#delete_merchant_review. +# +def delete_merchant_review + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest.new + + # Call the delete_merchant_review method. + result = client.delete_merchant_review request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_MerchantReviewsService_DeleteMerchantReview_sync] diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/get_merchant_review.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/get_merchant_review.rb new file mode 100644 index 000000000000..e74ae7f73e5b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/get_merchant_review.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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_MerchantReviewsService_GetMerchantReview_sync] +require "google/shopping/merchant/reviews/v1beta" + +## +# Snippet for the get_merchant_review call in the MerchantReviewsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#get_merchant_review. +# +def get_merchant_review + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest.new + + # Call the get_merchant_review method. + result = client.get_merchant_review request + + # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::MerchantReview. + p result +end +# [END merchantapi_v1beta_generated_MerchantReviewsService_GetMerchantReview_sync] diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/insert_merchant_review.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/insert_merchant_review.rb new file mode 100644 index 000000000000..a4ad91b0aa98 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/insert_merchant_review.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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_MerchantReviewsService_InsertMerchantReview_sync] +require "google/shopping/merchant/reviews/v1beta" + +## +# Snippet for the insert_merchant_review call in the MerchantReviewsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#insert_merchant_review. +# +def insert_merchant_review + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest.new + + # Call the insert_merchant_review method. + result = client.insert_merchant_review request + + # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::MerchantReview. + p result +end +# [END merchantapi_v1beta_generated_MerchantReviewsService_InsertMerchantReview_sync] diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/list_merchant_reviews.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/list_merchant_reviews.rb new file mode 100644 index 000000000000..a98cc375b132 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/list_merchant_reviews.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_MerchantReviewsService_ListMerchantReviews_sync] +require "google/shopping/merchant/reviews/v1beta" + +## +# Snippet for the list_merchant_reviews call in the MerchantReviewsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#list_merchant_reviews. +# +def list_merchant_reviews + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest.new + + # Call the list_merchant_reviews method. + result = client.list_merchant_reviews request + + # The returned object is of type Gapic::PagedEnumerable. You can 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::Reviews::V1beta::MerchantReview. + p item + end +end +# [END merchantapi_v1beta_generated_MerchantReviewsService_ListMerchantReviews_sync] diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/delete_product_review.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/delete_product_review.rb new file mode 100644 index 000000000000..b2e342fe1042 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/delete_product_review.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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_ProductReviewsService_DeleteProductReview_sync] +require "google/shopping/merchant/reviews/v1beta" + +## +# Snippet for the delete_product_review call in the ProductReviewsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#delete_product_review. +# +def delete_product_review + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest.new + + # Call the delete_product_review method. + result = client.delete_product_review request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END merchantapi_v1beta_generated_ProductReviewsService_DeleteProductReview_sync] diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/get_product_review.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/get_product_review.rb new file mode 100644 index 000000000000..eee1f0dc0863 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/get_product_review.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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_ProductReviewsService_GetProductReview_sync] +require "google/shopping/merchant/reviews/v1beta" + +## +# Snippet for the get_product_review call in the ProductReviewsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#get_product_review. +# +def get_product_review + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest.new + + # Call the get_product_review method. + result = client.get_product_review request + + # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::ProductReview. + p result +end +# [END merchantapi_v1beta_generated_ProductReviewsService_GetProductReview_sync] diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/insert_product_review.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/insert_product_review.rb new file mode 100644 index 000000000000..db93ef590cb8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/insert_product_review.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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_ProductReviewsService_InsertProductReview_sync] +require "google/shopping/merchant/reviews/v1beta" + +## +# Snippet for the insert_product_review call in the ProductReviewsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#insert_product_review. +# +def insert_product_review + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest.new + + # Call the insert_product_review method. + result = client.insert_product_review request + + # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::ProductReview. + p result +end +# [END merchantapi_v1beta_generated_ProductReviewsService_InsertProductReview_sync] diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/list_product_reviews.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/list_product_reviews.rb new file mode 100644 index 000000000000..012d4654ccef --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/list_product_reviews.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_ProductReviewsService_ListProductReviews_sync] +require "google/shopping/merchant/reviews/v1beta" + +## +# Snippet for the list_product_reviews call in the ProductReviewsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#list_product_reviews. +# +def list_product_reviews + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest.new + + # Call the list_product_reviews method. + result = client.list_product_reviews request + + # The returned object is of type Gapic::PagedEnumerable. You can 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::Reviews::V1beta::ProductReview. + p item + end +end +# [END merchantapi_v1beta_generated_ProductReviewsService_ListProductReviews_sync] diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/snippet_metadata_google.shopping.merchant.reviews.v1beta.json b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/snippet_metadata_google.shopping.merchant.reviews.v1beta.json new file mode 100644 index 000000000000..f9506bbccf93 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/snippet_metadata_google.shopping.merchant.reviews.v1beta.json @@ -0,0 +1,335 @@ +{ + "client_library": { + "name": "google-shopping-merchant-reviews-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.reviews.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1beta_generated_MerchantReviewsService_GetMerchantReview_sync", + "title": "Snippet for the get_merchant_review call in the MerchantReviewsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#get_merchant_review.", + "file": "merchant_reviews_service/get_merchant_review.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_merchant_review", + "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#get_merchant_review", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview", + "client": { + "short_name": "MerchantReviewsService::Client", + "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client" + }, + "method": { + "short_name": "GetMerchantReview", + "full_name": "google.shopping.merchant.reviews.v1beta.MerchantReviewsService.GetMerchantReview", + "service": { + "short_name": "MerchantReviewsService", + "full_name": "google.shopping.merchant.reviews.v1beta.MerchantReviewsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_MerchantReviewsService_ListMerchantReviews_sync", + "title": "Snippet for the list_merchant_reviews call in the MerchantReviewsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#list_merchant_reviews.", + "file": "merchant_reviews_service/list_merchant_reviews.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_merchant_reviews", + "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#list_merchant_reviews", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsResponse", + "client": { + "short_name": "MerchantReviewsService::Client", + "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client" + }, + "method": { + "short_name": "ListMerchantReviews", + "full_name": "google.shopping.merchant.reviews.v1beta.MerchantReviewsService.ListMerchantReviews", + "service": { + "short_name": "MerchantReviewsService", + "full_name": "google.shopping.merchant.reviews.v1beta.MerchantReviewsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_MerchantReviewsService_InsertMerchantReview_sync", + "title": "Snippet for the insert_merchant_review call in the MerchantReviewsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#insert_merchant_review.", + "file": "merchant_reviews_service/insert_merchant_review.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_merchant_review", + "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#insert_merchant_review", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview", + "client": { + "short_name": "MerchantReviewsService::Client", + "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client" + }, + "method": { + "short_name": "InsertMerchantReview", + "full_name": "google.shopping.merchant.reviews.v1beta.MerchantReviewsService.InsertMerchantReview", + "service": { + "short_name": "MerchantReviewsService", + "full_name": "google.shopping.merchant.reviews.v1beta.MerchantReviewsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_MerchantReviewsService_DeleteMerchantReview_sync", + "title": "Snippet for the delete_merchant_review call in the MerchantReviewsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#delete_merchant_review.", + "file": "merchant_reviews_service/delete_merchant_review.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_merchant_review", + "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#delete_merchant_review", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "MerchantReviewsService::Client", + "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client" + }, + "method": { + "short_name": "DeleteMerchantReview", + "full_name": "google.shopping.merchant.reviews.v1beta.MerchantReviewsService.DeleteMerchantReview", + "service": { + "short_name": "MerchantReviewsService", + "full_name": "google.shopping.merchant.reviews.v1beta.MerchantReviewsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ProductReviewsService_GetProductReview_sync", + "title": "Snippet for the get_product_review call in the ProductReviewsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#get_product_review.", + "file": "product_reviews_service/get_product_review.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_product_review", + "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#get_product_review", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReview", + "client": { + "short_name": "ProductReviewsService::Client", + "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client" + }, + "method": { + "short_name": "GetProductReview", + "full_name": "google.shopping.merchant.reviews.v1beta.ProductReviewsService.GetProductReview", + "service": { + "short_name": "ProductReviewsService", + "full_name": "google.shopping.merchant.reviews.v1beta.ProductReviewsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ProductReviewsService_ListProductReviews_sync", + "title": "Snippet for the list_product_reviews call in the ProductReviewsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#list_product_reviews.", + "file": "product_reviews_service/list_product_reviews.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_product_reviews", + "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#list_product_reviews", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsResponse", + "client": { + "short_name": "ProductReviewsService::Client", + "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client" + }, + "method": { + "short_name": "ListProductReviews", + "full_name": "google.shopping.merchant.reviews.v1beta.ProductReviewsService.ListProductReviews", + "service": { + "short_name": "ProductReviewsService", + "full_name": "google.shopping.merchant.reviews.v1beta.ProductReviewsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ProductReviewsService_InsertProductReview_sync", + "title": "Snippet for the insert_product_review call in the ProductReviewsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#insert_product_review.", + "file": "product_reviews_service/insert_product_review.rb", + "language": "RUBY", + "client_method": { + "short_name": "insert_product_review", + "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#insert_product_review", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReview", + "client": { + "short_name": "ProductReviewsService::Client", + "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client" + }, + "method": { + "short_name": "InsertProductReview", + "full_name": "google.shopping.merchant.reviews.v1beta.ProductReviewsService.InsertProductReview", + "service": { + "short_name": "ProductReviewsService", + "full_name": "google.shopping.merchant.reviews.v1beta.ProductReviewsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1beta_generated_ProductReviewsService_DeleteProductReview_sync", + "title": "Snippet for the delete_product_review call in the ProductReviewsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#delete_product_review.", + "file": "product_reviews_service/delete_product_review.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_product_review", + "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#delete_product_review", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ProductReviewsService::Client", + "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client" + }, + "method": { + "short_name": "DeleteProductReview", + "full_name": "google.shopping.merchant.reviews.v1beta.ProductReviewsService.DeleteProductReview", + "service": { + "short_name": "ProductReviewsService", + "full_name": "google.shopping.merchant.reviews.v1beta.ProductReviewsService" + } + } + }, + "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-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_paths_test.rb new file mode 100644 index 000000000000..ef0cd2bf6ea2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_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/reviews/v1beta/merchant_reviews_service" + +class ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::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::Reviews::V1beta::MerchantReviewsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_merchant_review_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::Reviews::V1beta::MerchantReviewsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.merchant_review_path account: "value0", name: "value1" + assert_equal "accounts/value0/merchantReviews/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_rest_test.rb new file mode 100644 index 000000000000..abe209026df2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_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/reviews/v1beta/merchantreviews_pb" +require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest" + + +class ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::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_merchant_review + # Create test objects. + client_result = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_merchant_review_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::ServiceStub.stub :transcode_get_merchant_review_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_merchant_review_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_merchant_review({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_merchant_review name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_merchant_review ::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_merchant_review({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_merchant_review(::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_merchant_review_client_stub.call_count + end + end + end + + def test_list_merchant_reviews + # Create test objects. + client_result = ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsResponse.new + http_response = OpenStruct.new 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_merchant_reviews_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::ServiceStub.stub :transcode_list_merchant_reviews_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_merchant_reviews_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_merchant_reviews({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_merchant_reviews parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_merchant_reviews ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest.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 + c.list_merchant_reviews({ 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 + c.list_merchant_reviews(::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest.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_merchant_reviews_client_stub.call_count + end + end + end + + def test_insert_merchant_review + # Create test objects. + client_result = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + merchant_review = {} + data_source = "hello world" + + insert_merchant_review_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::ServiceStub.stub :transcode_insert_merchant_review_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_merchant_review_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.insert_merchant_review({ parent: parent, merchant_review: merchant_review, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.insert_merchant_review parent: parent, merchant_review: merchant_review, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.insert_merchant_review ::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest.new(parent: parent, merchant_review: merchant_review, data_source: data_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.insert_merchant_review({ parent: parent, merchant_review: merchant_review, data_source: data_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.insert_merchant_review(::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest.new(parent: parent, merchant_review: merchant_review, data_source: data_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_merchant_review_client_stub.call_count + end + end + end + + def test_delete_merchant_review + # 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_merchant_review_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::ServiceStub.stub :transcode_delete_merchant_review_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_merchant_review_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_merchant_review({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_merchant_review name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_merchant_review ::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_merchant_review({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_merchant_review(::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_merchant_review_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::Reviews::V1beta::MerchantReviewsService::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::Reviews::V1beta::MerchantReviewsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_test.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_test.rb new file mode 100644 index 000000000000..70570a7e94fc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_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/reviews/v1beta/merchantreviews_pb" +require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service" + +class ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::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_merchant_review + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_merchant_review_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_merchant_review, name + assert_kind_of ::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_merchant_review_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_merchant_review({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_merchant_review name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_merchant_review ::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_merchant_review({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_merchant_review(::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_merchant_review_client_stub.call_rpc_count + end + end + + def test_list_merchant_reviews + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_merchant_reviews_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_merchant_reviews, name + assert_kind_of ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest, 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_merchant_reviews_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_merchant_reviews({ parent: parent, page_size: page_size, page_token: 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 + c.list_merchant_reviews parent: parent, page_size: page_size, page_token: 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 + c.list_merchant_reviews ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest.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 + c.list_merchant_reviews({ 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 + c.list_merchant_reviews(::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest.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_merchant_reviews_client_stub.call_rpc_count + end + end + + def test_insert_merchant_review + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + merchant_review = {} + data_source = "hello world" + + insert_merchant_review_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_merchant_review, name + assert_kind_of ::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview), request["merchant_review"] + assert_equal "hello world", request["data_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_merchant_review_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.insert_merchant_review({ parent: parent, merchant_review: merchant_review, data_source: data_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.insert_merchant_review parent: parent, merchant_review: merchant_review, data_source: data_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.insert_merchant_review ::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest.new(parent: parent, merchant_review: merchant_review, data_source: data_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.insert_merchant_review({ parent: parent, merchant_review: merchant_review, 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 + c.insert_merchant_review(::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest.new(parent: parent, merchant_review: merchant_review, 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, insert_merchant_review_client_stub.call_rpc_count + end + end + + def test_delete_merchant_review + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_merchant_review_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_merchant_review, name + assert_kind_of ::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_merchant_review_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_merchant_review({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_merchant_review name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_merchant_review ::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_merchant_review({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_merchant_review(::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest.new(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_merchant_review_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::Reviews::V1beta::MerchantReviewsService::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::Reviews::V1beta::MerchantReviewsService::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::Reviews::V1beta::MerchantReviewsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_paths_test.rb new file mode 100644 index 000000000000..d08895891421 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_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/reviews/v1beta/product_reviews_service" + +class ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::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::Reviews::V1beta::ProductReviewsService::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_review_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::Reviews::V1beta::ProductReviewsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_review_path account: "value0", productreview: "value1" + assert_equal "accounts/value0/productReviews/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_rest_test.rb new file mode 100644 index 000000000000..773800b1cdd9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_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/reviews/v1beta/productreviews_pb" +require "google/shopping/merchant/reviews/v1beta/product_reviews_service/rest" + + +class ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::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_product_review + # Create test objects. + client_result = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReview.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_product_review_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::ServiceStub.stub :transcode_get_product_review_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_product_review_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_product_review({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_product_review name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_product_review ::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_product_review({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_product_review(::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_product_review_client_stub.call_count + end + end + end + + def test_list_product_reviews + # Create test objects. + client_result = ::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_product_reviews_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::ServiceStub.stub :transcode_list_product_reviews_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_product_reviews_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_product_reviews({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_product_reviews parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_product_reviews ::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest.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 + c.list_product_reviews({ 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 + c.list_product_reviews(::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_product_reviews_client_stub.call_count + end + end + end + + def test_insert_product_review + # Create test objects. + client_result = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReview.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + product_review = {} + data_source = "hello world" + + insert_product_review_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::ServiceStub.stub :transcode_insert_product_review_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, insert_product_review_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.insert_product_review({ parent: parent, product_review: product_review, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.insert_product_review parent: parent, product_review: product_review, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.insert_product_review ::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest.new(parent: parent, product_review: product_review, data_source: data_source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.insert_product_review({ parent: parent, product_review: product_review, data_source: data_source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.insert_product_review(::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest.new(parent: parent, product_review: product_review, data_source: data_source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, insert_product_review_client_stub.call_count + end + end + end + + def test_delete_product_review + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_product_review_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::ServiceStub.stub :transcode_delete_product_review_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_product_review_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_product_review({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_product_review name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_product_review ::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_product_review({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_product_review(::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_product_review_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::Reviews::V1beta::ProductReviewsService::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::Reviews::V1beta::ProductReviewsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_test.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_test.rb new file mode 100644 index 000000000000..4ff70edccf39 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_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/reviews/v1beta/productreviews_pb" +require "google/shopping/merchant/reviews/v1beta/product_reviews_service" + +class ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::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_product_review + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReview.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_product_review_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_product_review, name + assert_kind_of ::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_product_review_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_product_review({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_product_review name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_product_review ::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_product_review({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_product_review(::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_product_review_client_stub.call_rpc_count + end + end + + def test_list_product_reviews + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_product_reviews_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_product_reviews, name + assert_kind_of ::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_product_reviews_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_product_reviews({ parent: parent, page_size: page_size, page_token: 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 + c.list_product_reviews parent: parent, page_size: page_size, page_token: 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 + c.list_product_reviews ::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest.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 + c.list_product_reviews({ 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 + c.list_product_reviews(::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_product_reviews_client_stub.call_rpc_count + end + end + + def test_insert_product_review + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReview.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + product_review = {} + data_source = "hello world" + + insert_product_review_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :insert_product_review, name + assert_kind_of ::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Reviews::V1beta::ProductReview), request["product_review"] + assert_equal "hello world", request["data_source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, insert_product_review_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.insert_product_review({ parent: parent, product_review: product_review, data_source: data_source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.insert_product_review parent: parent, product_review: product_review, data_source: data_source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.insert_product_review ::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest.new(parent: parent, product_review: product_review, data_source: data_source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.insert_product_review({ parent: parent, product_review: product_review, 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 + c.insert_product_review(::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest.new(parent: parent, product_review: product_review, 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, insert_product_review_client_stub.call_rpc_count + end + end + + def test_delete_product_review + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_product_review_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_product_review, name + assert_kind_of ::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_product_review_client_stub do + # Create client + c = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_product_review({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_product_review name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_product_review ::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_product_review({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_product_review(::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_product_review_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::Reviews::V1beta::ProductReviewsService::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::Reviews::V1beta::ProductReviewsService::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::Reviews::V1beta::ProductReviewsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/grafeas-v1/.gitignore b/owl-bot-staging/grafeas-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/.gitignore @@ -0,0 +1,20 @@ +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/grafeas-v1/.repo-metadata.json b/owl-bot-staging/grafeas-v1/.repo-metadata.json new file mode 100644 index 000000000000..d1fa0d6fa7f7 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_id": "containeranalysis.googleapis.com", + "api_shortname": "containeranalysis", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/grafeas-v1/latest", + "distribution_name": "grafeas-v1", + "is_cloud": true, + "language": "ruby", + "name": "containeranalysis", + "name_pretty": "Grafeas V1 API", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Grafeas API stores, and enables querying and retrieval of, critical metadata about all of your software artifacts. Note that grafeas-v1 is a version-specific client library. For most uses, we recommend installing the main client library grafeas instead. See the readme for more details.", + "ruby-cloud-env-prefix": "GRAFEAS", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/grafeas-v1/.rubocop.yml b/owl-bot-staging/grafeas-v1/.rubocop.yml new file mode 100644 index 000000000000..34342e2dbb2e --- /dev/null +++ b/owl-bot-staging/grafeas-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "grafeas-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/grafeas-v1.rb" diff --git a/owl-bot-staging/grafeas-v1/.toys.rb b/owl-bot-staging/grafeas-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/grafeas-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/grafeas-v1/.yardopts b/owl-bot-staging/grafeas-v1/.yardopts new file mode 100644 index 000000000000..095a73abbebf --- /dev/null +++ b/owl-bot-staging/grafeas-v1/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Grafeas V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md diff --git a/owl-bot-staging/grafeas-v1/CHANGELOG.md b/owl-bot-staging/grafeas-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/grafeas-v1/Gemfile b/owl-bot-staging/grafeas-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/Gemfile @@ -0,0 +1,15 @@ +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-reporters", "~> 1.8.0", require: false +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/grafeas-v1/LICENSE.md b/owl-bot-staging/grafeas-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/grafeas-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/grafeas-v1/README.md b/owl-bot-staging/grafeas-v1/README.md new file mode 100644 index 000000000000..b9dc04cc0df4 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Grafeas V1 API + +An implementation of the Grafeas API, which stores, and enables querying and retrieval of critical metadata about all of your software artifacts. + +The Grafeas API stores, and enables querying and retrieval of, critical metadata about all of your software artifacts. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Grafeas V1 API. Most users should consider using +the main client gem, +[grafeas](https://rubygems.org/gems/grafeas). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install grafeas-v1 +``` + +## Quick Start + +```ruby +require "grafeas/v1" + +client = ::Grafeas::V1::Grafeas::Client.new +request = ::Grafeas::V1::GetOccurrenceRequest.new # (request fields as keyword arguments...) +response = client.get_occurrence request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/grafeas-v1/latest) +for class and method documentation. + +## 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 "grafeas/v1" +require "logger" + +client = ::Grafeas::V1::Grafeas::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.2+. + +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 `grafeas`, +and lower-level _versioned_ client libraries with names such as +`grafeas-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. +`grafeas`. +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. `grafeas-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/grafeas-v1/Rakefile b/owl-bot-staging/grafeas-v1/Rakefile new file mode 100644 index 000000000000..98a03bfd1e86 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/Rakefile @@ -0,0 +1,143 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "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 grafeas-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The grafeas-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 grafeas-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 grafeas-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 grafeas-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING grafeas-v1" + header "grafeas-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "grafeas-v1 yard", "*" + Rake::Task[:yard].invoke + header "grafeas-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 "grafeas-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 "grafeas-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/grafeas-v1/gapic_metadata.json b/owl-bot-staging/grafeas-v1/gapic_metadata.json new file mode 100644 index 000000000000..9722caf753b2 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/gapic_metadata.json @@ -0,0 +1,88 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "grafeas.v1", + "libraryPackage": "::Grafeas::V1", + "services": { + "Grafeas": { + "clients": { + "grpc": { + "libraryClient": "::Grafeas::V1::Grafeas::Client", + "rpcs": { + "GetOccurrence": { + "methods": [ + "get_occurrence" + ] + }, + "ListOccurrences": { + "methods": [ + "list_occurrences" + ] + }, + "DeleteOccurrence": { + "methods": [ + "delete_occurrence" + ] + }, + "CreateOccurrence": { + "methods": [ + "create_occurrence" + ] + }, + "BatchCreateOccurrences": { + "methods": [ + "batch_create_occurrences" + ] + }, + "UpdateOccurrence": { + "methods": [ + "update_occurrence" + ] + }, + "GetOccurrenceNote": { + "methods": [ + "get_occurrence_note" + ] + }, + "GetNote": { + "methods": [ + "get_note" + ] + }, + "ListNotes": { + "methods": [ + "list_notes" + ] + }, + "DeleteNote": { + "methods": [ + "delete_note" + ] + }, + "CreateNote": { + "methods": [ + "create_note" + ] + }, + "BatchCreateNotes": { + "methods": [ + "batch_create_notes" + ] + }, + "UpdateNote": { + "methods": [ + "update_note" + ] + }, + "ListNoteOccurrences": { + "methods": [ + "list_note_occurrences" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/grafeas-v1/grafeas-v1.gemspec b/owl-bot-staging/grafeas-v1/grafeas-v1.gemspec new file mode 100644 index 000000000000..324ac28fb52f --- /dev/null +++ b/owl-bot-staging/grafeas-v1/grafeas-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/grafeas/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "grafeas-v1" + gem.version = Grafeas::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Grafeas API stores, and enables querying and retrieval of, critical metadata about all of your software artifacts. Note that grafeas-v1 is a version-specific client library. For most uses, we recommend installing the main client library grafeas instead. See the readme for more details." + gem.summary = "An implementation of the Grafeas API, which stores, and enables querying and retrieval of critical metadata about all of your software artifacts." + 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", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas-v1.rb b/owl-bot-staging/grafeas-v1/lib/grafeas-v1.rb new file mode 100644 index 000000000000..05b00fa8d69e --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas-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 "grafeas/v1" diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1.rb new file mode 100644 index 000000000000..0449a2645755 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1.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 "grafeas/v1/grafeas" +require "grafeas/v1/version" + +module Grafeas + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "grafeas/v1" + # client = ::Grafeas::V1::Grafeas::Client.new + # + module V1 + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "grafeas/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/attestation_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/attestation_pb.rb new file mode 100644 index 000000000000..795fe75c22f5 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/attestation_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/attestation.proto + +require 'google/protobuf' + +require 'grafeas/v1/common_pb' + + +descriptor_data = "\n\x1cgrafeas/v1/attestation.proto\x12\ngrafeas.v1\x1a\x17grafeas/v1/common.proto\"f\n\x0f\x41ttestationNote\x12.\n\x04hint\x18\x01 \x01(\x0b\x32 .grafeas.v1.AttestationNote.Hint\x1a#\n\x04Hint\x12\x1b\n\x13human_readable_name\x18\x01 \x01(\t\"\x1a\n\x03Jwt\x12\x13\n\x0b\x63ompact_jwt\x18\x01 \x01(\t\"}\n\x15\x41ttestationOccurrence\x12\x1a\n\x12serialized_payload\x18\x01 \x01(\x0c\x12)\n\nsignatures\x18\x02 \x03(\x0b\x32\x15.grafeas.v1.Signature\x12\x1d\n\x04jwts\x18\x03 \x03(\x0b\x32\x0f.grafeas.v1.JwtBQ\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + AttestationNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.AttestationNote").msgclass + AttestationNote::Hint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.AttestationNote.Hint").msgclass + Jwt = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Jwt").msgclass + AttestationOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.AttestationOccurrence").msgclass + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/build_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/build_pb.rb new file mode 100644 index 000000000000..9741f1d0f6db --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/build_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/build.proto + +require 'google/protobuf' + +require 'grafeas/v1/intoto_provenance_pb' +require 'grafeas/v1/intoto_statement_pb' +require 'grafeas/v1/provenance_pb' + + +descriptor_data = "\n\x16grafeas/v1/build.proto\x12\ngrafeas.v1\x1a\"grafeas/v1/intoto_provenance.proto\x1a!grafeas/v1/intoto_statement.proto\x1a\x1bgrafeas/v1/provenance.proto\"$\n\tBuildNote\x12\x17\n\x0f\x62uilder_version\x18\x01 \x01(\t\"\x94\x02\n\x0f\x42uildOccurrence\x12/\n\nprovenance\x18\x01 \x01(\x0b\x32\x1b.grafeas.v1.BuildProvenance\x12\x18\n\x10provenance_bytes\x18\x02 \x01(\t\x12\x37\n\x11intoto_provenance\x18\x03 \x01(\x0b\x32\x1c.grafeas.v1.InTotoProvenance\x12\x35\n\x10intoto_statement\x18\x04 \x01(\x0b\x32\x1b.grafeas.v1.InTotoStatement\x12\x46\n\x1ain_toto_slsa_provenance_v1\x18\x05 \x01(\x0b\x32\".grafeas.v1.InTotoSlsaProvenanceV1BQ\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + BuildNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.BuildNote").msgclass + BuildOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.BuildOccurrence").msgclass + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/common_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/common_pb.rb new file mode 100644 index 000000000000..ce9669d62bca --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/common_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/common.proto + +require 'google/protobuf' + + +descriptor_data = "\n\x17grafeas/v1/common.proto\x12\ngrafeas.v1\"(\n\nRelatedUrl\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\"5\n\tSignature\x12\x11\n\tsignature\x18\x01 \x01(\x0c\x12\x15\n\rpublic_key_id\x18\x02 \x01(\t\"d\n\x08\x45nvelope\x12\x0f\n\x07payload\x18\x01 \x01(\x0c\x12\x14\n\x0cpayload_type\x18\x02 \x01(\t\x12\x31\n\nsignatures\x18\x03 \x03(\x0b\x32\x1d.grafeas.v1.EnvelopeSignature\"/\n\x11\x45nvelopeSignature\x12\x0b\n\x03sig\x18\x01 \x01(\x0c\x12\r\n\x05keyid\x18\x02 \x01(\t\"g\n\x0c\x46ileLocation\x12\x11\n\tfile_path\x18\x01 \x01(\t\x12/\n\rlayer_details\x18\x02 \x01(\x0b\x32\x18.grafeas.v1.LayerDetails\x12\x13\n\x0bline_number\x18\x03 \x01(\x05\"T\n\tBaseImage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nrepository\x18\x02 \x01(\t\x12\x13\n\x0blayer_count\x18\x03 \x01(\x05\x12\x10\n\x08registry\x18\x04 \x01(\t\"}\n\x0cLayerDetails\x12\r\n\x05index\x18\x01 \x01(\x05\x12\x0f\n\x07\x64iff_id\x18\x02 \x01(\t\x12\x10\n\x08\x63hain_id\x18\x05 \x01(\t\x12\x0f\n\x07\x63ommand\x18\x03 \x01(\t\x12*\n\x0b\x62\x61se_images\x18\x04 \x03(\x0b\x32\x15.grafeas.v1.BaseImage\"/\n\x07License\x12\x12\n\nexpression\x18\x01 \x01(\t\x12\x10\n\x08\x63omments\x18\x02 \x01(\t\",\n\x06\x44igest\x12\x0c\n\x04\x61lgo\x18\x01 \x01(\t\x12\x14\n\x0c\x64igest_bytes\x18\x02 \x01(\x0c*\xfc\x01\n\x08NoteKind\x12\x19\n\x15NOTE_KIND_UNSPECIFIED\x10\x00\x12\x11\n\rVULNERABILITY\x10\x01\x12\t\n\x05\x42UILD\x10\x02\x12\t\n\x05IMAGE\x10\x03\x12\x0b\n\x07PACKAGE\x10\x04\x12\x0e\n\nDEPLOYMENT\x10\x05\x12\r\n\tDISCOVERY\x10\x06\x12\x0f\n\x0b\x41TTESTATION\x10\x07\x12\x0b\n\x07UPGRADE\x10\x08\x12\x0e\n\nCOMPLIANCE\x10\t\x12\x14\n\x10\x44SSE_ATTESTATION\x10\n\x12\x1c\n\x18VULNERABILITY_ASSESSMENT\x10\x0b\x12\x12\n\x0eSBOM_REFERENCE\x10\x0c\x12\n\n\x06SECRET\x10\rBQ\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + RelatedUrl = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.RelatedUrl").msgclass + Signature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Signature").msgclass + Envelope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Envelope").msgclass + EnvelopeSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.EnvelopeSignature").msgclass + FileLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.FileLocation").msgclass + BaseImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.BaseImage").msgclass + LayerDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.LayerDetails").msgclass + License = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.License").msgclass + Digest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Digest").msgclass + NoteKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.NoteKind").enummodule + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/compliance_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/compliance_pb.rb new file mode 100644 index 000000000000..a4bd2780c5a2 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/compliance_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/compliance.proto + +require 'google/protobuf' + +require 'grafeas/v1/severity_pb' + + +descriptor_data = "\n\x1bgrafeas/v1/compliance.proto\x12\ngrafeas.v1\x1a\x19grafeas/v1/severity.proto\"\xf1\x02\n\x0e\x43omplianceNote\x12\r\n\x05title\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12.\n\x07version\x18\x03 \x03(\x0b\x32\x1d.grafeas.v1.ComplianceVersion\x12\x11\n\trationale\x18\x04 \x01(\t\x12\x13\n\x0bremediation\x18\x05 \x01(\t\x12@\n\rcis_benchmark\x18\x06 \x01(\x0b\x32\'.grafeas.v1.ComplianceNote.CisBenchmarkH\x00\x12\x19\n\x11scan_instructions\x18\x07 \x01(\x0c\x12\x10\n\x06impact\x18\x08 \x01(\tH\x01\x1aM\n\x0c\x43isBenchmark\x12\x15\n\rprofile_level\x18\x01 \x01(\x05\x12&\n\x08severity\x18\x02 \x01(\x0e\x32\x14.grafeas.v1.SeverityB\x11\n\x0f\x63ompliance_typeB\x12\n\x10potential_impact\"Q\n\x11\x43omplianceVersion\x12\x0f\n\x07\x63pe_uri\x18\x01 \x01(\t\x12\x1a\n\x12\x62\x65nchmark_document\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\"\xa0\x01\n\x14\x43omplianceOccurrence\x12\x39\n\x13non_compliant_files\x18\x02 \x03(\x0b\x32\x1c.grafeas.v1.NonCompliantFile\x12\x1d\n\x15non_compliance_reason\x18\x03 \x01(\t\x12.\n\x07version\x18\x04 \x01(\x0b\x32\x1d.grafeas.v1.ComplianceVersion\"I\n\x10NonCompliantFile\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x17\n\x0f\x64isplay_command\x18\x02 \x01(\t\x12\x0e\n\x06reason\x18\x03 \x01(\tBQ\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + ComplianceNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ComplianceNote").msgclass + ComplianceNote::CisBenchmark = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ComplianceNote.CisBenchmark").msgclass + ComplianceVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ComplianceVersion").msgclass + ComplianceOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ComplianceOccurrence").msgclass + NonCompliantFile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.NonCompliantFile").msgclass + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/cvss_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/cvss_pb.rb new file mode 100644 index 000000000000..6855ca3fe246 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/cvss_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/cvss.proto + +require 'google/protobuf' + + +descriptor_data = "\n\x15grafeas/v1/cvss.proto\x12\ngrafeas.v1\"\xc5\t\n\x06\x43VSSv3\x12\x12\n\nbase_score\x18\x01 \x01(\x02\x12\x1c\n\x14\x65xploitability_score\x18\x02 \x01(\x02\x12\x14\n\x0cimpact_score\x18\x03 \x01(\x02\x12\x36\n\rattack_vector\x18\x05 \x01(\x0e\x32\x1f.grafeas.v1.CVSSv3.AttackVector\x12>\n\x11\x61ttack_complexity\x18\x06 \x01(\x0e\x32#.grafeas.v1.CVSSv3.AttackComplexity\x12\x42\n\x13privileges_required\x18\x07 \x01(\x0e\x32%.grafeas.v1.CVSSv3.PrivilegesRequired\x12<\n\x10user_interaction\x18\x08 \x01(\x0e\x32\".grafeas.v1.CVSSv3.UserInteraction\x12\'\n\x05scope\x18\t \x01(\x0e\x32\x18.grafeas.v1.CVSSv3.Scope\x12\x39\n\x16\x63onfidentiality_impact\x18\n \x01(\x0e\x32\x19.grafeas.v1.CVSSv3.Impact\x12\x33\n\x10integrity_impact\x18\x0b \x01(\x0e\x32\x19.grafeas.v1.CVSSv3.Impact\x12\x36\n\x13\x61vailability_impact\x18\x0c \x01(\x0e\x32\x19.grafeas.v1.CVSSv3.Impact\"\x99\x01\n\x0c\x41ttackVector\x12\x1d\n\x19\x41TTACK_VECTOR_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_VECTOR_NETWORK\x10\x01\x12\x1a\n\x16\x41TTACK_VECTOR_ADJACENT\x10\x02\x12\x17\n\x13\x41TTACK_VECTOR_LOCAL\x10\x03\x12\x1a\n\x16\x41TTACK_VECTOR_PHYSICAL\x10\x04\"l\n\x10\x41ttackComplexity\x12!\n\x1d\x41TTACK_COMPLEXITY_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_COMPLEXITY_LOW\x10\x01\x12\x1a\n\x16\x41TTACK_COMPLEXITY_HIGH\x10\x02\"\x92\x01\n\x12PrivilegesRequired\x12#\n\x1fPRIVILEGES_REQUIRED_UNSPECIFIED\x10\x00\x12\x1c\n\x18PRIVILEGES_REQUIRED_NONE\x10\x01\x12\x1b\n\x17PRIVILEGES_REQUIRED_LOW\x10\x02\x12\x1c\n\x18PRIVILEGES_REQUIRED_HIGH\x10\x03\"m\n\x0fUserInteraction\x12 \n\x1cUSER_INTERACTION_UNSPECIFIED\x10\x00\x12\x19\n\x15USER_INTERACTION_NONE\x10\x01\x12\x1d\n\x19USER_INTERACTION_REQUIRED\x10\x02\"F\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSCOPE_UNCHANGED\x10\x01\x12\x11\n\rSCOPE_CHANGED\x10\x02\"R\n\x06Impact\x12\x16\n\x12IMPACT_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIMPACT_HIGH\x10\x01\x12\x0e\n\nIMPACT_LOW\x10\x02\x12\x0f\n\x0bIMPACT_NONE\x10\x03\"\xce\x12\n\x04\x43VSS\x12\x12\n\nbase_score\x18\x01 \x01(\x02\x12\x1c\n\x14\x65xploitability_score\x18\x02 \x01(\x02\x12\x14\n\x0cimpact_score\x18\x03 \x01(\x02\x12\x34\n\rattack_vector\x18\x04 \x01(\x0e\x32\x1d.grafeas.v1.CVSS.AttackVector\x12<\n\x11\x61ttack_complexity\x18\x05 \x01(\x0e\x32!.grafeas.v1.CVSS.AttackComplexity\x12\x37\n\x0e\x61uthentication\x18\x06 \x01(\x0e\x32\x1f.grafeas.v1.CVSS.Authentication\x12@\n\x13privileges_required\x18\x07 \x01(\x0e\x32#.grafeas.v1.CVSS.PrivilegesRequired\x12:\n\x10user_interaction\x18\x08 \x01(\x0e\x32 .grafeas.v1.CVSS.UserInteraction\x12%\n\x05scope\x18\t \x01(\x0e\x32\x16.grafeas.v1.CVSS.Scope\x12\x37\n\x16\x63onfidentiality_impact\x18\n \x01(\x0e\x32\x17.grafeas.v1.CVSS.Impact\x12\x31\n\x10integrity_impact\x18\x0b \x01(\x0e\x32\x17.grafeas.v1.CVSS.Impact\x12\x34\n\x13\x61vailability_impact\x18\x0c \x01(\x0e\x32\x17.grafeas.v1.CVSS.Impact\x12@\n\x13\x61ttack_requirements\x18\r \x01(\x0e\x32#.grafeas.v1.CVSS.AttackRequirements\x12I\n(vulnerable_system_confidentiality_impact\x18\x0e \x01(\x0e\x32\x17.grafeas.v1.CVSS.Impact\x12\x43\n\"vulnerable_system_integrity_impact\x18\x0f \x01(\x0e\x32\x17.grafeas.v1.CVSS.Impact\x12\x46\n%vulnerable_system_availability_impact\x18\x10 \x01(\x0e\x32\x17.grafeas.v1.CVSS.Impact\x12I\n(subsequent_system_confidentiality_impact\x18\x11 \x01(\x0e\x32\x17.grafeas.v1.CVSS.Impact\x12\x43\n\"subsequent_system_integrity_impact\x18\x12 \x01(\x0e\x32\x17.grafeas.v1.CVSS.Impact\x12\x46\n%subsequent_system_availability_impact\x18\x13 \x01(\x0e\x32\x17.grafeas.v1.CVSS.Impact\x12:\n\x10\x65xploit_maturity\x18\x14 \x01(\x0e\x32 .grafeas.v1.CVSS.ExploitMaturity\"\x99\x01\n\x0c\x41ttackVector\x12\x1d\n\x19\x41TTACK_VECTOR_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_VECTOR_NETWORK\x10\x01\x12\x1a\n\x16\x41TTACK_VECTOR_ADJACENT\x10\x02\x12\x17\n\x13\x41TTACK_VECTOR_LOCAL\x10\x03\x12\x1a\n\x16\x41TTACK_VECTOR_PHYSICAL\x10\x04\"\x8a\x01\n\x10\x41ttackComplexity\x12!\n\x1d\x41TTACK_COMPLEXITY_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_COMPLEXITY_LOW\x10\x01\x12\x1a\n\x16\x41TTACK_COMPLEXITY_HIGH\x10\x02\x12\x1c\n\x18\x41TTACK_COMPLEXITY_MEDIUM\x10\x03\"\x81\x01\n\x0e\x41uthentication\x12\x1e\n\x1a\x41UTHENTICATION_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x41UTHENTICATION_MULTIPLE\x10\x01\x12\x19\n\x15\x41UTHENTICATION_SINGLE\x10\x02\x12\x17\n\x13\x41UTHENTICATION_NONE\x10\x03\"\x92\x01\n\x12PrivilegesRequired\x12#\n\x1fPRIVILEGES_REQUIRED_UNSPECIFIED\x10\x00\x12\x1c\n\x18PRIVILEGES_REQUIRED_NONE\x10\x01\x12\x1b\n\x17PRIVILEGES_REQUIRED_LOW\x10\x02\x12\x1c\n\x18PRIVILEGES_REQUIRED_HIGH\x10\x03\"\xa8\x01\n\x0fUserInteraction\x12 \n\x1cUSER_INTERACTION_UNSPECIFIED\x10\x00\x12\x19\n\x15USER_INTERACTION_NONE\x10\x01\x12\x1d\n\x19USER_INTERACTION_REQUIRED\x10\x02\x12\x1c\n\x18USER_INTERACTION_PASSIVE\x10\x03\x12\x1b\n\x17USER_INTERACTION_ACTIVE\x10\x04\"F\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSCOPE_UNCHANGED\x10\x01\x12\x11\n\rSCOPE_CHANGED\x10\x02\"{\n\x06Impact\x12\x16\n\x12IMPACT_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIMPACT_HIGH\x10\x01\x12\x0e\n\nIMPACT_LOW\x10\x02\x12\x0f\n\x0bIMPACT_NONE\x10\x03\x12\x12\n\x0eIMPACT_PARTIAL\x10\x04\x12\x13\n\x0fIMPACT_COMPLETE\x10\x05\"x\n\x12\x41ttackRequirements\x12#\n\x1f\x41TTACK_REQUIREMENTS_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x41TTACK_REQUIREMENTS_NONE\x10\x01\x12\x1f\n\x1b\x41TTACK_REQUIREMENTS_PRESENT\x10\x02\"\xaf\x01\n\x0f\x45xploitMaturity\x12 \n\x1c\x45XPLOIT_MATURITY_UNSPECIFIED\x10\x00\x12 \n\x1c\x45XPLOIT_MATURITY_NOT_DEFINED\x10\x01\x12\x1d\n\x19\x45XPLOIT_MATURITY_ATTACKED\x10\x02\x12\x18\n\x14\x45XPLOIT_MATURITY_POC\x10\x03\x12\x1f\n\x1b\x45XPLOIT_MATURITY_UNREPORTED\x10\x04*g\n\x0b\x43VSSVersion\x12\x1c\n\x18\x43VSS_VERSION_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43VSS_VERSION_2\x10\x01\x12\x12\n\x0e\x43VSS_VERSION_3\x10\x02\x12\x12\n\x0e\x43VSS_VERSION_4\x10\x03\x42\\\n\rio.grafeas.v1B\tCVSSProtoP\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + CVSSv3 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSSv3").msgclass + CVSSv3::AttackVector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSSv3.AttackVector").enummodule + CVSSv3::AttackComplexity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSSv3.AttackComplexity").enummodule + CVSSv3::PrivilegesRequired = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSSv3.PrivilegesRequired").enummodule + CVSSv3::UserInteraction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSSv3.UserInteraction").enummodule + CVSSv3::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSSv3.Scope").enummodule + CVSSv3::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSSv3.Impact").enummodule + CVSS = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSS").msgclass + CVSS::AttackVector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSS.AttackVector").enummodule + CVSS::AttackComplexity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSS.AttackComplexity").enummodule + CVSS::Authentication = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSS.Authentication").enummodule + CVSS::PrivilegesRequired = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSS.PrivilegesRequired").enummodule + CVSS::UserInteraction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSS.UserInteraction").enummodule + CVSS::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSS.Scope").enummodule + CVSS::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSS.Impact").enummodule + CVSS::AttackRequirements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSS.AttackRequirements").enummodule + CVSS::ExploitMaturity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSS.ExploitMaturity").enummodule + CVSSVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSSVersion").enummodule + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/deployment_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/deployment_pb.rb new file mode 100644 index 000000000000..80388f920c3d --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/deployment_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/deployment.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\x1bgrafeas/v1/deployment.proto\x12\ngrafeas.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"&\n\x0e\x44\x65ploymentNote\x12\x14\n\x0cresource_uri\x18\x01 \x03(\t\"\xc7\x02\n\x14\x44\x65ploymentOccurrence\x12\x12\n\nuser_email\x18\x01 \x01(\t\x12/\n\x0b\x64\x65ploy_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rundeploy_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06\x63onfig\x18\x04 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x05 \x01(\t\x12\x14\n\x0cresource_uri\x18\x06 \x03(\t\x12;\n\x08platform\x18\x07 \x01(\x0e\x32).grafeas.v1.DeploymentOccurrence.Platform\"C\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x07\n\x03GKE\x10\x01\x12\x08\n\x04\x46LEX\x10\x02\x12\n\n\x06\x43USTOM\x10\x03\x42Q\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + DeploymentNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DeploymentNote").msgclass + DeploymentOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DeploymentOccurrence").msgclass + DeploymentOccurrence::Platform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DeploymentOccurrence.Platform").enummodule + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/discovery_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/discovery_pb.rb new file mode 100644 index 000000000000..eb72608cb96b --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/discovery_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/discovery.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' +require 'grafeas/v1/common_pb' + + +descriptor_data = "\n\x1agrafeas/v1/discovery.proto\x12\ngrafeas.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x17grafeas/v1/common.proto\"<\n\rDiscoveryNote\x12+\n\ranalysis_kind\x18\x01 \x01(\x0e\x32\x14.grafeas.v1.NoteKind\"\xfd\x0c\n\x13\x44iscoveryOccurrence\x12O\n\x13\x63ontinuous_analysis\x18\x01 \x01(\x0e\x32\x32.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis\x12G\n\x0f\x61nalysis_status\x18\x02 \x01(\x0e\x32..grafeas.v1.DiscoveryOccurrence.AnalysisStatus\x12M\n\x12\x61nalysis_completed\x18\x07 \x01(\x0b\x32\x31.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted\x12*\n\x0e\x61nalysis_error\x18\x08 \x03(\x0b\x32\x12.google.rpc.Status\x12\x31\n\x15\x61nalysis_status_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12\x0b\n\x03\x63pe\x18\x04 \x01(\t\x12\x32\n\x0elast_scan_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x0c\x61rchive_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x0bsbom_status\x18\t \x01(\x0b\x32*.grafeas.v1.DiscoveryOccurrence.SBOMStatus\x12[\n\x19vulnerability_attestation\x18\n \x01(\x0b\x32\x38.grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation\x12\x33\n\x05\x66iles\x18\x0b \x03(\x0b\x32$.grafeas.v1.DiscoveryOccurrence.File\x12\x42\n\x1elast_vulnerability_update_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a*\n\x11\x41nalysisCompleted\x12\x15\n\ranalysis_type\x18\x01 \x03(\t\x1a\xa9\x01\n\nSBOMStatus\x12H\n\nsbom_state\x18\x01 \x01(\x0e\x32\x34.grafeas.v1.DiscoveryOccurrence.SBOMStatus.SBOMState\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"B\n\tSBOMState\x12\x1a\n\x16SBOM_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08\x43OMPLETE\x10\x02\x1a\xb3\x02\n\x18VulnerabilityAttestation\x12\x35\n\x11last_attempt_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x65\n\x05state\x18\x02 \x01(\x0e\x32V.grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.VulnerabilityAttestationState\x12\r\n\x05\x65rror\x18\x03 \x01(\t\"j\n\x1dVulnerabilityAttestationState\x12/\n+VULNERABILITY_ATTESTATION_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\x0b\n\x07\x46\x41ILURE\x10\x02\x1a\x85\x01\n\x04\x46ile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12@\n\x06\x64igest\x18\x02 \x03(\x0b\x32\x30.grafeas.v1.DiscoveryOccurrence.File.DigestEntry\x1a-\n\x0b\x44igestEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"S\n\x12\x43ontinuousAnalysis\x12#\n\x1f\x43ONTINUOUS_ANALYSIS_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\"\xa3\x01\n\x0e\x41nalysisStatus\x12\x1f\n\x1b\x41NALYSIS_STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08SCANNING\x10\x02\x12\x14\n\x10\x46INISHED_SUCCESS\x10\x03\x12\x0c\n\x08\x43OMPLETE\x10\x03\x12\x13\n\x0f\x46INISHED_FAILED\x10\x04\x12\x18\n\x14\x46INISHED_UNSUPPORTED\x10\x05\x1a\x02\x10\x01\x42Q\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + DiscoveryNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DiscoveryNote").msgclass + DiscoveryOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DiscoveryOccurrence").msgclass + DiscoveryOccurrence::AnalysisCompleted = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DiscoveryOccurrence.AnalysisCompleted").msgclass + DiscoveryOccurrence::SBOMStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DiscoveryOccurrence.SBOMStatus").msgclass + DiscoveryOccurrence::SBOMStatus::SBOMState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DiscoveryOccurrence.SBOMStatus.SBOMState").enummodule + DiscoveryOccurrence::VulnerabilityAttestation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation").msgclass + DiscoveryOccurrence::VulnerabilityAttestation::VulnerabilityAttestationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.VulnerabilityAttestationState").enummodule + DiscoveryOccurrence::File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DiscoveryOccurrence.File").msgclass + DiscoveryOccurrence::ContinuousAnalysis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis").enummodule + DiscoveryOccurrence::AnalysisStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DiscoveryOccurrence.AnalysisStatus").enummodule + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/dsse_attestation_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/dsse_attestation_pb.rb new file mode 100644 index 000000000000..96a69f6b339b --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/dsse_attestation_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/dsse_attestation.proto + +require 'google/protobuf' + +require 'grafeas/v1/common_pb' +require 'grafeas/v1/intoto_statement_pb' + + +descriptor_data = "\n!grafeas/v1/dsse_attestation.proto\x12\ngrafeas.v1\x1a\x17grafeas/v1/common.proto\x1a!grafeas/v1/intoto_statement.proto\"v\n\x13\x44SSEAttestationNote\x12\x36\n\x04hint\x18\x01 \x01(\x0b\x32(.grafeas.v1.DSSEAttestationNote.DSSEHint\x1a\'\n\x08\x44SSEHint\x12\x1b\n\x13human_readable_name\x18\x01 \x01(\t\"\x88\x01\n\x19\x44SSEAttestationOccurrence\x12&\n\x08\x65nvelope\x18\x01 \x01(\x0b\x32\x14.grafeas.v1.Envelope\x12\x30\n\tstatement\x18\x02 \x01(\x0b\x32\x1b.grafeas.v1.InTotoStatementH\x00\x42\x11\n\x0f\x64\x65\x63oded_payloadBQ\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + DSSEAttestationNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DSSEAttestationNote").msgclass + DSSEAttestationNote::DSSEHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DSSEAttestationNote.DSSEHint").msgclass + DSSEAttestationOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DSSEAttestationOccurrence").msgclass + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas.rb new file mode 100644 index 000000000000..9210c381b5f8 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas.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 "grafeas/v1/version" + +require "grafeas/v1/grafeas/paths" +require "grafeas/v1/grafeas/client" + +module Grafeas + module V1 + ## + # [Grafeas](https://grafeas.io) API. + # + # Retrieves analysis results of Cloud components such as Docker container + # images. + # + # Analysis results are stored as a series of occurrences. An `Occurrence` + # contains information about a specific analysis instance on a resource. An + # occurrence refers to a `Note`. A note contains details describing the + # analysis and is generally stored in a separate project, called a `Provider`. + # Multiple occurrences can refer to the same note. + # + # For example, an SSL vulnerability could affect multiple images. In this case, + # there would be one note for the vulnerability and an occurrence for each + # image with the vulnerability referring to that note. + # + # @example Load this service and instantiate a gRPC client + # + # require "grafeas/v1/grafeas" + # client = ::Grafeas::V1::Grafeas::Client.new + # + module Grafeas + end + end +end + +helper_path = ::File.join __dir__, "grafeas", "helpers.rb" +require "grafeas/v1/grafeas/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas/client.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas/client.rb new file mode 100644 index 000000000000..013d9a50b78d --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas/client.rb @@ -0,0 +1,1810 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "grafeas/v1/grafeas_pb" + +module Grafeas + module V1 + module Grafeas + ## + # Client for the Grafeas service. + # + # [Grafeas](https://grafeas.io) API. + # + # Retrieves analysis results of Cloud components such as Docker container + # images. + # + # Analysis results are stored as a series of occurrences. An `Occurrence` + # contains information about a specific analysis instance on a resource. An + # occurrence refers to a `Note`. A note contains details describing the + # analysis and is generally stored in a separate project, called a `Provider`. + # Multiple occurrences can refer to the same note. + # + # For example, an SSL vulnerability could affect multiple images. In this case, + # there would be one note for the vulnerability and an occurrence for each + # image with the vulnerability referring to that note. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = nil + + include Paths + + # @private + attr_reader :grafeas_stub + + ## + # Configure the Grafeas Client class. + # + # See {::Grafeas::V1::Grafeas::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Grafeas clients + # ::Grafeas::V1::Grafeas::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Grafeas", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get 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_occurrence.timeout = 30.0 + default_config.rpcs.get_occurrence.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_occurrences.timeout = 30.0 + default_config.rpcs.list_occurrences.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_occurrence.timeout = 30.0 + default_config.rpcs.delete_occurrence.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_occurrence.timeout = 30.0 + + default_config.rpcs.batch_create_occurrences.timeout = 30.0 + + default_config.rpcs.update_occurrence.timeout = 30.0 + + default_config.rpcs.get_occurrence_note.timeout = 30.0 + default_config.rpcs.get_occurrence_note.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_note.timeout = 30.0 + default_config.rpcs.get_note.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_notes.timeout = 30.0 + default_config.rpcs.list_notes.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_note.timeout = 30.0 + default_config.rpcs.delete_note.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_note.timeout = 30.0 + + default_config.rpcs.batch_create_notes.timeout = 30.0 + + default_config.rpcs.update_note.timeout = 30.0 + + default_config.rpcs.list_note_occurrences.timeout = 30.0 + default_config.rpcs.list_note_occurrences.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Grafeas Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Grafeas::V1::Grafeas::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @grafeas_stub.universe_domain + end + + ## + # Create a new Grafeas client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Grafeas::V1::Grafeas::Client.new + # + # # Create a client using a custom configuration + # client = ::Grafeas::V1::Grafeas::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Grafeas 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 "grafeas/v1/grafeas_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 + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @grafeas_stub = ::Gapic::ServiceStub.new( + ::Grafeas::V1::Grafeas::Stub, + credentials: credentials, + endpoint: @config.endpoint, + 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 + ) + + @grafeas_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 + @grafeas_stub.logger + end + + # Service calls + + ## + # Gets the specified occurrence. + # + # @overload get_occurrence(request, options = nil) + # Pass arguments to `get_occurrence` via a request object, either of type + # {::Grafeas::V1::GetOccurrenceRequest} or an equivalent Hash. + # + # @param request [::Grafeas::V1::GetOccurrenceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_occurrence(name: nil) + # Pass arguments to `get_occurrence` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the occurrence in the form of + # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Grafeas::V1::Occurrence] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Grafeas::V1::Occurrence] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "grafeas/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Grafeas::V1::Grafeas::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Grafeas::V1::GetOccurrenceRequest.new + # + # # Call the get_occurrence method. + # result = client.get_occurrence request + # + # # The returned object is of type Grafeas::V1::Occurrence. + # p result + # + def get_occurrence request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::GetOccurrenceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_occurrence.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Grafeas::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_occurrence.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_occurrence.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @grafeas_stub.call_rpc :get_occurrence, request, 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 occurrences for the specified project. + # + # @overload list_occurrences(request, options = nil) + # Pass arguments to `list_occurrences` via a request object, either of type + # {::Grafeas::V1::ListOccurrencesRequest} or an equivalent Hash. + # + # @param request [::Grafeas::V1::ListOccurrencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_occurrences(parent: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_occurrences` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the project to list occurrences for in the form of + # `projects/[PROJECT_ID]`. + # @param filter [::String] + # The filter expression. + # @param page_size [::Integer] + # Number of occurrences to return in the list. Must be positive. Max allowed + # page size is 1000. If not specified, page size defaults to 20. + # @param page_token [::String] + # Token to provide to skip to a particular spot in the list. + # @param return_partial_success [::Boolean] + # If set, the request will return all reachable Occurrences + # and report all unreachable regions in the `unreachable` field in + # the response. + # + # Only applicable for requests in the global region. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Grafeas::V1::Occurrence>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Grafeas::V1::Occurrence>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "grafeas/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Grafeas::V1::Grafeas::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Grafeas::V1::ListOccurrencesRequest.new + # + # # Call the list_occurrences method. + # result = client.list_occurrences request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Grafeas::V1::Occurrence. + # p item + # end + # + def list_occurrences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::ListOccurrencesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_occurrences.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Grafeas::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_occurrences.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_occurrences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @grafeas_stub.call_rpc :list_occurrences, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @grafeas_stub, :list_occurrences, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified occurrence. For example, use this method to delete an + # occurrence when the occurrence is no longer applicable for the given + # resource. + # + # @overload delete_occurrence(request, options = nil) + # Pass arguments to `delete_occurrence` via a request object, either of type + # {::Grafeas::V1::DeleteOccurrenceRequest} or an equivalent Hash. + # + # @param request [::Grafeas::V1::DeleteOccurrenceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_occurrence(name: nil) + # Pass arguments to `delete_occurrence` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the occurrence in the form of + # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "grafeas/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Grafeas::V1::Grafeas::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Grafeas::V1::DeleteOccurrenceRequest.new + # + # # Call the delete_occurrence method. + # result = client.delete_occurrence request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_occurrence request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::DeleteOccurrenceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_occurrence.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Grafeas::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_occurrence.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_occurrence.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @grafeas_stub.call_rpc :delete_occurrence, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new occurrence. + # + # @overload create_occurrence(request, options = nil) + # Pass arguments to `create_occurrence` via a request object, either of type + # {::Grafeas::V1::CreateOccurrenceRequest} or an equivalent Hash. + # + # @param request [::Grafeas::V1::CreateOccurrenceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_occurrence(parent: nil, occurrence: nil) + # Pass arguments to `create_occurrence` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the project in the form of `projects/[PROJECT_ID]`, under which + # the occurrence is to be created. + # @param occurrence [::Grafeas::V1::Occurrence, ::Hash] + # The occurrence to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Grafeas::V1::Occurrence] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Grafeas::V1::Occurrence] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "grafeas/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Grafeas::V1::Grafeas::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Grafeas::V1::CreateOccurrenceRequest.new + # + # # Call the create_occurrence method. + # result = client.create_occurrence request + # + # # The returned object is of type Grafeas::V1::Occurrence. + # p result + # + def create_occurrence request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::CreateOccurrenceRequest + + # Converts hash and nil to 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_occurrence.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Grafeas::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_occurrence.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_occurrence.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @grafeas_stub.call_rpc :create_occurrence, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates new occurrences in batch. + # + # @overload batch_create_occurrences(request, options = nil) + # Pass arguments to `batch_create_occurrences` via a request object, either of type + # {::Grafeas::V1::BatchCreateOccurrencesRequest} or an equivalent Hash. + # + # @param request [::Grafeas::V1::BatchCreateOccurrencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_occurrences(parent: nil, occurrences: nil) + # Pass arguments to `batch_create_occurrences` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the project in the form of `projects/[PROJECT_ID]`, under which + # the occurrences are to be created. + # @param occurrences [::Array<::Grafeas::V1::Occurrence, ::Hash>] + # The occurrences to create. Max allowed length is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Grafeas::V1::BatchCreateOccurrencesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Grafeas::V1::BatchCreateOccurrencesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "grafeas/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Grafeas::V1::Grafeas::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Grafeas::V1::BatchCreateOccurrencesRequest.new + # + # # Call the batch_create_occurrences method. + # result = client.batch_create_occurrences request + # + # # The returned object is of type Grafeas::V1::BatchCreateOccurrencesResponse. + # p result + # + def batch_create_occurrences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::BatchCreateOccurrencesRequest + + # Converts hash and nil to 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_occurrences.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Grafeas::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_occurrences.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_create_occurrences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @grafeas_stub.call_rpc :batch_create_occurrences, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified occurrence. + # + # @overload update_occurrence(request, options = nil) + # Pass arguments to `update_occurrence` via a request object, either of type + # {::Grafeas::V1::UpdateOccurrenceRequest} or an equivalent Hash. + # + # @param request [::Grafeas::V1::UpdateOccurrenceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_occurrence(name: nil, occurrence: nil, update_mask: nil) + # Pass arguments to `update_occurrence` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the occurrence in the form of + # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + # @param occurrence [::Grafeas::V1::Occurrence, ::Hash] + # The updated occurrence. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The fields to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Grafeas::V1::Occurrence] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Grafeas::V1::Occurrence] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "grafeas/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Grafeas::V1::Grafeas::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Grafeas::V1::UpdateOccurrenceRequest.new + # + # # Call the update_occurrence method. + # result = client.update_occurrence request + # + # # The returned object is of type Grafeas::V1::Occurrence. + # p result + # + def update_occurrence request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::UpdateOccurrenceRequest + + # Converts hash and nil to 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_occurrence.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Grafeas::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_occurrence.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_occurrence.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @grafeas_stub.call_rpc :update_occurrence, request, 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 note attached to the specified occurrence. Consumer projects can + # use this method to get a note that belongs to a provider project. + # + # @overload get_occurrence_note(request, options = nil) + # Pass arguments to `get_occurrence_note` via a request object, either of type + # {::Grafeas::V1::GetOccurrenceNoteRequest} or an equivalent Hash. + # + # @param request [::Grafeas::V1::GetOccurrenceNoteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_occurrence_note(name: nil) + # Pass arguments to `get_occurrence_note` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the occurrence in the form of + # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Grafeas::V1::Note] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Grafeas::V1::Note] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "grafeas/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Grafeas::V1::Grafeas::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Grafeas::V1::GetOccurrenceNoteRequest.new + # + # # Call the get_occurrence_note method. + # result = client.get_occurrence_note request + # + # # The returned object is of type Grafeas::V1::Note. + # p result + # + def get_occurrence_note request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::GetOccurrenceNoteRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_occurrence_note.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Grafeas::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_occurrence_note.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_occurrence_note.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @grafeas_stub.call_rpc :get_occurrence_note, request, 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 specified note. + # + # @overload get_note(request, options = nil) + # Pass arguments to `get_note` via a request object, either of type + # {::Grafeas::V1::GetNoteRequest} or an equivalent Hash. + # + # @param request [::Grafeas::V1::GetNoteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_note(name: nil) + # Pass arguments to `get_note` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the note in the form of + # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Grafeas::V1::Note] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Grafeas::V1::Note] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "grafeas/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Grafeas::V1::Grafeas::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Grafeas::V1::GetNoteRequest.new + # + # # Call the get_note method. + # result = client.get_note request + # + # # The returned object is of type Grafeas::V1::Note. + # p result + # + def get_note request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::GetNoteRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_note.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Grafeas::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_note.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_note.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @grafeas_stub.call_rpc :get_note, request, 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 notes for the specified project. + # + # @overload list_notes(request, options = nil) + # Pass arguments to `list_notes` via a request object, either of type + # {::Grafeas::V1::ListNotesRequest} or an equivalent Hash. + # + # @param request [::Grafeas::V1::ListNotesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_notes(parent: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_notes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the project to list notes for in the form of + # `projects/[PROJECT_ID]`. + # @param filter [::String] + # The filter expression. + # @param page_size [::Integer] + # Number of notes to return in the list. Must be positive. Max allowed page + # size is 1000. If not specified, page size defaults to 20. + # @param page_token [::String] + # Token to provide to skip to a particular spot in the list. + # @param return_partial_success [::Boolean] + # If set, the request will return all reachable Notes + # and report all unreachable regions in the `unreachable` field in + # the response. + # + # Only applicable for requests in the global region. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Grafeas::V1::Note>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Grafeas::V1::Note>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "grafeas/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Grafeas::V1::Grafeas::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Grafeas::V1::ListNotesRequest.new + # + # # Call the list_notes method. + # result = client.list_notes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Grafeas::V1::Note. + # p item + # end + # + def list_notes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::ListNotesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_notes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Grafeas::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_notes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_notes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @grafeas_stub.call_rpc :list_notes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @grafeas_stub, :list_notes, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified note. + # + # @overload delete_note(request, options = nil) + # Pass arguments to `delete_note` via a request object, either of type + # {::Grafeas::V1::DeleteNoteRequest} or an equivalent Hash. + # + # @param request [::Grafeas::V1::DeleteNoteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_note(name: nil) + # Pass arguments to `delete_note` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the note in the form of + # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "grafeas/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Grafeas::V1::Grafeas::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Grafeas::V1::DeleteNoteRequest.new + # + # # Call the delete_note method. + # result = client.delete_note request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_note request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::DeleteNoteRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_note.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Grafeas::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_note.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_note.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @grafeas_stub.call_rpc :delete_note, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new note. + # + # @overload create_note(request, options = nil) + # Pass arguments to `create_note` via a request object, either of type + # {::Grafeas::V1::CreateNoteRequest} or an equivalent Hash. + # + # @param request [::Grafeas::V1::CreateNoteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_note(parent: nil, note_id: nil, note: nil) + # Pass arguments to `create_note` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the project in the form of `projects/[PROJECT_ID]`, under which + # the note is to be created. + # @param note_id [::String] + # The ID to use for this note. + # @param note [::Grafeas::V1::Note, ::Hash] + # The note to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Grafeas::V1::Note] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Grafeas::V1::Note] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "grafeas/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Grafeas::V1::Grafeas::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Grafeas::V1::CreateNoteRequest.new + # + # # Call the create_note method. + # result = client.create_note request + # + # # The returned object is of type Grafeas::V1::Note. + # p result + # + def create_note request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::CreateNoteRequest + + # Converts hash and nil to 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_note.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Grafeas::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_note.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_note.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @grafeas_stub.call_rpc :create_note, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates new notes in batch. + # + # @overload batch_create_notes(request, options = nil) + # Pass arguments to `batch_create_notes` via a request object, either of type + # {::Grafeas::V1::BatchCreateNotesRequest} or an equivalent Hash. + # + # @param request [::Grafeas::V1::BatchCreateNotesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_notes(parent: nil, notes: nil) + # Pass arguments to `batch_create_notes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The name of the project in the form of `projects/[PROJECT_ID]`, under which + # the notes are to be created. + # @param notes [::Hash{::String => ::Grafeas::V1::Note, ::Hash}] + # The notes to create. Max allowed length is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Grafeas::V1::BatchCreateNotesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Grafeas::V1::BatchCreateNotesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "grafeas/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Grafeas::V1::Grafeas::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Grafeas::V1::BatchCreateNotesRequest.new + # + # # Call the batch_create_notes method. + # result = client.batch_create_notes request + # + # # The returned object is of type Grafeas::V1::BatchCreateNotesResponse. + # p result + # + def batch_create_notes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::BatchCreateNotesRequest + + # Converts hash and nil to 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_notes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Grafeas::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_notes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_create_notes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @grafeas_stub.call_rpc :batch_create_notes, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the specified note. + # + # @overload update_note(request, options = nil) + # Pass arguments to `update_note` via a request object, either of type + # {::Grafeas::V1::UpdateNoteRequest} or an equivalent Hash. + # + # @param request [::Grafeas::V1::UpdateNoteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_note(name: nil, note: nil, update_mask: nil) + # Pass arguments to `update_note` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the note in the form of + # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + # @param note [::Grafeas::V1::Note, ::Hash] + # The updated note. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The fields to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Grafeas::V1::Note] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Grafeas::V1::Note] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "grafeas/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Grafeas::V1::Grafeas::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Grafeas::V1::UpdateNoteRequest.new + # + # # Call the update_note method. + # result = client.update_note request + # + # # The returned object is of type Grafeas::V1::Note. + # p result + # + def update_note request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::UpdateNoteRequest + + # Converts hash and nil to 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_note.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Grafeas::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_note.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_note.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @grafeas_stub.call_rpc :update_note, request, 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 occurrences referencing the specified note. Provider projects can use + # this method to get all occurrences across consumer projects referencing the + # specified note. + # + # @overload list_note_occurrences(request, options = nil) + # Pass arguments to `list_note_occurrences` via a request object, either of type + # {::Grafeas::V1::ListNoteOccurrencesRequest} or an equivalent Hash. + # + # @param request [::Grafeas::V1::ListNoteOccurrencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_note_occurrences(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_note_occurrences` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the note to list occurrences for in the form of + # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + # @param filter [::String] + # The filter expression. + # @param page_size [::Integer] + # Number of occurrences to return in the list. + # @param page_token [::String] + # Token to provide to skip to a particular spot in the list. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Grafeas::V1::Occurrence>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Grafeas::V1::Occurrence>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "grafeas/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Grafeas::V1::Grafeas::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Grafeas::V1::ListNoteOccurrencesRequest.new + # + # # Call the list_note_occurrences method. + # result = client.list_note_occurrences request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Grafeas::V1::Occurrence. + # p item + # end + # + def list_note_occurrences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::ListNoteOccurrencesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_note_occurrences.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Grafeas::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_note_occurrences.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_note_occurrences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @grafeas_stub.call_rpc :list_note_occurrences, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @grafeas_stub, :list_note_occurrences, request, response, 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 Grafeas API. + # + # This class represents the configuration for Grafeas, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Grafeas::V1::Grafeas::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_occurrence to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Grafeas::V1::Grafeas::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_occurrence.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Grafeas::V1::Grafeas::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_occurrence.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Grafeas::V1::Grafeas::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = nil + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Grafeas API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_occurrence` + # @return [::Gapic::Config::Method] + # + attr_reader :get_occurrence + ## + # RPC-specific configuration for `list_occurrences` + # @return [::Gapic::Config::Method] + # + attr_reader :list_occurrences + ## + # RPC-specific configuration for `delete_occurrence` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_occurrence + ## + # RPC-specific configuration for `create_occurrence` + # @return [::Gapic::Config::Method] + # + attr_reader :create_occurrence + ## + # RPC-specific configuration for `batch_create_occurrences` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_occurrences + ## + # RPC-specific configuration for `update_occurrence` + # @return [::Gapic::Config::Method] + # + attr_reader :update_occurrence + ## + # RPC-specific configuration for `get_occurrence_note` + # @return [::Gapic::Config::Method] + # + attr_reader :get_occurrence_note + ## + # RPC-specific configuration for `get_note` + # @return [::Gapic::Config::Method] + # + attr_reader :get_note + ## + # RPC-specific configuration for `list_notes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_notes + ## + # RPC-specific configuration for `delete_note` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_note + ## + # RPC-specific configuration for `create_note` + # @return [::Gapic::Config::Method] + # + attr_reader :create_note + ## + # RPC-specific configuration for `batch_create_notes` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_notes + ## + # RPC-specific configuration for `update_note` + # @return [::Gapic::Config::Method] + # + attr_reader :update_note + ## + # RPC-specific configuration for `list_note_occurrences` + # @return [::Gapic::Config::Method] + # + attr_reader :list_note_occurrences + + # @private + def initialize parent_rpcs = nil + get_occurrence_config = parent_rpcs.get_occurrence if parent_rpcs.respond_to? :get_occurrence + @get_occurrence = ::Gapic::Config::Method.new get_occurrence_config + list_occurrences_config = parent_rpcs.list_occurrences if parent_rpcs.respond_to? :list_occurrences + @list_occurrences = ::Gapic::Config::Method.new list_occurrences_config + delete_occurrence_config = parent_rpcs.delete_occurrence if parent_rpcs.respond_to? :delete_occurrence + @delete_occurrence = ::Gapic::Config::Method.new delete_occurrence_config + create_occurrence_config = parent_rpcs.create_occurrence if parent_rpcs.respond_to? :create_occurrence + @create_occurrence = ::Gapic::Config::Method.new create_occurrence_config + batch_create_occurrences_config = parent_rpcs.batch_create_occurrences if parent_rpcs.respond_to? :batch_create_occurrences + @batch_create_occurrences = ::Gapic::Config::Method.new batch_create_occurrences_config + update_occurrence_config = parent_rpcs.update_occurrence if parent_rpcs.respond_to? :update_occurrence + @update_occurrence = ::Gapic::Config::Method.new update_occurrence_config + get_occurrence_note_config = parent_rpcs.get_occurrence_note if parent_rpcs.respond_to? :get_occurrence_note + @get_occurrence_note = ::Gapic::Config::Method.new get_occurrence_note_config + get_note_config = parent_rpcs.get_note if parent_rpcs.respond_to? :get_note + @get_note = ::Gapic::Config::Method.new get_note_config + list_notes_config = parent_rpcs.list_notes if parent_rpcs.respond_to? :list_notes + @list_notes = ::Gapic::Config::Method.new list_notes_config + delete_note_config = parent_rpcs.delete_note if parent_rpcs.respond_to? :delete_note + @delete_note = ::Gapic::Config::Method.new delete_note_config + create_note_config = parent_rpcs.create_note if parent_rpcs.respond_to? :create_note + @create_note = ::Gapic::Config::Method.new create_note_config + batch_create_notes_config = parent_rpcs.batch_create_notes if parent_rpcs.respond_to? :batch_create_notes + @batch_create_notes = ::Gapic::Config::Method.new batch_create_notes_config + update_note_config = parent_rpcs.update_note if parent_rpcs.respond_to? :update_note + @update_note = ::Gapic::Config::Method.new update_note_config + list_note_occurrences_config = parent_rpcs.list_note_occurrences if parent_rpcs.respond_to? :list_note_occurrences + @list_note_occurrences = ::Gapic::Config::Method.new list_note_occurrences_config + + yield self if block_given? + end + end + end + end + end + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas/paths.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas/paths.rb new file mode 100644 index 000000000000..60475490d391 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas/paths.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 Grafeas + module V1 + module Grafeas + # Path helper methods for the Grafeas API. + module Paths + ## + # Create a fully-qualified Note resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/notes/{note}` + # + # @param project [String] + # @param note [String] + # + # @return [::String] + def note_path project:, note: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/notes/#{note}" + end + + ## + # Create a fully-qualified Occurrence resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/occurrences/{occurrence}` + # + # @param project [String] + # @param occurrence [String] + # + # @return [::String] + def occurrence_path project:, occurrence: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/occurrences/#{occurrence}" + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + extend self + end + end + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas_pb.rb new file mode 100644 index 000000000000..f098a03d4b09 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas_pb.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/grafeas.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 'grafeas/v1/attestation_pb' +require 'grafeas/v1/build_pb' +require 'grafeas/v1/common_pb' +require 'grafeas/v1/compliance_pb' +require 'grafeas/v1/deployment_pb' +require 'grafeas/v1/discovery_pb' +require 'grafeas/v1/dsse_attestation_pb' +require 'grafeas/v1/image_pb' +require 'grafeas/v1/package_pb' +require 'grafeas/v1/sbom_pb' +require 'grafeas/v1/secret_pb' +require 'grafeas/v1/upgrade_pb' +require 'grafeas/v1/vex_pb' +require 'grafeas/v1/vulnerability_pb' + + +descriptor_data = "\n\x18grafeas/v1/grafeas.proto\x12\ngrafeas.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\x1cgrafeas/v1/attestation.proto\x1a\x16grafeas/v1/build.proto\x1a\x17grafeas/v1/common.proto\x1a\x1bgrafeas/v1/compliance.proto\x1a\x1bgrafeas/v1/deployment.proto\x1a\x1agrafeas/v1/discovery.proto\x1a!grafeas/v1/dsse_attestation.proto\x1a\x16grafeas/v1/image.proto\x1a\x18grafeas/v1/package.proto\x1a\x15grafeas/v1/sbom.proto\x1a\x17grafeas/v1/secret.proto\x1a\x18grafeas/v1/upgrade.proto\x1a\x14grafeas/v1/vex.proto\x1a\x1egrafeas/v1/vulnerability.proto\"\xea\x07\n\nOccurrence\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cresource_uri\x18\x02 \x01(\t\x12\x11\n\tnote_name\x18\x03 \x01(\t\x12\"\n\x04kind\x18\x04 \x01(\x0e\x32\x14.grafeas.v1.NoteKind\x12\x13\n\x0bremediation\x18\x05 \x01(\t\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\rvulnerability\x18\x08 \x01(\x0b\x32#.grafeas.v1.VulnerabilityOccurrenceH\x00\x12,\n\x05\x62uild\x18\t \x01(\x0b\x32\x1b.grafeas.v1.BuildOccurrenceH\x00\x12,\n\x05image\x18\n \x01(\x0b\x32\x1b.grafeas.v1.ImageOccurrenceH\x00\x12\x30\n\x07package\x18\x0b \x01(\x0b\x32\x1d.grafeas.v1.PackageOccurrenceH\x00\x12\x36\n\ndeployment\x18\x0c \x01(\x0b\x32 .grafeas.v1.DeploymentOccurrenceH\x00\x12\x34\n\tdiscovery\x18\r \x01(\x0b\x32\x1f.grafeas.v1.DiscoveryOccurrenceH\x00\x12\x38\n\x0b\x61ttestation\x18\x0e \x01(\x0b\x32!.grafeas.v1.AttestationOccurrenceH\x00\x12\x30\n\x07upgrade\x18\x0f \x01(\x0b\x32\x1d.grafeas.v1.UpgradeOccurrenceH\x00\x12\x36\n\ncompliance\x18\x10 \x01(\x0b\x32 .grafeas.v1.ComplianceOccurrenceH\x00\x12\x41\n\x10\x64sse_attestation\x18\x11 \x01(\x0b\x32%.grafeas.v1.DSSEAttestationOccurrenceH\x00\x12=\n\x0esbom_reference\x18\x13 \x01(\x0b\x32#.grafeas.v1.SBOMReferenceOccurrenceH\x00\x12.\n\x06secret\x18\x14 \x01(\x0b\x32\x1c.grafeas.v1.SecretOccurrenceH\x00\x12&\n\x08\x65nvelope\x18\x12 \x01(\x0b\x32\x14.grafeas.v1.Envelope:G\xea\x41\x44\n\x15grafeas.io/Occurrence\x12+projects/{project}/occurrences/{occurrence}B\t\n\x07\x64\x65tails\"\xa1\x08\n\x04Note\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x11short_description\x18\x02 \x01(\t\x12\x18\n\x10long_description\x18\x03 \x01(\t\x12\"\n\x04kind\x18\x04 \x01(\x0e\x32\x14.grafeas.v1.NoteKind\x12+\n\x0brelated_url\x18\x05 \x03(\x0b\x32\x16.grafeas.v1.RelatedUrl\x12\x33\n\x0f\x65xpiration_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12related_note_names\x18\t \x03(\t\x12\x36\n\rvulnerability\x18\n \x01(\x0b\x32\x1d.grafeas.v1.VulnerabilityNoteH\x00\x12&\n\x05\x62uild\x18\x0b \x01(\x0b\x32\x15.grafeas.v1.BuildNoteH\x00\x12&\n\x05image\x18\x0c \x01(\x0b\x32\x15.grafeas.v1.ImageNoteH\x00\x12*\n\x07package\x18\r \x01(\x0b\x32\x17.grafeas.v1.PackageNoteH\x00\x12\x30\n\ndeployment\x18\x0e \x01(\x0b\x32\x1a.grafeas.v1.DeploymentNoteH\x00\x12.\n\tdiscovery\x18\x0f \x01(\x0b\x32\x19.grafeas.v1.DiscoveryNoteH\x00\x12\x32\n\x0b\x61ttestation\x18\x10 \x01(\x0b\x32\x1b.grafeas.v1.AttestationNoteH\x00\x12*\n\x07upgrade\x18\x11 \x01(\x0b\x32\x17.grafeas.v1.UpgradeNoteH\x00\x12\x30\n\ncompliance\x18\x12 \x01(\x0b\x32\x1a.grafeas.v1.ComplianceNoteH\x00\x12;\n\x10\x64sse_attestation\x18\x13 \x01(\x0b\x32\x1f.grafeas.v1.DSSEAttestationNoteH\x00\x12K\n\x18vulnerability_assessment\x18\x14 \x01(\x0b\x32\'.grafeas.v1.VulnerabilityAssessmentNoteH\x00\x12\x37\n\x0esbom_reference\x18\x15 \x01(\x0b\x32\x1d.grafeas.v1.SBOMReferenceNoteH\x00\x12(\n\x06secret\x18\x16 \x01(\x0b\x32\x16.grafeas.v1.SecretNoteH\x00:5\xea\x41\x32\n\x0fgrafeas.io/Note\x12\x1fprojects/{project}/notes/{note}B\x06\n\x04type\"C\n\x14GetOccurrenceRequest\x12+\n\x04name\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15grafeas.io/Occurrence\"\x9b\x01\n\x16ListOccurrencesRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x1e\n\x16return_partial_success\x18\x05 \x01(\x08\"y\n\x17ListOccurrencesResponse\x12+\n\x0boccurrences\x18\x01 \x03(\x0b\x32\x16.grafeas.v1.Occurrence\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"F\n\x17\x44\x65leteOccurrenceRequest\x12+\n\x04name\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15grafeas.io/Occurrence\"v\n\x17\x43reateOccurrenceRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12/\n\noccurrence\x18\x02 \x01(\x0b\x32\x16.grafeas.v1.OccurrenceB\x03\xe0\x41\x02\"\xa8\x01\n\x17UpdateOccurrenceRequest\x12+\n\x04name\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15grafeas.io/Occurrence\x12/\n\noccurrence\x18\x02 \x01(\x0b\x32\x16.grafeas.v1.OccurrenceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"7\n\x0eGetNoteRequest\x12%\n\x04name\x18\x01 \x01(\tB\x17\xe0\x41\x02\xfa\x41\x11\n\x0fgrafeas.io/Note\"G\n\x18GetOccurrenceNoteRequest\x12+\n\x04name\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15grafeas.io/Occurrence\"\x95\x01\n\x10ListNotesRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x1e\n\x16return_partial_success\x18\x05 \x01(\x08\"g\n\x11ListNotesResponse\x12\x1f\n\x05notes\x18\x01 \x03(\x0b\x32\x10.grafeas.v1.Note\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\":\n\x11\x44\x65leteNoteRequest\x12%\n\x04name\x18\x01 \x01(\tB\x17\xe0\x41\x02\xfa\x41\x11\n\x0fgrafeas.io/Note\"z\n\x11\x43reateNoteRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12\x14\n\x07note_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12#\n\x04note\x18\x03 \x01(\x0b\x32\x10.grafeas.v1.NoteB\x03\xe0\x41\x02\"\x90\x01\n\x11UpdateNoteRequest\x12%\n\x04name\x18\x01 \x01(\tB\x17\xe0\x41\x02\xfa\x41\x11\n\x0fgrafeas.io/Note\x12#\n\x04note\x18\x02 \x01(\x0b\x32\x10.grafeas.v1.NoteB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"z\n\x1aListNoteOccurrencesRequest\x12%\n\x04name\x18\x01 \x01(\tB\x17\xe0\x41\x02\xfa\x41\x11\n\x0fgrafeas.io/Note\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"c\n\x1bListNoteOccurrencesResponse\x12+\n\x0boccurrences\x18\x01 \x03(\x0b\x32\x16.grafeas.v1.Occurrence\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc9\x01\n\x17\x42\x61tchCreateNotesRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12\x42\n\x05notes\x18\x02 \x03(\x0b\x32..grafeas.v1.BatchCreateNotesRequest.NotesEntryB\x03\xe0\x41\x02\x1a>\n\nNotesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1f\n\x05value\x18\x02 \x01(\x0b\x32\x10.grafeas.v1.Note:\x02\x38\x01\";\n\x18\x42\x61tchCreateNotesResponse\x12\x1f\n\x05notes\x18\x01 \x03(\x0b\x32\x10.grafeas.v1.Note\"}\n\x1d\x42\x61tchCreateOccurrencesRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12\x30\n\x0boccurrences\x18\x02 \x03(\x0b\x32\x16.grafeas.v1.OccurrenceB\x03\xe0\x41\x02\"M\n\x1e\x42\x61tchCreateOccurrencesResponse\x12+\n\x0boccurrences\x18\x01 \x03(\x0b\x32\x16.grafeas.v1.Occurrence2\x8d\x16\n\x07Grafeas\x12\xb0\x01\n\rGetOccurrence\x12 .grafeas.v1.GetOccurrenceRequest\x1a\x16.grafeas.v1.Occurrence\"e\xda\x41\x04name\x82\xd3\xe4\x93\x02X\x12#/v1/{name=projects/*/occurrences/*}Z1\x12//v1/{name=projects/*/locations/*/occurrences/*}\x12\xca\x01\n\x0fListOccurrences\x12\".grafeas.v1.ListOccurrencesRequest\x1a#.grafeas.v1.ListOccurrencesResponse\"n\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02X\x12#/v1/{parent=projects/*}/occurrencesZ1\x12//v1/{parent=projects/*/locations/*}/occurrences\x12\xb6\x01\n\x10\x44\x65leteOccurrence\x12#.grafeas.v1.DeleteOccurrenceRequest\x1a\x16.google.protobuf.Empty\"e\xda\x41\x04name\x82\xd3\xe4\x93\x02X*#/v1/{name=projects/*/occurrences/*}Z1*//v1/{name=projects/*/locations/*/occurrences/*}\x12\xdc\x01\n\x10\x43reateOccurrence\x12#.grafeas.v1.CreateOccurrenceRequest\x1a\x16.grafeas.v1.Occurrence\"\x8a\x01\xda\x41\x11parent,occurrence\x82\xd3\xe4\x93\x02p\"#/v1/{parent=projects/*}/occurrences:\noccurrenceZ=\"//v1/{parent=projects/*/locations/*}/occurrences:\noccurrence\x12\x83\x02\n\x16\x42\x61tchCreateOccurrences\x12).grafeas.v1.BatchCreateOccurrencesRequest\x1a*.grafeas.v1.BatchCreateOccurrencesResponse\"\x91\x01\xda\x41\x12parent,occurrences\x82\xd3\xe4\x93\x02v\"//v1/{parent=projects/*}/occurrences:batchCreate:\x01*Z@\";/v1/{parent=projects/*/locations/*}/occurrences:batchCreate:\x01*\x12\xe6\x01\n\x10UpdateOccurrence\x12#.grafeas.v1.UpdateOccurrenceRequest\x1a\x16.grafeas.v1.Occurrence\"\x94\x01\xda\x41\x1bname,occurrence,update_mask\x82\xd3\xe4\x93\x02p2#/v1/{name=projects/*/occurrences/*}:\noccurrenceZ=2//v1/{name=projects/*/locations/*/occurrences/*}:\noccurrence\x12\xbe\x01\n\x11GetOccurrenceNote\x12$.grafeas.v1.GetOccurrenceNoteRequest\x1a\x10.grafeas.v1.Note\"q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x64\x12)/v1/{name=projects/*/occurrences/*}/notesZ7\x12\x35/v1/{name=projects/*/locations/*/occurrences/*}/notes\x12\x92\x01\n\x07GetNote\x12\x1a.grafeas.v1.GetNoteRequest\x1a\x10.grafeas.v1.Note\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L\x12\x1d/v1/{name=projects/*/notes/*}Z+\x12)/v1/{name=projects/*/locations/*/notes/*}\x12\xac\x01\n\tListNotes\x12\x1c.grafeas.v1.ListNotesRequest\x1a\x1d.grafeas.v1.ListNotesResponse\"b\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02L\x12\x1d/v1/{parent=projects/*}/notesZ+\x12)/v1/{parent=projects/*/locations/*}/notes\x12\x9e\x01\n\nDeleteNote\x12\x1d.grafeas.v1.DeleteNoteRequest\x1a\x16.google.protobuf.Empty\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L*\x1d/v1/{name=projects/*/notes/*}Z+*)/v1/{name=projects/*/locations/*/notes/*}\x12\xb3\x01\n\nCreateNote\x12\x1d.grafeas.v1.CreateNoteRequest\x1a\x10.grafeas.v1.Note\"t\xda\x41\x13parent,note_id,note\x82\xd3\xe4\x93\x02X\"\x1d/v1/{parent=projects/*}/notes:\x04noteZ1\")/v1/{parent=projects/*/locations/*}/notes:\x04note\x12\xde\x01\n\x10\x42\x61tchCreateNotes\x12#.grafeas.v1.BatchCreateNotesRequest\x1a$.grafeas.v1.BatchCreateNotesResponse\"\x7f\xda\x41\x0cparent,notes\x82\xd3\xe4\x93\x02j\")/v1/{parent=projects/*}/notes:batchCreate:\x01*Z:\"5/v1/{parent=projects/*/locations/*}/notes:batchCreate:\x01*\x12\xb5\x01\n\nUpdateNote\x12\x1d.grafeas.v1.UpdateNoteRequest\x1a\x10.grafeas.v1.Note\"v\xda\x41\x15name,note,update_mask\x82\xd3\xe4\x93\x02X2\x1d/v1/{name=projects/*/notes/*}:\x04noteZ12)/v1/{name=projects/*/locations/*/notes/*}:\x04note\x12\xe0\x01\n\x13ListNoteOccurrences\x12&.grafeas.v1.ListNoteOccurrencesRequest\x1a\'.grafeas.v1.ListNoteOccurrencesResponse\"x\xda\x41\x0bname,filter\x82\xd3\xe4\x93\x02\x64\x12)/v1/{name=projects/*/notes/*}/occurrencesZ7\x12\x35/v1/{name=projects/*/locations/*/notes/*}/occurrences\x1a#\xca\x41 containeranalysis.googleapis.comB|\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRA\xea\x41(\n\x12grafeas.io/Project\x12\x12projects/{project}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + Occurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Occurrence").msgclass + Note = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Note").msgclass + GetOccurrenceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.GetOccurrenceRequest").msgclass + ListOccurrencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ListOccurrencesRequest").msgclass + ListOccurrencesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ListOccurrencesResponse").msgclass + DeleteOccurrenceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DeleteOccurrenceRequest").msgclass + CreateOccurrenceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CreateOccurrenceRequest").msgclass + UpdateOccurrenceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.UpdateOccurrenceRequest").msgclass + GetNoteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.GetNoteRequest").msgclass + GetOccurrenceNoteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.GetOccurrenceNoteRequest").msgclass + ListNotesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ListNotesRequest").msgclass + ListNotesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ListNotesResponse").msgclass + DeleteNoteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DeleteNoteRequest").msgclass + CreateNoteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CreateNoteRequest").msgclass + UpdateNoteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.UpdateNoteRequest").msgclass + ListNoteOccurrencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ListNoteOccurrencesRequest").msgclass + ListNoteOccurrencesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ListNoteOccurrencesResponse").msgclass + BatchCreateNotesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.BatchCreateNotesRequest").msgclass + BatchCreateNotesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.BatchCreateNotesResponse").msgclass + BatchCreateOccurrencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.BatchCreateOccurrencesRequest").msgclass + BatchCreateOccurrencesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.BatchCreateOccurrencesResponse").msgclass + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas_services_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas_services_pb.rb new file mode 100644 index 000000000000..aeed0fe3020b --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas_services_pb.rb @@ -0,0 +1,85 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: grafeas/v1/grafeas.proto for package 'grafeas.v1' +# Original file comments: +# Copyright 2019 The Grafeas Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 'grafeas/v1/grafeas_pb' + +module Grafeas + module V1 + module Grafeas + # [Grafeas](https://grafeas.io) API. + # + # Retrieves analysis results of Cloud components such as Docker container + # images. + # + # Analysis results are stored as a series of occurrences. An `Occurrence` + # contains information about a specific analysis instance on a resource. An + # occurrence refers to a `Note`. A note contains details describing the + # analysis and is generally stored in a separate project, called a `Provider`. + # Multiple occurrences can refer to the same note. + # + # For example, an SSL vulnerability could affect multiple images. In this case, + # there would be one note for the vulnerability and an occurrence for each + # image with the vulnerability referring to that note. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'grafeas.v1.Grafeas' + + # Gets the specified occurrence. + rpc :GetOccurrence, ::Grafeas::V1::GetOccurrenceRequest, ::Grafeas::V1::Occurrence + # Lists occurrences for the specified project. + rpc :ListOccurrences, ::Grafeas::V1::ListOccurrencesRequest, ::Grafeas::V1::ListOccurrencesResponse + # Deletes the specified occurrence. For example, use this method to delete an + # occurrence when the occurrence is no longer applicable for the given + # resource. + rpc :DeleteOccurrence, ::Grafeas::V1::DeleteOccurrenceRequest, ::Google::Protobuf::Empty + # Creates a new occurrence. + rpc :CreateOccurrence, ::Grafeas::V1::CreateOccurrenceRequest, ::Grafeas::V1::Occurrence + # Creates new occurrences in batch. + rpc :BatchCreateOccurrences, ::Grafeas::V1::BatchCreateOccurrencesRequest, ::Grafeas::V1::BatchCreateOccurrencesResponse + # Updates the specified occurrence. + rpc :UpdateOccurrence, ::Grafeas::V1::UpdateOccurrenceRequest, ::Grafeas::V1::Occurrence + # Gets the note attached to the specified occurrence. Consumer projects can + # use this method to get a note that belongs to a provider project. + rpc :GetOccurrenceNote, ::Grafeas::V1::GetOccurrenceNoteRequest, ::Grafeas::V1::Note + # Gets the specified note. + rpc :GetNote, ::Grafeas::V1::GetNoteRequest, ::Grafeas::V1::Note + # Lists notes for the specified project. + rpc :ListNotes, ::Grafeas::V1::ListNotesRequest, ::Grafeas::V1::ListNotesResponse + # Deletes the specified note. + rpc :DeleteNote, ::Grafeas::V1::DeleteNoteRequest, ::Google::Protobuf::Empty + # Creates a new note. + rpc :CreateNote, ::Grafeas::V1::CreateNoteRequest, ::Grafeas::V1::Note + # Creates new notes in batch. + rpc :BatchCreateNotes, ::Grafeas::V1::BatchCreateNotesRequest, ::Grafeas::V1::BatchCreateNotesResponse + # Updates the specified note. + rpc :UpdateNote, ::Grafeas::V1::UpdateNoteRequest, ::Grafeas::V1::Note + # Lists occurrences referencing the specified note. Provider projects can use + # this method to get all occurrences across consumer projects referencing the + # specified note. + rpc :ListNoteOccurrences, ::Grafeas::V1::ListNoteOccurrencesRequest, ::Grafeas::V1::ListNoteOccurrencesResponse + end + + Stub = Service.rpc_stub_class + end + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/image_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/image_pb.rb new file mode 100644 index 000000000000..3737d2c9f5a9 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/image_pb.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/image.proto + +require 'google/protobuf' + + +descriptor_data = "\n\x16grafeas/v1/image.proto\x12\ngrafeas.v1\"-\n\x05Layer\x12\x11\n\tdirective\x18\x01 \x01(\t\x12\x11\n\targuments\x18\x02 \x01(\t\"@\n\x0b\x46ingerprint\x12\x0f\n\x07v1_name\x18\x01 \x01(\t\x12\x0f\n\x07v2_blob\x18\x02 \x03(\t\x12\x0f\n\x07v2_name\x18\x03 \x01(\t\"O\n\tImageNote\x12\x14\n\x0cresource_url\x18\x01 \x01(\t\x12,\n\x0b\x66ingerprint\x18\x02 \x01(\x0b\x32\x17.grafeas.v1.Fingerprint\"\x93\x01\n\x0fImageOccurrence\x12,\n\x0b\x66ingerprint\x18\x01 \x01(\x0b\x32\x17.grafeas.v1.Fingerprint\x12\x10\n\x08\x64istance\x18\x02 \x01(\x05\x12%\n\nlayer_info\x18\x03 \x03(\x0b\x32\x11.grafeas.v1.Layer\x12\x19\n\x11\x62\x61se_resource_url\x18\x04 \x01(\tBQ\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + Layer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Layer").msgclass + Fingerprint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Fingerprint").msgclass + ImageNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ImageNote").msgclass + ImageOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ImageOccurrence").msgclass + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/intoto_provenance_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/intoto_provenance_pb.rb new file mode 100644 index 000000000000..f8c2e16c13ed --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/intoto_provenance_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/intoto_provenance.proto + +require 'google/protobuf' + +require 'google/protobuf/any_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\"grafeas/v1/intoto_provenance.proto\x12\ngrafeas.v1\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9c\x01\n\x06Recipe\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x1b\n\x13\x64\x65\x66ined_in_material\x18\x02 \x01(\x03\x12\x13\n\x0b\x65ntry_point\x18\x03 \x01(\t\x12\'\n\targuments\x18\x04 \x03(\x0b\x32\x14.google.protobuf.Any\x12)\n\x0b\x65nvironment\x18\x05 \x03(\x0b\x32\x14.google.protobuf.Any\"I\n\x0c\x43ompleteness\x12\x11\n\targuments\x18\x01 \x01(\x08\x12\x13\n\x0b\x65nvironment\x18\x02 \x01(\x08\x12\x11\n\tmaterials\x18\x03 \x01(\x08\"\xda\x01\n\x08Metadata\x12\x1b\n\x13\x62uild_invocation_id\x18\x01 \x01(\t\x12\x34\n\x10\x62uild_started_on\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11\x62uild_finished_on\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\x0c\x63ompleteness\x18\x04 \x01(\x0b\x32\x18.grafeas.v1.Completeness\x12\x14\n\x0creproducible\x18\x05 \x01(\x08\"\x1b\n\rBuilderConfig\x12\n\n\x02id\x18\x01 \x01(\t\"\xa4\x01\n\x10InTotoProvenance\x12\x31\n\x0e\x62uilder_config\x18\x01 \x01(\x0b\x32\x19.grafeas.v1.BuilderConfig\x12\"\n\x06recipe\x18\x02 \x01(\x0b\x32\x12.grafeas.v1.Recipe\x12&\n\x08metadata\x18\x03 \x01(\x0b\x32\x14.grafeas.v1.Metadata\x12\x11\n\tmaterials\x18\x04 \x03(\tBh\n\rio.grafeas.v1B\x15InTotoProvenanceProtoP\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + Recipe = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Recipe").msgclass + Completeness = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Completeness").msgclass + Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Metadata").msgclass + BuilderConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.BuilderConfig").msgclass + InTotoProvenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.InTotoProvenance").msgclass + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/intoto_statement_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/intoto_statement_pb.rb new file mode 100644 index 000000000000..57e0f9e659a1 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/intoto_statement_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/intoto_statement.proto + +require 'google/protobuf' + +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' +require 'grafeas/v1/intoto_provenance_pb' +require 'grafeas/v1/slsa_provenance_pb' +require 'grafeas/v1/slsa_provenance_zero_two_pb' + + +descriptor_data = "\n!grafeas/v1/intoto_statement.proto\x12\ngrafeas.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\"grafeas/v1/intoto_provenance.proto\x1a grafeas/v1/slsa_provenance.proto\x1a)grafeas/v1/slsa_provenance_zero_two.proto\"\xa3\x02\n\x0fInTotoStatement\x12\x13\n\x04type\x18\x01 \x01(\tR\x05_type\x12$\n\x07subject\x18\x02 \x03(\x0b\x32\x13.grafeas.v1.Subject\x12\x16\n\x0epredicate_type\x18\x03 \x01(\t\x12\x32\n\nprovenance\x18\x04 \x01(\x0b\x32\x1c.grafeas.v1.InTotoProvenanceH\x00\x12\x35\n\x0fslsa_provenance\x18\x05 \x01(\x0b\x32\x1a.grafeas.v1.SlsaProvenanceH\x00\x12\x45\n\x18slsa_provenance_zero_two\x18\x06 \x01(\x0b\x32!.grafeas.v1.SlsaProvenanceZeroTwoH\x00\x42\x0b\n\tpredicate\"w\n\x07Subject\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x06\x64igest\x18\x02 \x03(\x0b\x32\x1f.grafeas.v1.Subject.DigestEntry\x1a-\n\x0b\x44igestEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xcb\x0c\n\x16InTotoSlsaProvenanceV1\x12\x13\n\x04type\x18\x01 \x01(\tR\x05_type\x12$\n\x07subject\x18\x02 \x03(\x0b\x32\x13.grafeas.v1.Subject\x12\x16\n\x0epredicate_type\x18\x03 \x01(\t\x12\x46\n\tpredicate\x18\x04 \x01(\x0b\x32\x33.grafeas.v1.InTotoSlsaProvenanceV1.SlsaProvenanceV1\x1a\xa4\x01\n\x10SlsaProvenanceV1\x12L\n\x10\x62uild_definition\x18\x01 \x01(\x0b\x32\x32.grafeas.v1.InTotoSlsaProvenanceV1.BuildDefinition\x12\x42\n\x0brun_details\x18\x02 \x01(\x0b\x32-.grafeas.v1.InTotoSlsaProvenanceV1.RunDetails\x1a\xe7\x01\n\x0f\x42uildDefinition\x12\x12\n\nbuild_type\x18\x01 \x01(\t\x12\x34\n\x13\x65xternal_parameters\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x34\n\x13internal_parameters\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12T\n\x15resolved_dependencies\x18\x04 \x03(\x0b\x32\x35.grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor\x1a\x9a\x03\n\x12ResourceDescriptor\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12Q\n\x06\x64igest\x18\x03 \x03(\x0b\x32\x41.grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor.DigestEntry\x12\x0f\n\x07\x63ontent\x18\x04 \x01(\x0c\x12\x19\n\x11\x64ownload_location\x18\x05 \x01(\t\x12\x12\n\nmedia_type\x18\x06 \x01(\t\x12[\n\x0b\x61nnotations\x18\x07 \x03(\x0b\x32\x46.grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor.AnnotationsEntry\x1a-\n\x0b\x44igestEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aJ\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\xe2\x01\n\nRunDetails\x12\x45\n\x07\x62uilder\x18\x01 \x01(\x0b\x32\x34.grafeas.v1.InTotoSlsaProvenanceV1.ProvenanceBuilder\x12\x42\n\x08metadata\x18\x02 \x01(\x0b\x32\x30.grafeas.v1.InTotoSlsaProvenanceV1.BuildMetadata\x12I\n\nbyproducts\x18\x03 \x03(\x0b\x32\x35.grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor\x1a\xf8\x01\n\x11ProvenanceBuilder\x12\n\n\x02id\x18\x01 \x01(\t\x12R\n\x07version\x18\x02 \x03(\x0b\x32\x41.grafeas.v1.InTotoSlsaProvenanceV1.ProvenanceBuilder.VersionEntry\x12S\n\x14\x62uilder_dependencies\x18\x03 \x03(\x0b\x32\x35.grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor\x1a.\n\x0cVersionEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x87\x01\n\rBuildMetadata\x12\x15\n\rinvocation_id\x18\x01 \x01(\t\x12.\n\nstarted_on\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inished_on\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampBg\n\rio.grafeas.v1B\x14InTotoStatementProtoP\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + InTotoStatement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.InTotoStatement").msgclass + Subject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Subject").msgclass + InTotoSlsaProvenanceV1 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.InTotoSlsaProvenanceV1").msgclass + InTotoSlsaProvenanceV1::SlsaProvenanceV1 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.InTotoSlsaProvenanceV1.SlsaProvenanceV1").msgclass + InTotoSlsaProvenanceV1::BuildDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.InTotoSlsaProvenanceV1.BuildDefinition").msgclass + InTotoSlsaProvenanceV1::ResourceDescriptor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor").msgclass + InTotoSlsaProvenanceV1::RunDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.InTotoSlsaProvenanceV1.RunDetails").msgclass + InTotoSlsaProvenanceV1::ProvenanceBuilder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.InTotoSlsaProvenanceV1.ProvenanceBuilder").msgclass + InTotoSlsaProvenanceV1::BuildMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.InTotoSlsaProvenanceV1.BuildMetadata").msgclass + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/package_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/package_pb.rb new file mode 100644 index 000000000000..9f9c62800477 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/package_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/package.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'grafeas/v1/common_pb' + + +descriptor_data = "\n\x18grafeas/v1/package.proto\x12\ngrafeas.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17grafeas/v1/common.proto\"\xb7\x01\n\x0c\x44istribution\x12\x14\n\x07\x63pe_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12.\n\x0c\x61rchitecture\x18\x02 \x01(\x0e\x32\x18.grafeas.v1.Architecture\x12+\n\x0elatest_version\x18\x03 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x12\n\nmaintainer\x18\x04 \x01(\t\x12\x0b\n\x03url\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\"O\n\x08Location\x12\x0f\n\x07\x63pe_uri\x18\x01 \x01(\t\x12$\n\x07version\x18\x02 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x0c\n\x04path\x18\x03 \x01(\t\"\xd0\x02\n\x0bPackageNote\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12.\n\x0c\x64istribution\x18\n \x03(\x0b\x32\x18.grafeas.v1.Distribution\x12\x14\n\x0cpackage_type\x18\x0b \x01(\t\x12\x0f\n\x07\x63pe_uri\x18\x0c \x01(\t\x12.\n\x0c\x61rchitecture\x18\r \x01(\x0e\x32\x18.grafeas.v1.Architecture\x12$\n\x07version\x18\x0e \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x12\n\nmaintainer\x18\x0f \x01(\t\x12\x0b\n\x03url\x18\x10 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x11 \x01(\t\x12$\n\x07license\x18\x12 \x01(\x0b\x32\x13.grafeas.v1.License\x12\"\n\x06\x64igest\x18\x13 \x03(\x0b\x32\x12.grafeas.v1.Digest\"\x88\x02\n\x11PackageOccurrence\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x03\x12&\n\x08location\x18\x02 \x03(\x0b\x32\x14.grafeas.v1.Location\x12\x19\n\x0cpackage_type\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x63pe_uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\x0c\x61rchitecture\x18\x05 \x01(\x0e\x32\x18.grafeas.v1.ArchitectureB\x03\xe0\x41\x03\x12$\n\x07license\x18\x06 \x01(\x0b\x32\x13.grafeas.v1.License\x12)\n\x07version\x18\x07 \x01(\x0b\x32\x13.grafeas.v1.VersionB\x03\xe0\x41\x03\"\xe0\x01\n\x07Version\x12\r\n\x05\x65poch\x18\x01 \x01(\x05\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08revision\x18\x03 \x01(\t\x12\x11\n\tinclusive\x18\x06 \x01(\x08\x12-\n\x04kind\x18\x04 \x01(\x0e\x32\x1f.grafeas.v1.Version.VersionKind\x12\x11\n\tfull_name\x18\x05 \x01(\t\"Q\n\x0bVersionKind\x12\x1c\n\x18VERSION_KIND_UNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\x0b\n\x07MINIMUM\x10\x02\x12\x0b\n\x07MAXIMUM\x10\x03*>\n\x0c\x41rchitecture\x12\x1c\n\x18\x41RCHITECTURE_UNSPECIFIED\x10\x00\x12\x07\n\x03X86\x10\x01\x12\x07\n\x03X64\x10\x02\x42Q\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + Distribution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Distribution").msgclass + Location = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Location").msgclass + PackageNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.PackageNote").msgclass + PackageOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.PackageOccurrence").msgclass + Version = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Version").msgclass + Version::VersionKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Version.VersionKind").enummodule + Architecture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Architecture").enummodule + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/provenance_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/provenance_pb.rb new file mode 100644 index 000000000000..1d63130c3751 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/provenance_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/provenance.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\x1bgrafeas/v1/provenance.proto\x12\ngrafeas.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x90\x04\n\x0f\x42uildProvenance\x12\n\n\x02id\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12%\n\x08\x63ommands\x18\x03 \x03(\x0b\x32\x13.grafeas.v1.Command\x12-\n\x0f\x62uilt_artifacts\x18\x04 \x03(\x0b\x32\x14.grafeas.v1.Artifact\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x63reator\x18\x08 \x01(\t\x12\x10\n\x08logs_uri\x18\t \x01(\t\x12-\n\x11source_provenance\x18\n \x01(\x0b\x32\x12.grafeas.v1.Source\x12\x12\n\ntrigger_id\x18\x0b \x01(\t\x12\x44\n\rbuild_options\x18\x0c \x03(\x0b\x32-.grafeas.v1.BuildProvenance.BuildOptionsEntry\x12\x17\n\x0f\x62uilder_version\x18\r \x01(\t\x1a\x33\n\x11\x42uildOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x95\x02\n\x06Source\x12#\n\x1b\x61rtifact_storage_source_uri\x18\x01 \x01(\t\x12\x37\n\x0b\x66ile_hashes\x18\x02 \x03(\x0b\x32\".grafeas.v1.Source.FileHashesEntry\x12*\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x19.grafeas.v1.SourceContext\x12\x36\n\x13\x61\x64\x64itional_contexts\x18\x04 \x03(\x0b\x32\x19.grafeas.v1.SourceContext\x1aI\n\x0f\x46ileHashesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.grafeas.v1.FileHashes:\x02\x38\x01\"1\n\nFileHashes\x12#\n\tfile_hash\x18\x01 \x03(\x0b\x32\x10.grafeas.v1.Hash\"#\n\x04Hash\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"]\n\x07\x43ommand\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03\x65nv\x18\x02 \x03(\t\x12\x0c\n\x04\x61rgs\x18\x03 \x03(\t\x12\x0b\n\x03\x64ir\x18\x04 \x01(\t\x12\n\n\x02id\x18\x05 \x01(\t\x12\x10\n\x08wait_for\x18\x06 \x03(\t\"7\n\x08\x41rtifact\x12\x10\n\x08\x63hecksum\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\r\n\x05names\x18\x03 \x03(\t\"\x9a\x02\n\rSourceContext\x12\x38\n\ncloud_repo\x18\x01 \x01(\x0b\x32\".grafeas.v1.CloudRepoSourceContextH\x00\x12\x31\n\x06gerrit\x18\x02 \x01(\x0b\x32\x1f.grafeas.v1.GerritSourceContextH\x00\x12+\n\x03git\x18\x03 \x01(\x0b\x32\x1c.grafeas.v1.GitSourceContextH\x00\x12\x35\n\x06labels\x18\x04 \x03(\x0b\x32%.grafeas.v1.SourceContext.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07\x63ontext\"\x8a\x01\n\x0c\x41liasContext\x12+\n\x04kind\x18\x01 \x01(\x0e\x32\x1d.grafeas.v1.AliasContext.Kind\x12\x0c\n\x04name\x18\x02 \x01(\t\"?\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\t\n\x05\x46IXED\x10\x01\x12\x0b\n\x07MOVABLE\x10\x02\x12\t\n\x05OTHER\x10\x04\"\x93\x01\n\x16\x43loudRepoSourceContext\x12#\n\x07repo_id\x18\x01 \x01(\x0b\x32\x12.grafeas.v1.RepoId\x12\x15\n\x0brevision_id\x18\x02 \x01(\tH\x00\x12\x31\n\ralias_context\x18\x03 \x01(\x0b\x32\x18.grafeas.v1.AliasContextH\x00\x42\n\n\x08revision\"\x95\x01\n\x13GerritSourceContext\x12\x10\n\x08host_uri\x18\x01 \x01(\t\x12\x16\n\x0egerrit_project\x18\x02 \x01(\t\x12\x15\n\x0brevision_id\x18\x03 \x01(\tH\x00\x12\x31\n\ralias_context\x18\x04 \x01(\x0b\x32\x18.grafeas.v1.AliasContextH\x00\x42\n\n\x08revision\"4\n\x10GitSourceContext\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x13\n\x0brevision_id\x18\x02 \x01(\t\"S\n\x06RepoId\x12\x34\n\x0fproject_repo_id\x18\x01 \x01(\x0b\x32\x19.grafeas.v1.ProjectRepoIdH\x00\x12\r\n\x03uid\x18\x02 \x01(\tH\x00\x42\x04\n\x02id\"6\n\rProjectRepoId\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x11\n\trepo_name\x18\x02 \x01(\tBQ\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + BuildProvenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.BuildProvenance").msgclass + Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Source").msgclass + FileHashes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.FileHashes").msgclass + Hash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Hash").msgclass + Command = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Command").msgclass + Artifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Artifact").msgclass + SourceContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SourceContext").msgclass + AliasContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.AliasContext").msgclass + AliasContext::Kind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.AliasContext.Kind").enummodule + CloudRepoSourceContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CloudRepoSourceContext").msgclass + GerritSourceContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.GerritSourceContext").msgclass + GitSourceContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.GitSourceContext").msgclass + RepoId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.RepoId").msgclass + ProjectRepoId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ProjectRepoId").msgclass + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/risk_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/risk_pb.rb new file mode 100644 index 000000000000..970f5ed28d46 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/risk_pb.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/risk.proto + +require 'google/protobuf' + + +descriptor_data = "\n\x15grafeas/v1/risk.proto\x12\ngrafeas.v1\"\x81\x01\n\x04Risk\x12?\n\x08\x63isa_kev\x18\x01 \x01(\x0b\x32-.grafeas.v1.CISAKnownExploitedVulnerabilities\x12\x38\n\x04\x65pss\x18\x02 \x01(\x0b\x32*.grafeas.v1.ExploitPredictionScoringSystem\"J\n!CISAKnownExploitedVulnerabilities\x12%\n\x1dknown_ransomware_campaign_use\x18\x01 \x01(\t\"C\n\x1e\x45xploitPredictionScoringSystem\x12\x12\n\npercentile\x18\x01 \x01(\x01\x12\r\n\x05score\x18\x02 \x01(\x01\x42Q\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + Risk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Risk").msgclass + CISAKnownExploitedVulnerabilities = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CISAKnownExploitedVulnerabilities").msgclass + ExploitPredictionScoringSystem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ExploitPredictionScoringSystem").msgclass + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/sbom_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/sbom_pb.rb new file mode 100644 index 000000000000..b5db116a7827 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/sbom_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/sbom.proto + +require 'google/protobuf' + +require 'grafeas/v1/common_pb' +require 'grafeas/v1/intoto_statement_pb' + + +descriptor_data = "\n\x15grafeas/v1/sbom.proto\x12\ngrafeas.v1\x1a\x17grafeas/v1/common.proto\x1a!grafeas/v1/intoto_statement.proto\"4\n\x11SBOMReferenceNote\x12\x0e\n\x06\x66ormat\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\"\x9b\x01\n\x17SBOMReferenceOccurrence\x12\x37\n\x07payload\x18\x01 \x01(\x0b\x32&.grafeas.v1.SbomReferenceIntotoPayload\x12\x14\n\x0cpayload_type\x18\x02 \x01(\t\x12\x31\n\nsignatures\x18\x03 \x03(\x0b\x32\x1d.grafeas.v1.EnvelopeSignature\"\xac\x01\n\x1aSbomReferenceIntotoPayload\x12\x13\n\x04type\x18\x01 \x01(\tR\x05_type\x12\x16\n\x0epredicate_type\x18\x02 \x01(\t\x12$\n\x07subject\x18\x03 \x03(\x0b\x32\x13.grafeas.v1.Subject\x12;\n\tpredicate\x18\x04 \x01(\x0b\x32(.grafeas.v1.SbomReferenceIntotoPredicate\"\xcd\x01\n\x1cSbomReferenceIntotoPredicate\x12\x13\n\x0breferrer_id\x18\x01 \x01(\t\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x11\n\tmime_type\x18\x03 \x01(\t\x12\x44\n\x06\x64igest\x18\x04 \x03(\x0b\x32\x34.grafeas.v1.SbomReferenceIntotoPredicate.DigestEntry\x1a-\n\x0b\x44igestEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42Q\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + SBOMReferenceNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SBOMReferenceNote").msgclass + SBOMReferenceOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SBOMReferenceOccurrence").msgclass + SbomReferenceIntotoPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SbomReferenceIntotoPayload").msgclass + SbomReferenceIntotoPredicate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SbomReferenceIntotoPredicate").msgclass + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/secret_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/secret_pb.rb new file mode 100644 index 000000000000..0ca629f57999 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/secret_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/secret.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/any_pb' +require 'google/protobuf/timestamp_pb' +require 'grafeas/v1/common_pb' + + +descriptor_data = "\n\x17grafeas/v1/secret.proto\x12\ngrafeas.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17grafeas/v1/common.proto\"\x0c\n\nSecretNote\"\xea\x01\n\x10SecretOccurrence\x12)\n\x04kind\x18\x01 \x01(\x0e\x32\x16.grafeas.v1.SecretKindB\x03\xe0\x41\x02\x12\x32\n\tlocations\x18\x02 \x03(\x0b\x32\x1a.grafeas.v1.SecretLocationB\x03\xe0\x41\x01\x12/\n\x08statuses\x18\x03 \x03(\x0b\x32\x18.grafeas.v1.SecretStatusB\x03\xe0\x41\x01\x12\"\n\x04\x64\x61ta\x18\x04 \x01(\x0b\x32\x14.google.protobuf.Any\x12\"\n\x06\x64igest\x18\x05 \x01(\x0b\x32\x12.grafeas.v1.Digest\"O\n\x0eSecretLocation\x12\x31\n\rfile_location\x18\x01 \x01(\x0b\x32\x18.grafeas.v1.FileLocationH\x00\x42\n\n\x08location\"\xd7\x01\n\x0cSecretStatus\x12\x34\n\x06status\x18\x01 \x01(\x0e\x32\x1f.grafeas.v1.SecretStatus.StatusB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x14\n\x07message\x18\x03 \x01(\tB\x03\xe0\x41\x01\"E\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\t\n\x05VALID\x10\x02\x12\x0b\n\x07INVALID\x10\x03*\xa5\x07\n\nSecretKind\x12\x1b\n\x17SECRET_KIND_UNSPECIFIED\x10\x00\x12\x17\n\x13SECRET_KIND_UNKNOWN\x10\x01\x12\'\n#SECRET_KIND_GCP_SERVICE_ACCOUNT_KEY\x10\x02\x12\x1b\n\x17SECRET_KIND_GCP_API_KEY\x10\x03\x12-\n)SECRET_KIND_GCP_OAUTH2_CLIENT_CREDENTIALS\x10\x04\x12\'\n#SECRET_KIND_GCP_OAUTH2_ACCESS_TOKEN\x10\x05\x12\'\n#SECRET_KIND_ANTHROPIC_ADMIN_API_KEY\x10\x06\x12!\n\x1dSECRET_KIND_ANTHROPIC_API_KEY\x10\x07\x12\"\n\x1eSECRET_KIND_AZURE_ACCESS_TOKEN\x10\x08\x12$\n SECRET_KIND_AZURE_IDENTITY_TOKEN\x10\t\x12\x30\n,SECRET_KIND_DOCKER_HUB_PERSONAL_ACCESS_TOKEN\x10\n\x12(\n$SECRET_KIND_GITHUB_APP_REFRESH_TOKEN\x10\x0b\x12\x31\n-SECRET_KIND_GITHUB_APP_SERVER_TO_SERVER_TOKEN\x10\x0c\x12/\n+SECRET_KIND_GITHUB_APP_USER_TO_SERVER_TOKEN\x10\r\x12\x34\n0SECRET_KIND_GITHUB_CLASSIC_PERSONAL_ACCESS_TOKEN\x10\x0e\x12\x39\n5SECRET_KIND_GITHUB_FINE_GRAINED_PERSONAL_ACCESS_TOKEN\x10\x0f\x12\"\n\x1eSECRET_KIND_GITHUB_OAUTH_TOKEN\x10\x10\x12#\n\x1fSECRET_KIND_HUGGINGFACE_API_KEY\x10\x11\x12\x1e\n\x1aSECRET_KIND_OPENAI_API_KEY\x10\x12\x12\"\n\x1eSECRET_KIND_PERPLEXITY_API_KEY\x10\x13\x12!\n\x1dSECRET_KIND_STRIPE_SECRET_KEY\x10\x14\x12%\n!SECRET_KIND_STRIPE_RESTRICTED_KEY\x10\x15\x12%\n!SECRET_KIND_STRIPE_WEBHOOK_SECRET\x10\x16\x42Q\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + SecretNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SecretNote").msgclass + SecretOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SecretOccurrence").msgclass + SecretLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SecretLocation").msgclass + SecretStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SecretStatus").msgclass + SecretStatus::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SecretStatus.Status").enummodule + SecretKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SecretKind").enummodule + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/severity_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/severity_pb.rb new file mode 100644 index 000000000000..ca838f6d75de --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/severity_pb.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/severity.proto + +require 'google/protobuf' + + +descriptor_data = "\n\x19grafeas/v1/severity.proto\x12\ngrafeas.v1*^\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07MINIMAL\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\x12\x0c\n\x08\x43RITICAL\x10\x05\x42Q\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Severity").enummodule + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/slsa_provenance_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/slsa_provenance_pb.rb new file mode 100644 index 000000000000..a6d5aff1d80a --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/slsa_provenance_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/slsa_provenance.proto + +require 'google/protobuf' + +require 'google/protobuf/any_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n grafeas/v1/slsa_provenance.proto\x12\ngrafeas.v1\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfe\x06\n\x0eSlsaProvenance\x12\x37\n\x07\x62uilder\x18\x01 \x01(\x0b\x32&.grafeas.v1.SlsaProvenance.SlsaBuilder\x12\x35\n\x06recipe\x18\x02 \x01(\x0b\x32%.grafeas.v1.SlsaProvenance.SlsaRecipe\x12\x39\n\x08metadata\x18\x03 \x01(\x0b\x32\'.grafeas.v1.SlsaProvenance.SlsaMetadata\x12\x36\n\tmaterials\x18\x04 \x03(\x0b\x32#.grafeas.v1.SlsaProvenance.Material\x1a\xa0\x01\n\nSlsaRecipe\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x1b\n\x13\x64\x65\x66ined_in_material\x18\x02 \x01(\x03\x12\x13\n\x0b\x65ntry_point\x18\x03 \x01(\t\x12\'\n\targuments\x18\x04 \x01(\x0b\x32\x14.google.protobuf.Any\x12)\n\x0b\x65nvironment\x18\x05 \x01(\x0b\x32\x14.google.protobuf.Any\x1aM\n\x10SlsaCompleteness\x12\x11\n\targuments\x18\x01 \x01(\x08\x12\x13\n\x0b\x65nvironment\x18\x02 \x01(\x08\x12\x11\n\tmaterials\x18\x03 \x01(\x08\x1a\xf1\x01\n\x0cSlsaMetadata\x12\x1b\n\x13\x62uild_invocation_id\x18\x01 \x01(\t\x12\x34\n\x10\x62uild_started_on\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11\x62uild_finished_on\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x41\n\x0c\x63ompleteness\x18\x04 \x01(\x0b\x32+.grafeas.v1.SlsaProvenance.SlsaCompleteness\x12\x14\n\x0creproducible\x18\x05 \x01(\x08\x1a\x19\n\x0bSlsaBuilder\x12\n\n\x02id\x18\x01 \x01(\t\x1a\x87\x01\n\x08Material\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12?\n\x06\x64igest\x18\x02 \x03(\x0b\x32/.grafeas.v1.SlsaProvenance.Material.DigestEntry\x1a-\n\x0b\x44igestEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x66\n\rio.grafeas.v1B\x13SlsaProvenanceProtoP\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + SlsaProvenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenance").msgclass + SlsaProvenance::SlsaRecipe = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenance.SlsaRecipe").msgclass + SlsaProvenance::SlsaCompleteness = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenance.SlsaCompleteness").msgclass + SlsaProvenance::SlsaMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenance.SlsaMetadata").msgclass + SlsaProvenance::SlsaBuilder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenance.SlsaBuilder").msgclass + SlsaProvenance::Material = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenance.Material").msgclass + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/slsa_provenance_zero_two_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/slsa_provenance_zero_two_pb.rb new file mode 100644 index 000000000000..2acddf338bf8 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/slsa_provenance_zero_two_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/slsa_provenance_zero_two.proto + +require 'google/protobuf' + +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n)grafeas/v1/slsa_provenance_zero_two.proto\x12\ngrafeas.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd3\t\n\x15SlsaProvenanceZeroTwo\x12>\n\x07\x62uilder\x18\x01 \x01(\x0b\x32-.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder\x12\x12\n\nbuild_type\x18\x02 \x01(\t\x12\x44\n\ninvocation\x18\x03 \x01(\x0b\x32\x30.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation\x12-\n\x0c\x62uild_config\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12@\n\x08metadata\x18\x05 \x01(\x0b\x32..grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata\x12\x41\n\tmaterials\x18\x06 \x03(\x0b\x32..grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial\x1a\x19\n\x0bSlsaBuilder\x12\n\n\x02id\x18\x01 \x01(\t\x1a\x96\x01\n\x0cSlsaMaterial\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12J\n\x06\x64igest\x18\x02 \x03(\x0b\x32:.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.DigestEntry\x1a-\n\x0b\x44igestEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xb6\x01\n\x0eSlsaInvocation\x12I\n\rconfig_source\x18\x01 \x01(\x0b\x32\x32.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource\x12+\n\nparameters\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12,\n\x0b\x65nvironment\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x1a\xb3\x01\n\x10SlsaConfigSource\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12N\n\x06\x64igest\x18\x02 \x03(\x0b\x32>.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.DigestEntry\x12\x13\n\x0b\x65ntry_point\x18\x03 \x01(\t\x1a-\n\x0b\x44igestEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xf8\x01\n\x0cSlsaMetadata\x12\x1b\n\x13\x62uild_invocation_id\x18\x01 \x01(\t\x12\x34\n\x10\x62uild_started_on\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11\x62uild_finished_on\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12H\n\x0c\x63ompleteness\x18\x04 \x01(\x0b\x32\x32.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness\x12\x14\n\x0creproducible\x18\x05 \x01(\x08\x1aN\n\x10SlsaCompleteness\x12\x12\n\nparameters\x18\x01 \x01(\x08\x12\x13\n\x0b\x65nvironment\x18\x02 \x01(\x08\x12\x11\n\tmaterials\x18\x03 \x01(\x08\x42m\n\rio.grafeas.v1B\x1aSlsaProvenanceZeroTwoProtoP\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + SlsaProvenanceZeroTwo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenanceZeroTwo").msgclass + SlsaProvenanceZeroTwo::SlsaBuilder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder").msgclass + SlsaProvenanceZeroTwo::SlsaMaterial = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial").msgclass + SlsaProvenanceZeroTwo::SlsaInvocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation").msgclass + SlsaProvenanceZeroTwo::SlsaConfigSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource").msgclass + SlsaProvenanceZeroTwo::SlsaMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata").msgclass + SlsaProvenanceZeroTwo::SlsaCompleteness = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness").msgclass + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/upgrade_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/upgrade_pb.rb new file mode 100644 index 000000000000..18d8c849a74f --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/upgrade_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/upgrade.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' +require 'grafeas/v1/package_pb' + + +descriptor_data = "\n\x18grafeas/v1/upgrade.proto\x12\ngrafeas.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x18grafeas/v1/package.proto\"\xaf\x01\n\x0bUpgradeNote\x12\x0f\n\x07package\x18\x01 \x01(\t\x12$\n\x07version\x18\x02 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x36\n\rdistributions\x18\x03 \x03(\x0b\x32\x1f.grafeas.v1.UpgradeDistribution\x12\x31\n\x0ewindows_update\x18\x04 \x01(\x0b\x32\x19.grafeas.v1.WindowsUpdate\"]\n\x13UpgradeDistribution\x12\x0f\n\x07\x63pe_uri\x18\x01 \x01(\t\x12\x16\n\x0e\x63lassification\x18\x02 \x01(\t\x12\x10\n\x08severity\x18\x03 \x01(\t\x12\x0b\n\x03\x63ve\x18\x04 \x03(\t\"\xec\x02\n\rWindowsUpdate\x12\x34\n\x08identity\x18\x01 \x01(\x0b\x32\".grafeas.v1.WindowsUpdate.Identity\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x36\n\ncategories\x18\x04 \x03(\x0b\x32\".grafeas.v1.WindowsUpdate.Category\x12\x16\n\x0ekb_article_ids\x18\x05 \x03(\t\x12\x13\n\x0bsupport_url\x18\x06 \x01(\t\x12<\n\x18last_published_timestamp\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a/\n\x08Identity\x12\x11\n\tupdate_id\x18\x01 \x01(\t\x12\x10\n\x08revision\x18\x02 \x01(\x05\x1a-\n\x08\x43\x61tegory\x12\x13\n\x0b\x63\x61tegory_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\xbb\x01\n\x11UpgradeOccurrence\x12\x0f\n\x07package\x18\x01 \x01(\t\x12+\n\x0eparsed_version\x18\x03 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x35\n\x0c\x64istribution\x18\x04 \x01(\x0b\x32\x1f.grafeas.v1.UpgradeDistribution\x12\x31\n\x0ewindows_update\x18\x05 \x01(\x0b\x32\x19.grafeas.v1.WindowsUpdateBQ\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + UpgradeNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.UpgradeNote").msgclass + UpgradeDistribution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.UpgradeDistribution").msgclass + WindowsUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.WindowsUpdate").msgclass + WindowsUpdate::Identity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.WindowsUpdate.Identity").msgclass + WindowsUpdate::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.WindowsUpdate.Category").msgclass + UpgradeOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.UpgradeOccurrence").msgclass + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/version.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/version.rb new file mode 100644 index 000000000000..fa8f104cf044 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/version.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Grafeas + module V1 + VERSION = "0.0.1" + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/vex_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/vex_pb.rb new file mode 100644 index 000000000000..a7bd51fd0e04 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/vex_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/vex.proto + +require 'google/protobuf' + +require 'grafeas/v1/common_pb' + + +descriptor_data = "\n\x14grafeas/v1/vex.proto\x12\ngrafeas.v1\x1a\x17grafeas/v1/common.proto\"\xc8\r\n\x1bVulnerabilityAssessmentNote\x12\r\n\x05title\x18\x01 \x01(\t\x12\x19\n\x11short_description\x18\x02 \x01(\t\x12\x18\n\x10long_description\x18\x03 \x01(\t\x12\x15\n\rlanguage_code\x18\x04 \x01(\t\x12\x44\n\tpublisher\x18\x05 \x01(\x0b\x32\x31.grafeas.v1.VulnerabilityAssessmentNote.Publisher\x12@\n\x07product\x18\x06 \x01(\x0b\x32/.grafeas.v1.VulnerabilityAssessmentNote.Product\x12\x46\n\nassessment\x18\x07 \x01(\x0b\x32\x32.grafeas.v1.VulnerabilityAssessmentNote.Assessment\x1aQ\n\tPublisher\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x11issuing_authority\x18\x02 \x01(\t\x12\x1b\n\x13publisher_namespace\x18\x03 \x01(\t\x1aH\n\x07Product\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x15\n\x0bgeneric_uri\x18\x03 \x01(\tH\x00\x42\x0c\n\nidentifier\x1a\xe0\t\n\nAssessment\x12\x0f\n\x03\x63ve\x18\x01 \x01(\tB\x02\x18\x01\x12\x18\n\x10vulnerability_id\x18\t \x01(\t\x12\x19\n\x11short_description\x18\x02 \x01(\t\x12\x18\n\x10long_description\x18\x03 \x01(\t\x12,\n\x0crelated_uris\x18\x04 \x03(\x0b\x32\x16.grafeas.v1.RelatedUrl\x12G\n\x05state\x18\x05 \x01(\x0e\x32\x38.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State\x12\x0f\n\x07impacts\x18\x06 \x03(\t\x12W\n\rjustification\x18\x07 \x01(\x0b\x32@.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification\x12T\n\x0cremediations\x18\x08 \x03(\x0b\x32>.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation\x1a\x8c\x03\n\rJustification\x12n\n\x12justification_type\x18\x01 \x01(\x0e\x32R.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType\x12\x0f\n\x07\x64\x65tails\x18\x02 \x01(\t\"\xf9\x01\n\x11JustificationType\x12\"\n\x1eJUSTIFICATION_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x43OMPONENT_NOT_PRESENT\x10\x01\x12\x1f\n\x1bVULNERABLE_CODE_NOT_PRESENT\x10\x02\x12\'\n#VULNERABLE_CODE_NOT_IN_EXECUTE_PATH\x10\x03\x12\x35\n1VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY\x10\x04\x12$\n INLINE_MITIGATIONS_ALREADY_EXIST\x10\x05\x1a\xc7\x02\n\x0bRemediation\x12h\n\x10remediation_type\x18\x01 \x01(\x0e\x32N.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType\x12\x0f\n\x07\x64\x65tails\x18\x02 \x01(\t\x12/\n\x0fremediation_uri\x18\x03 \x01(\x0b\x32\x16.grafeas.v1.RelatedUrl\"\x8b\x01\n\x0fRemediationType\x12 \n\x1cREMEDIATION_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nMITIGATION\x10\x01\x12\x12\n\x0eNO_FIX_PLANNED\x10\x02\x12\x12\n\x0eNONE_AVAILABLE\x10\x03\x12\x0e\n\nVENDOR_FIX\x10\x04\x12\x0e\n\nWORKAROUND\x10\x05\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x41\x46\x46\x45\x43TED\x10\x01\x12\x10\n\x0cNOT_AFFECTED\x10\x02\x12\t\n\x05\x46IXED\x10\x03\x12\x17\n\x13UNDER_INVESTIGATION\x10\x04\x42Q\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + VulnerabilityAssessmentNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityAssessmentNote").msgclass + VulnerabilityAssessmentNote::Publisher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityAssessmentNote.Publisher").msgclass + VulnerabilityAssessmentNote::Product = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityAssessmentNote.Product").msgclass + VulnerabilityAssessmentNote::Assessment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityAssessmentNote.Assessment").msgclass + VulnerabilityAssessmentNote::Assessment::Justification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification").msgclass + VulnerabilityAssessmentNote::Assessment::Justification::JustificationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType").enummodule + VulnerabilityAssessmentNote::Assessment::Remediation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation").msgclass + VulnerabilityAssessmentNote::Assessment::Remediation::RemediationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType").enummodule + VulnerabilityAssessmentNote::Assessment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityAssessmentNote.Assessment.State").enummodule + end +end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/vulnerability_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/vulnerability_pb.rb new file mode 100644 index 000000000000..9da9440f5085 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/vulnerability_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grafeas/v1/vulnerability.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' +require 'grafeas/v1/common_pb' +require 'grafeas/v1/cvss_pb' +require 'grafeas/v1/package_pb' +require 'grafeas/v1/risk_pb' +require 'grafeas/v1/severity_pb' +require 'grafeas/v1/vex_pb' + + +descriptor_data = "\n\x1egrafeas/v1/vulnerability.proto\x12\ngrafeas.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17grafeas/v1/common.proto\x1a\x15grafeas/v1/cvss.proto\x1a\x18grafeas/v1/package.proto\x1a\x15grafeas/v1/risk.proto\x1a\x19grafeas/v1/severity.proto\x1a\x14grafeas/v1/vex.proto\"\xca\x08\n\x11VulnerabilityNote\x12\x12\n\ncvss_score\x18\x01 \x01(\x02\x12&\n\x08severity\x18\x02 \x01(\x0e\x32\x14.grafeas.v1.Severity\x12\x35\n\x07\x64\x65tails\x18\x03 \x03(\x0b\x32$.grafeas.v1.VulnerabilityNote.Detail\x12#\n\x07\x63vss_v3\x18\x04 \x01(\x0b\x32\x12.grafeas.v1.CVSSv3\x12\x44\n\x0fwindows_details\x18\x05 \x03(\x0b\x32+.grafeas.v1.VulnerabilityNote.WindowsDetail\x12\x36\n\x12source_update_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12-\n\x0c\x63vss_version\x18\x07 \x01(\x0e\x32\x17.grafeas.v1.CVSSVersion\x12!\n\x07\x63vss_v2\x18\x08 \x01(\x0b\x32\x10.grafeas.v1.CVSS\x12\x39\n\x15\x61\x64visory_publish_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x07\x63vss_v4\x18\n \x01(\x0b\x32\x10.grafeas.v1.CVSS\x1a\xad\x03\n\x06\x44\x65tail\x12\x15\n\rseverity_name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x14\n\x0cpackage_type\x18\x03 \x01(\t\x12\x18\n\x10\x61\x66\x66\x65\x63ted_cpe_uri\x18\x04 \x01(\t\x12\x18\n\x10\x61\x66\x66\x65\x63ted_package\x18\x05 \x01(\t\x12\x33\n\x16\x61\x66\x66\x65\x63ted_version_start\x18\x06 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x31\n\x14\x61\x66\x66\x65\x63ted_version_end\x18\x07 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x15\n\rfixed_cpe_uri\x18\x08 \x01(\t\x12\x15\n\rfixed_package\x18\t \x01(\t\x12*\n\rfixed_version\x18\n \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x13\n\x0bis_obsolete\x18\x0b \x01(\x08\x12\x36\n\x12source_update_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06source\x18\r \x01(\t\x12\x0e\n\x06vendor\x18\x0e \x01(\t\x1a\xbe\x01\n\rWindowsDetail\x12\x0f\n\x07\x63pe_uri\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12M\n\nfixing_kbs\x18\x04 \x03(\x0b\x32\x39.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase\x1a*\n\rKnowledgeBase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\"\xdb\n\n\x17VulnerabilityOccurrence\x12\x0c\n\x04type\x18\x01 \x01(\t\x12&\n\x08severity\x18\x02 \x01(\x0e\x32\x14.grafeas.v1.Severity\x12\x12\n\ncvss_score\x18\x03 \x01(\x02\x12 \n\x06\x63vssv3\x18\n \x01(\x0b\x32\x10.grafeas.v1.CVSS\x12G\n\rpackage_issue\x18\x04 \x03(\x0b\x32\x30.grafeas.v1.VulnerabilityOccurrence.PackageIssue\x12\x19\n\x11short_description\x18\x05 \x01(\t\x12\x18\n\x10long_description\x18\x06 \x01(\t\x12,\n\x0crelated_urls\x18\x07 \x03(\x0b\x32\x16.grafeas.v1.RelatedUrl\x12\x30\n\x12\x65\x66\x66\x65\x63tive_severity\x18\x08 \x01(\x0e\x32\x14.grafeas.v1.Severity\x12\x15\n\rfix_available\x18\t \x01(\x08\x12-\n\x0c\x63vss_version\x18\x0b \x01(\x0e\x32\x17.grafeas.v1.CVSSVersion\x12!\n\x07\x63vss_v2\x18\x0c \x01(\x0b\x32\x10.grafeas.v1.CVSS\x12I\n\x0evex_assessment\x18\r \x01(\x0b\x32\x31.grafeas.v1.VulnerabilityOccurrence.VexAssessment\x12\x15\n\rextra_details\x18\x0e \x01(\t\x12\x1e\n\x04risk\x18\x0f \x01(\x0b\x32\x10.grafeas.v1.Risk\x12!\n\x07\x63vss_v4\x18\x10 \x01(\x0b\x32\x10.grafeas.v1.CVSS\x1a\xe0\x02\n\x0cPackageIssue\x12\x18\n\x10\x61\x66\x66\x65\x63ted_cpe_uri\x18\x01 \x01(\t\x12\x18\n\x10\x61\x66\x66\x65\x63ted_package\x18\x02 \x01(\t\x12-\n\x10\x61\x66\x66\x65\x63ted_version\x18\x03 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x15\n\rfixed_cpe_uri\x18\x04 \x01(\t\x12\x15\n\rfixed_package\x18\x05 \x01(\t\x12*\n\rfixed_version\x18\x06 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x15\n\rfix_available\x18\x07 \x01(\x08\x12\x14\n\x0cpackage_type\x18\x08 \x01(\t\x12\x35\n\x12\x65\x66\x66\x65\x63tive_severity\x18\t \x01(\x0e\x32\x14.grafeas.v1.SeverityB\x03\xe0\x41\x03\x12/\n\rfile_location\x18\n \x03(\x0b\x32\x18.grafeas.v1.FileLocation\x1a\x84\x03\n\rVexAssessment\x12\x0f\n\x03\x63ve\x18\x01 \x01(\tB\x02\x18\x01\x12\x18\n\x10vulnerability_id\x18\x08 \x01(\t\x12,\n\x0crelated_uris\x18\x02 \x03(\x0b\x32\x16.grafeas.v1.RelatedUrl\x12\x11\n\tnote_name\x18\x03 \x01(\t\x12G\n\x05state\x18\x04 \x01(\x0e\x32\x38.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State\x12\x0f\n\x07impacts\x18\x05 \x03(\t\x12T\n\x0cremediations\x18\x06 \x03(\x0b\x32>.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation\x12W\n\rjustification\x18\x07 \x01(\x0b\x32@.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationBQ\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Grafeas + module V1 + VulnerabilityNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityNote").msgclass + VulnerabilityNote::Detail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityNote.Detail").msgclass + VulnerabilityNote::WindowsDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityNote.WindowsDetail").msgclass + VulnerabilityNote::WindowsDetail::KnowledgeBase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase").msgclass + VulnerabilityOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityOccurrence").msgclass + VulnerabilityOccurrence::PackageIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityOccurrence.PackageIssue").msgclass + VulnerabilityOccurrence::VexAssessment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityOccurrence.VexAssessment").msgclass + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/README.md b/owl-bot-staging/grafeas-v1/proto_docs/README.md new file mode 100644 index 000000000000..1117465c0da0 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Grafeas 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/grafeas-v1/proto_docs/google/api/client.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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. + # + # Note: This field should not be used in most cases. + 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. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # 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/grafeas-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/grafeas-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/grafeas-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/grafeas-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/grafeas-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/grafeas-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/grafeas-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/grafeas-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/grafeas-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/grafeas-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/grafeas-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/grafeas-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/grafeas-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/grafeas-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/grafeas-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/grafeas-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/grafeas-v1/proto_docs/grafeas/v1/attestation.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/attestation.rb new file mode 100644 index 000000000000..23895f01f033 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/attestation.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 Grafeas + module V1 + # Note kind that represents a logical attestation "role" or "authority". For + # example, an organization might have one `Authority` for "QA" and one for + # "build". This note is intended to act strictly as a grouping mechanism for + # the attached occurrences (Attestations). This grouping mechanism also + # provides a security boundary, since IAM ACLs gate the ability for a principle + # to attach an occurrence to a given note. It also provides a single point of + # lookup to find all attached attestation occurrences, even if they don't all + # live in the same project. + # @!attribute [rw] hint + # @return [::Grafeas::V1::AttestationNote::Hint] + # Hint hints at the purpose of the attestation authority. + class AttestationNote + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # This submessage provides human-readable hints about the purpose of the + # authority. Because the name of a note acts as its resource reference, it is + # important to disambiguate the canonical name of the Note (which might be a + # UUID for security purposes) from "readable" names more suitable for debug + # output. Note that these hints should not be used to look up authorities in + # security sensitive contexts, such as when looking up attestations to + # verify. + # @!attribute [rw] human_readable_name + # @return [::String] + # Required. The human readable name of this attestation authority, for + # example "qa". + class Hint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] compact_jwt + # @return [::String] + # The compact encoding of a JWS, which is always three base64 encoded strings + # joined by periods. For details, see: + # https://tools.ietf.org/html/rfc7515.html#section-3.1 + class Jwt + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Occurrence that represents a single "attestation". The authenticity of an + # attestation can be verified using the attached signature. If the verifier + # trusts the public key of the signer, then verifying the signature is + # sufficient to establish trust. In this circumstance, the authority to which + # this attestation is attached is primarily useful for lookup (how to find + # this attestation if you already know the authority and artifact to be + # verified) and intent (for which authority this attestation was intended to + # sign. + # @!attribute [rw] serialized_payload + # @return [::String] + # Required. The serialized payload that is verified by one or more + # `signatures`. + # @!attribute [rw] signatures + # @return [::Array<::Grafeas::V1::Signature>] + # One or more signatures over `serialized_payload`. Verifier implementations + # should consider this attestation message verified if at least one + # `signature` verifies `serialized_payload`. See `Signature` in common.proto + # for more details on signature structure and verification. + # @!attribute [rw] jwts + # @return [::Array<::Grafeas::V1::Jwt>] + # One or more JWTs encoding a self-contained attestation. + # Each JWT encodes the payload that it verifies within the JWT itself. + # Verifier implementation SHOULD ignore the `serialized_payload` field + # when verifying these JWTs. + # If only JWTs are present on this AttestationOccurrence, then the + # `serialized_payload` SHOULD be left empty. + # Each JWT SHOULD encode a claim specific to the `resource_uri` of this + # Occurrence, but this is not validated by Grafeas metadata API + # implementations. The JWT itself is opaque to Grafeas. + class AttestationOccurrence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/build.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/build.rb new file mode 100644 index 000000000000..e82c88d57153 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/build.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 Grafeas + module V1 + # Note holding the version of the provider's builder and the signature of the + # provenance message in the build details occurrence. + # @!attribute [rw] builder_version + # @return [::String] + # Required. Immutable. Version of the builder which produced this build. + class BuildNote + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of a build occurrence. + # @!attribute [rw] provenance + # @return [::Grafeas::V1::BuildProvenance] + # The actual provenance for the build. + # @!attribute [rw] provenance_bytes + # @return [::String] + # Serialized JSON representation of the provenance, used in generating the + # build signature in the corresponding build note. After verifying the + # signature, `provenance_bytes` can be unmarshalled and compared to the + # provenance to confirm that it is unchanged. A base64-encoded string + # representation of the provenance bytes is used for the signature in order + # to interoperate with openssl which expects this format for signature + # verification. + # + # The serialized form is captured both to avoid ambiguity in how the + # provenance is marshalled to json as well to prevent incompatibilities with + # future changes. + # @!attribute [rw] intoto_provenance + # @return [::Grafeas::V1::InTotoProvenance] + # Deprecated. See InTotoStatement for the replacement. + # In-toto Provenance representation as defined in spec. + # @!attribute [rw] intoto_statement + # @return [::Grafeas::V1::InTotoStatement] + # In-toto Statement representation as defined in spec. + # The intoto_statement can contain any type of provenance. The serialized + # payload of the statement can be stored and signed in the Occurrence's + # envelope. + # @!attribute [rw] in_toto_slsa_provenance_v1 + # @return [::Grafeas::V1::InTotoSlsaProvenanceV1] + # In-Toto Slsa Provenance V1 represents a slsa provenance meeting the slsa + # spec, wrapped in an in-toto statement. This allows for direct + # jsonification of a to-spec in-toto slsa statement with a to-spec + # slsa provenance. + class BuildOccurrence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/common.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/common.rb new file mode 100644 index 000000000000..eabafd087790 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/common.rb @@ -0,0 +1,243 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Grafeas + module V1 + # Metadata for any related URL information. + # @!attribute [rw] url + # @return [::String] + # Specific URL associated with the resource. + # @!attribute [rw] label + # @return [::String] + # Label to describe usage of the URL. + class RelatedUrl + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Verifiers (e.g. Kritis implementations) MUST verify signatures + # with respect to the trust anchors defined in policy (e.g. a Kritis policy). + # Typically this means that the verifier has been configured with a map from + # `public_key_id` to public key material (and any required parameters, e.g. + # signing algorithm). + # + # In particular, verification implementations MUST NOT treat the signature + # `public_key_id` as anything more than a key lookup hint. The `public_key_id` + # DOES NOT validate or authenticate a public key; it only provides a mechanism + # for quickly selecting a public key ALREADY CONFIGURED on the verifier through + # a trusted channel. Verification implementations MUST reject signatures in any + # of the following circumstances: + # * The `public_key_id` is not recognized by the verifier. + # * The public key that `public_key_id` refers to does not verify the + # signature with respect to the payload. + # + # The `signature` contents SHOULD NOT be "attached" (where the payload is + # included with the serialized `signature` bytes). Verifiers MUST ignore any + # "attached" payload and only verify signatures with respect to explicitly + # provided payload (e.g. a `payload` field on the proto message that holds + # this Signature, or the canonical serialization of the proto message that + # holds this signature). + # @!attribute [rw] signature + # @return [::String] + # The content of the signature, an opaque bytestring. + # The payload that this signature verifies MUST be unambiguously provided + # with the Signature during verification. A wrapper message might provide + # the payload explicitly. Alternatively, a message might have a canonical + # serialization that can always be unambiguously computed to derive the + # payload. + # @!attribute [rw] public_key_id + # @return [::String] + # The identifier for the public key that verifies this signature. + # * The `public_key_id` is required. + # * The `public_key_id` SHOULD be an RFC3986 conformant URI. + # * When possible, the `public_key_id` SHOULD be an immutable reference, + # such as a cryptographic digest. + # + # Examples of valid `public_key_id`s: + # + # OpenPGP V4 public key fingerprint: + # * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" + # See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more + # details on this scheme. + # + # RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER + # serialization): + # * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" + # * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" + class Signature + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # MUST match + # https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An + # authenticated message of arbitrary type. + # @!attribute [rw] payload + # @return [::String] + # @!attribute [rw] payload_type + # @return [::String] + # @!attribute [rw] signatures + # @return [::Array<::Grafeas::V1::EnvelopeSignature>] + class Envelope + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] sig + # @return [::String] + # @!attribute [rw] keyid + # @return [::String] + class EnvelopeSignature + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Indicates the location at which a package was found. + # @!attribute [rw] file_path + # @return [::String] + # For jars that are contained inside .war files, this filepath + # can indicate the path to war file combined with the path to jar file. + # @!attribute [rw] layer_details + # @return [::Grafeas::V1::LayerDetails] + # Each package found in a file should have its own layer metadata (that is, + # information from the origin layer of the package). + # @!attribute [rw] line_number + # @return [::Integer] + # Line number in the file where the package was found. + # Optional field that only applies to source repository scanning. + class FileLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BaseImage describes a base image of a container image. + # @!attribute [rw] name + # @return [::String] + # The name of the base image. + # @!attribute [rw] repository + # @return [::String] + # The repository name in which the base image is from. + # @!attribute [rw] layer_count + # @return [::Integer] + # The number of layers that the base image is composed of. + # @!attribute [rw] registry + # @return [::String] + # The registry in which the base image is from. + class BaseImage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about the layer a package was found in. + # @!attribute [rw] index + # @return [::Integer] + # The index of the layer in the container image. + # @!attribute [rw] diff_id + # @return [::String] + # The diff ID (typically a sha256 hash) of the layer in the container image. + # @!attribute [rw] chain_id + # @return [::String] + # The layer chain ID (sha256 hash) of the layer in the container image. + # https://github.com/opencontainers/image-spec/blob/main/config.md#layer-chainid + # @!attribute [rw] command + # @return [::String] + # The layer build command that was used to build the layer. This may not be + # found in all layers depending on how the container image is built. + # @!attribute [rw] base_images + # @return [::Array<::Grafeas::V1::BaseImage>] + # The base images the layer is found within. + class LayerDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # License information. + # @!attribute [rw] expression + # @return [::String] + # Often a single license can be used to represent the licensing terms. + # Sometimes it is necessary to include a choice of one or more licenses + # or some combination of license identifiers. + # Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", + # "GPL-2.0-or-later WITH Bison-exception-2.2". + # @!attribute [rw] comments + # @return [::String] + # Comments + class License + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Digest information. + # @!attribute [rw] algo + # @return [::String] + # `SHA1`, `SHA512` etc. + # @!attribute [rw] digest_bytes + # @return [::String] + # Value of the digest. + class Digest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Kind represents the kinds of notes supported. + module NoteKind + # Default value. This value is unused. + NOTE_KIND_UNSPECIFIED = 0 + + # The note and occurrence represent a package vulnerability. + VULNERABILITY = 1 + + # The note and occurrence assert build provenance. + BUILD = 2 + + # This represents an image basis relationship. + IMAGE = 3 + + # This represents a package installed via a package manager. + PACKAGE = 4 + + # The note and occurrence track deployment events. + DEPLOYMENT = 5 + + # The note and occurrence track the initial discovery status of a resource. + DISCOVERY = 6 + + # This represents a logical "role" that can attest to artifacts. + ATTESTATION = 7 + + # This represents an available package upgrade. + UPGRADE = 8 + + # This represents a Compliance Note + COMPLIANCE = 9 + + # This represents a DSSE attestation Note + DSSE_ATTESTATION = 10 + + # This represents a Vulnerability Assessment. + VULNERABILITY_ASSESSMENT = 11 + + # This represents an SBOM Reference. + SBOM_REFERENCE = 12 + + # This represents a secret. + SECRET = 13 + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/compliance.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/compliance.rb new file mode 100644 index 000000000000..9c5f6037ecd1 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/compliance.rb @@ -0,0 +1,107 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Grafeas + module V1 + # @!attribute [rw] title + # @return [::String] + # The title that identifies this compliance check. + # @!attribute [rw] description + # @return [::String] + # A description about this compliance check. + # @!attribute [rw] version + # @return [::Array<::Grafeas::V1::ComplianceVersion>] + # The OS and config versions the benchmark applies to. + # @!attribute [rw] rationale + # @return [::String] + # A rationale for the existence of this compliance check. + # @!attribute [rw] remediation + # @return [::String] + # A description of remediation steps if the compliance check fails. + # @!attribute [rw] cis_benchmark + # @return [::Grafeas::V1::ComplianceNote::CisBenchmark] + # @!attribute [rw] scan_instructions + # @return [::String] + # Serialized scan instructions with a predefined format. + # @!attribute [rw] impact + # @return [::String] + class ComplianceNote + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A compliance check that is a CIS benchmark. + # @!attribute [rw] profile_level + # @return [::Integer] + # @!attribute [rw] severity + # @return [::Grafeas::V1::Severity] + class CisBenchmark + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the CIS benchmark version that is applicable to a given OS and + # os version. + # @!attribute [rw] cpe_uri + # @return [::String] + # The CPE URI (https://cpe.mitre.org/specification/) this benchmark is + # applicable to. + # @!attribute [rw] benchmark_document + # @return [::String] + # The name of the document that defines this benchmark, e.g. "CIS + # Container-Optimized OS". + # @!attribute [rw] version + # @return [::String] + # The version of the benchmark. This is set to the version of the OS-specific + # CIS document the benchmark is defined in. + class ComplianceVersion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An indication that the compliance checks in the associated ComplianceNote + # were not satisfied for particular resources or a specified reason. + # @!attribute [rw] non_compliant_files + # @return [::Array<::Grafeas::V1::NonCompliantFile>] + # @!attribute [rw] non_compliance_reason + # @return [::String] + # @!attribute [rw] version + # @return [::Grafeas::V1::ComplianceVersion] + # The OS and config version the benchmark was run on. + class ComplianceOccurrence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about files that caused a compliance check to fail. + # @!attribute [rw] path + # @return [::String] + # Empty if `display_command` is set. + # @!attribute [rw] display_command + # @return [::String] + # Command to display the non-compliant files. + # @!attribute [rw] reason + # @return [::String] + # Explains why a file is non compliant for a CIS check. + class NonCompliantFile + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/cvss.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/cvss.rb new file mode 100644 index 000000000000..b78b9235d922 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/cvss.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 Grafeas + module V1 + # Common Vulnerability Scoring System version 3. + # For details, see https://www.first.org/cvss/specification-document + # @!attribute [rw] base_score + # @return [::Float] + # The base score is a function of the base metric scores. + # @!attribute [rw] exploitability_score + # @return [::Float] + # @!attribute [rw] impact_score + # @return [::Float] + # @!attribute [rw] attack_vector + # @return [::Grafeas::V1::CVSSv3::AttackVector] + # Base Metrics + # Represents the intrinsic characteristics of a vulnerability that are + # constant over time and across user environments. + # @!attribute [rw] attack_complexity + # @return [::Grafeas::V1::CVSSv3::AttackComplexity] + # @!attribute [rw] privileges_required + # @return [::Grafeas::V1::CVSSv3::PrivilegesRequired] + # @!attribute [rw] user_interaction + # @return [::Grafeas::V1::CVSSv3::UserInteraction] + # @!attribute [rw] scope + # @return [::Grafeas::V1::CVSSv3::Scope] + # @!attribute [rw] confidentiality_impact + # @return [::Grafeas::V1::CVSSv3::Impact] + # @!attribute [rw] integrity_impact + # @return [::Grafeas::V1::CVSSv3::Impact] + # @!attribute [rw] availability_impact + # @return [::Grafeas::V1::CVSSv3::Impact] + class CVSSv3 + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + module AttackVector + ATTACK_VECTOR_UNSPECIFIED = 0 + + ATTACK_VECTOR_NETWORK = 1 + + ATTACK_VECTOR_ADJACENT = 2 + + ATTACK_VECTOR_LOCAL = 3 + + ATTACK_VECTOR_PHYSICAL = 4 + end + + module AttackComplexity + ATTACK_COMPLEXITY_UNSPECIFIED = 0 + + ATTACK_COMPLEXITY_LOW = 1 + + ATTACK_COMPLEXITY_HIGH = 2 + end + + module PrivilegesRequired + PRIVILEGES_REQUIRED_UNSPECIFIED = 0 + + PRIVILEGES_REQUIRED_NONE = 1 + + PRIVILEGES_REQUIRED_LOW = 2 + + PRIVILEGES_REQUIRED_HIGH = 3 + end + + module UserInteraction + USER_INTERACTION_UNSPECIFIED = 0 + + USER_INTERACTION_NONE = 1 + + USER_INTERACTION_REQUIRED = 2 + end + + module Scope + SCOPE_UNSPECIFIED = 0 + + SCOPE_UNCHANGED = 1 + + SCOPE_CHANGED = 2 + end + + module Impact + IMPACT_UNSPECIFIED = 0 + + IMPACT_HIGH = 1 + + IMPACT_LOW = 2 + + IMPACT_NONE = 3 + end + end + + # Common Vulnerability Scoring System. + # For details, see https://www.first.org/cvss/specification-document + # This is a message we will try to use for storing various versions of CVSS + # rather than making a separate proto for storing a specific version. + # @!attribute [rw] base_score + # @return [::Float] + # The base score is a function of the base metric scores. + # @!attribute [rw] exploitability_score + # @return [::Float] + # @!attribute [rw] impact_score + # @return [::Float] + # @!attribute [rw] attack_vector + # @return [::Grafeas::V1::CVSS::AttackVector] + # Attack Vector (AV). Defined in CVSS v2, v3, v4. + # @!attribute [rw] attack_complexity + # @return [::Grafeas::V1::CVSS::AttackComplexity] + # Attack Complexity (AC). Defined in CVSS v2, v3, v4. + # @!attribute [rw] authentication + # @return [::Grafeas::V1::CVSS::Authentication] + # Authentication (Au). Defined in CVSS v2. + # @!attribute [rw] privileges_required + # @return [::Grafeas::V1::CVSS::PrivilegesRequired] + # Privileges Required (PR). Defined in CVSS v3, v4. + # @!attribute [rw] user_interaction + # @return [::Grafeas::V1::CVSS::UserInteraction] + # User Interaction (UI). Defined in CVSS v3, v4. + # @!attribute [rw] scope + # @return [::Grafeas::V1::CVSS::Scope] + # Scope (S). Defined in CVSS v3. + # @!attribute [rw] confidentiality_impact + # @return [::Grafeas::V1::CVSS::Impact] + # Confidentiality Impact (C). Defined in CVSS v2, v3. + # @!attribute [rw] integrity_impact + # @return [::Grafeas::V1::CVSS::Impact] + # Integrity Impact (I). Defined in CVSS v2, v3. + # @!attribute [rw] availability_impact + # @return [::Grafeas::V1::CVSS::Impact] + # Availability Impact (A). Defined in CVSS v2, v3. + # @!attribute [rw] attack_requirements + # @return [::Grafeas::V1::CVSS::AttackRequirements] + # Attack Requirements (AT). Defined in CVSS v4. + # @!attribute [rw] vulnerable_system_confidentiality_impact + # @return [::Grafeas::V1::CVSS::Impact] + # Vulnerable System Confidentiality Impact (VC). Defined in CVSS v4. + # @!attribute [rw] vulnerable_system_integrity_impact + # @return [::Grafeas::V1::CVSS::Impact] + # Vulnerable System Integrity Impact (VI). Defined in CVSS v4. + # @!attribute [rw] vulnerable_system_availability_impact + # @return [::Grafeas::V1::CVSS::Impact] + # Vulnerable System Availability Impact (VA). Defined in CVSS v4. + # @!attribute [rw] subsequent_system_confidentiality_impact + # @return [::Grafeas::V1::CVSS::Impact] + # Subsequent System Confidentiality Impact (SC). Defined in CVSS v4. + # @!attribute [rw] subsequent_system_integrity_impact + # @return [::Grafeas::V1::CVSS::Impact] + # Subsequent System Integrity Impact (SI). Defined in CVSS v4. + # @!attribute [rw] subsequent_system_availability_impact + # @return [::Grafeas::V1::CVSS::Impact] + # Subsequent System Availability Impact (SA). Defined in CVSS v4. + # @!attribute [rw] exploit_maturity + # @return [::Grafeas::V1::CVSS::ExploitMaturity] + # Exploit Maturity (E). Defined in CVSS v4. + class CVSS + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Attack Vector. + module AttackVector + # Unspecified. + ATTACK_VECTOR_UNSPECIFIED = 0 + + # Attack Vector: Network (AV:N). Defined in CVSS v2, v3, v4. + ATTACK_VECTOR_NETWORK = 1 + + # Attack Vector: Adjacent (AV:A). Defined in CVSS v2, v3, v4. + ATTACK_VECTOR_ADJACENT = 2 + + # Attack Vector: Local (AV:L). Defined in CVSS v2, v3, v4. + ATTACK_VECTOR_LOCAL = 3 + + # Attack Vector: Physical (AV:P). Defined in CVSS v3, v4. + ATTACK_VECTOR_PHYSICAL = 4 + end + + # Attack Complexity. + module AttackComplexity + # Unspecified. + ATTACK_COMPLEXITY_UNSPECIFIED = 0 + + # Low attack complexity (AC:L). Defined in CVSS v2, v3, v4. + ATTACK_COMPLEXITY_LOW = 1 + + # High attack complexity (AC:H). Defined in CVSS v2, v3, v4. + ATTACK_COMPLEXITY_HIGH = 2 + + # Medium attack complexity (AC:M). Defined in CVSS v2. + ATTACK_COMPLEXITY_MEDIUM = 3 + end + + # Authentication. + module Authentication + # Unspecified. + AUTHENTICATION_UNSPECIFIED = 0 + + # Multiple authentication required (Au:M). Defined in CVSS v2. + AUTHENTICATION_MULTIPLE = 1 + + # Single authentication required (Au:S). Defined in CVSS v2. + AUTHENTICATION_SINGLE = 2 + + # No authentication required (Au:N). Defined in CVSS v2. + AUTHENTICATION_NONE = 3 + end + + # Privileges Required. + module PrivilegesRequired + # Unspecified. + PRIVILEGES_REQUIRED_UNSPECIFIED = 0 + + # No privileges required (PR:N). Defined in CVSS v3, v4. + PRIVILEGES_REQUIRED_NONE = 1 + + # Low privileges required (PR:L). Defined in CVSS v3, v4. + PRIVILEGES_REQUIRED_LOW = 2 + + # High privileges required (PR:H). Defined in CVSS v3, v4. + PRIVILEGES_REQUIRED_HIGH = 3 + end + + # User Interaction. + module UserInteraction + # Unspecified. + USER_INTERACTION_UNSPECIFIED = 0 + + # No user interaction required (UI:N). Defined in CVSS v3, v4. + USER_INTERACTION_NONE = 1 + + # User interaction required (UI:R). Defined in CVSS v3. + USER_INTERACTION_REQUIRED = 2 + + # Passive user interaction required (UI:P). Defined in CVSS v4. + USER_INTERACTION_PASSIVE = 3 + + # Active user interaction required (UI:A). Defined in CVSS v4. + USER_INTERACTION_ACTIVE = 4 + end + + # Scope. + module Scope + # Unspecified. + SCOPE_UNSPECIFIED = 0 + + # Scope: Unchanged (S:U). Defined in CVSS v3. + SCOPE_UNCHANGED = 1 + + # Scope: Changed (S:C). Defined in CVSS v3. + SCOPE_CHANGED = 2 + end + + # Impact. + module Impact + # Unspecified. + IMPACT_UNSPECIFIED = 0 + + # High impact (H). Defined in CVSS v3, v4. + IMPACT_HIGH = 1 + + # Low impact (L). Defined in CVSS v3, v4. + IMPACT_LOW = 2 + + # No impact (N). Defined in CVSS v2, v3, v4. + IMPACT_NONE = 3 + + # Partial impact (P). Defined in CVSS v2. + IMPACT_PARTIAL = 4 + + # Complete impact (C). Defined in CVSS v2. + IMPACT_COMPLETE = 5 + end + + # Attack Requirements. + module AttackRequirements + # Unspecified. + ATTACK_REQUIREMENTS_UNSPECIFIED = 0 + + # No attack requirements (AT:N). Defined in CVSS v4. + ATTACK_REQUIREMENTS_NONE = 1 + + # Attack requirements: Present (AT:P). Defined in CVSS v4. + ATTACK_REQUIREMENTS_PRESENT = 2 + end + + # Exploit Maturity (E). Defined in CVSS v4. + module ExploitMaturity + # Unspecified. + EXPLOIT_MATURITY_UNSPECIFIED = 0 + + # Exploit maturity: Not defined (E:X). Defined in CVSS v4. + EXPLOIT_MATURITY_NOT_DEFINED = 1 + + # Exploit maturity: Attacked (E:A). Defined in CVSS v4. + EXPLOIT_MATURITY_ATTACKED = 2 + + # Exploit maturity: Proof-of-concept (E:P). Defined in CVSS v4. + EXPLOIT_MATURITY_POC = 3 + + # Exploit maturity: Unreported (E:U). Defined in CVSS v4. + EXPLOIT_MATURITY_UNREPORTED = 4 + end + end + + # CVSS Version. + module CVSSVersion + # Unspecified. + CVSS_VERSION_UNSPECIFIED = 0 + + # CVSS v2. + CVSS_VERSION_2 = 1 + + # CVSS v3. + CVSS_VERSION_3 = 2 + + # CVSS v4. + CVSS_VERSION_4 = 3 + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/deployment.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/deployment.rb new file mode 100644 index 000000000000..0ac1498fd779 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/deployment.rb @@ -0,0 +1,74 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Grafeas + module V1 + # An artifact that can be deployed in some runtime. + # @!attribute [rw] resource_uri + # @return [::Array<::String>] + # Required. Resource URI for the artifact being deployed. + class DeploymentNote + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The period during which some deployable was active in a runtime. + # @!attribute [rw] user_email + # @return [::String] + # Identity of the user that triggered this deployment. + # @!attribute [rw] deploy_time + # @return [::Google::Protobuf::Timestamp] + # Required. Beginning of the lifetime of this deployment. + # @!attribute [rw] undeploy_time + # @return [::Google::Protobuf::Timestamp] + # End of the lifetime of this deployment. + # @!attribute [rw] config + # @return [::String] + # Configuration used to create this deployment. + # @!attribute [rw] address + # @return [::String] + # Address of the runtime element hosting this deployment. + # @!attribute [rw] resource_uri + # @return [::Array<::String>] + # Output only. Resource URI for the artifact being deployed taken from + # the deployable field with the same name. + # @!attribute [rw] platform + # @return [::Grafeas::V1::DeploymentOccurrence::Platform] + # Platform hosting this deployment. + class DeploymentOccurrence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Types of platforms. + module Platform + # Unknown. + PLATFORM_UNSPECIFIED = 0 + + # Google Container Engine. + GKE = 1 + + # Google App Engine: Flexible Environment. + FLEX = 2 + + # Custom user-defined platform. + CUSTOM = 3 + end + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/discovery.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/discovery.rb new file mode 100644 index 000000000000..afc178d1339c --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/discovery.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 Grafeas + module V1 + # A note that indicates a type of analysis a provider would perform. This note + # exists in a provider's project. A `Discovery` occurrence is created in a + # consumer's project at the start of analysis. + # @!attribute [rw] analysis_kind + # @return [::Grafeas::V1::NoteKind] + # Required. Immutable. The kind of analysis that is handled by this + # discovery. + class DiscoveryNote + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides information about the analysis status of a discovered resource. + # @!attribute [rw] continuous_analysis + # @return [::Grafeas::V1::DiscoveryOccurrence::ContinuousAnalysis] + # Whether the resource is continuously analyzed. + # @!attribute [rw] analysis_status + # @return [::Grafeas::V1::DiscoveryOccurrence::AnalysisStatus] + # The status of discovery for the resource. + # @!attribute [rw] analysis_completed + # @return [::Grafeas::V1::DiscoveryOccurrence::AnalysisCompleted] + # @!attribute [rw] analysis_error + # @return [::Array<::Google::Rpc::Status>] + # Indicates any errors encountered during analysis of a resource. There + # could be 0 or more of these errors. + # @!attribute [rw] analysis_status_error + # @return [::Google::Rpc::Status] + # When an error is encountered this will contain a LocalizedMessage under + # details to show to the user. The LocalizedMessage is output only and + # populated by the API. + # @!attribute [rw] cpe + # @return [::String] + # The CPE of the resource being scanned. + # @!attribute [rw] last_scan_time + # @return [::Google::Protobuf::Timestamp] + # The last time this resource was scanned. + # @!attribute [r] archive_time + # @return [::Google::Protobuf::Timestamp] + # The time occurrences related to this discovery occurrence were archived. + # @!attribute [rw] sbom_status + # @return [::Grafeas::V1::DiscoveryOccurrence::SBOMStatus] + # The status of an SBOM generation. + # @!attribute [rw] vulnerability_attestation + # @return [::Grafeas::V1::DiscoveryOccurrence::VulnerabilityAttestation] + # The status of an vulnerability attestation generation. + # @!attribute [rw] files + # @return [::Array<::Grafeas::V1::DiscoveryOccurrence::File>] + # Files that make up the resource described by the occurrence. + # @!attribute [rw] last_vulnerability_update_time + # @return [::Google::Protobuf::Timestamp] + # The last time vulnerability scan results changed. + class DiscoveryOccurrence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates which analysis completed successfully. Multiple types of + # analysis can be performed on a single resource. + # @!attribute [rw] analysis_type + # @return [::Array<::String>] + class AnalysisCompleted + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The status of an SBOM generation. + # @!attribute [rw] sbom_state + # @return [::Grafeas::V1::DiscoveryOccurrence::SBOMStatus::SBOMState] + # The progress of the SBOM generation. + # @!attribute [rw] error + # @return [::String] + # If there was an error generating an SBOM, this will indicate what that + # error was. + class SBOMStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An enum indicating the progress of the SBOM generation. + module SBOMState + # Default unknown state. + SBOM_STATE_UNSPECIFIED = 0 + + # SBOM scanning is pending. + PENDING = 1 + + # SBOM scanning has completed. + COMPLETE = 2 + end + end + + # The status of an vulnerability attestation generation. + # @!attribute [rw] last_attempt_time + # @return [::Google::Protobuf::Timestamp] + # The last time we attempted to generate an attestation. + # @!attribute [rw] state + # @return [::Grafeas::V1::DiscoveryOccurrence::VulnerabilityAttestation::VulnerabilityAttestationState] + # The success/failure state of the latest attestation attempt. + # @!attribute [rw] error + # @return [::String] + # If failure, the error reason for why the attestation generation failed. + class VulnerabilityAttestation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An enum indicating the state of the attestation generation. + module VulnerabilityAttestationState + # Default unknown state. + VULNERABILITY_ATTESTATION_STATE_UNSPECIFIED = 0 + + # Attestation was successfully generated and stored. + SUCCESS = 1 + + # Attestation was unsuccessfully generated and stored. + FAILURE = 2 + end + end + + # @!attribute [rw] name + # @return [::String] + # @!attribute [rw] digest + # @return [::Google::Protobuf::Map{::String => ::String}] + class File + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class DigestEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Whether the resource is continuously analyzed. + module ContinuousAnalysis + # Unknown. + CONTINUOUS_ANALYSIS_UNSPECIFIED = 0 + + # The resource is continuously analyzed. + ACTIVE = 1 + + # The resource is ignored for continuous analysis. + INACTIVE = 2 + end + + # Analysis status for a resource. Currently for initial analysis only (not + # updated in continuous analysis). + module AnalysisStatus + # Unknown. + ANALYSIS_STATUS_UNSPECIFIED = 0 + + # Resource is known but no action has been taken yet. + PENDING = 1 + + # Resource is being analyzed. + SCANNING = 2 + + # Analysis has finished successfully. + FINISHED_SUCCESS = 3 + + # Analysis has completed. + COMPLETE = 3 + + # Analysis has finished unsuccessfully, the analysis itself is in a bad + # state. + FINISHED_FAILED = 4 + + # The resource is known not to be supported. + FINISHED_UNSUPPORTED = 5 + end + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/dsse_attestation.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/dsse_attestation.rb new file mode 100644 index 000000000000..322be7281007 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/dsse_attestation.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! + + +module Grafeas + module V1 + # @!attribute [rw] hint + # @return [::Grafeas::V1::DSSEAttestationNote::DSSEHint] + # DSSEHint hints at the purpose of the attestation authority. + class DSSEAttestationNote + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # This submessage provides human-readable hints about the purpose of the + # authority. Because the name of a note acts as its resource reference, it is + # important to disambiguate the canonical name of the Note (which might be a + # UUID for security purposes) from "readable" names more suitable for debug + # output. Note that these hints should not be used to look up authorities in + # security sensitive contexts, such as when looking up attestations to + # verify. + # @!attribute [rw] human_readable_name + # @return [::String] + # Required. The human readable name of this attestation authority, for + # example "cloudbuild-prod". + class DSSEHint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Deprecated. Prefer to use a regular Occurrence, and populate the + # Envelope at the top level of the Occurrence. + # @!attribute [rw] envelope + # @return [::Grafeas::V1::Envelope] + # If doing something security critical, make sure to verify the signatures in + # this metadata. + # @!attribute [rw] statement + # @return [::Grafeas::V1::InTotoStatement] + class DSSEAttestationOccurrence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/grafeas.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/grafeas.rb new file mode 100644 index 000000000000..e9e28629e628 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/grafeas.rb @@ -0,0 +1,510 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Grafeas + module V1 + # An instance of an analysis type that has been found on a resource. + # @!attribute [rw] name + # @return [::String] + # Output only. The name of the occurrence in the form of + # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + # @!attribute [rw] resource_uri + # @return [::String] + # Required. Immutable. A URI that represents the resource for which the + # occurrence applies. For example, + # `https://gcr.io/project/image@sha256:123abc` for a Docker image. + # @!attribute [rw] note_name + # @return [::String] + # Required. Immutable. The analysis note associated with this occurrence, in + # the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be + # used as a filter in list requests. + # @!attribute [rw] kind + # @return [::Grafeas::V1::NoteKind] + # Output only. This explicitly denotes which of the occurrence details are + # specified. This field can be used as a filter in list requests. + # @!attribute [rw] remediation + # @return [::String] + # A description of actions that can be taken to remedy the note. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time this occurrence was created. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time this occurrence was last updated. + # @!attribute [rw] vulnerability + # @return [::Grafeas::V1::VulnerabilityOccurrence] + # Describes a security vulnerability. + # + # Note: The following fields are mutually exclusive: `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] build + # @return [::Grafeas::V1::BuildOccurrence] + # Describes a verifiable build. + # + # Note: The following fields are mutually exclusive: `build`, `vulnerability`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image + # @return [::Grafeas::V1::ImageOccurrence] + # Describes how this resource derives from the basis in the associated + # note. + # + # Note: The following fields are mutually exclusive: `image`, `vulnerability`, `build`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] package + # @return [::Grafeas::V1::PackageOccurrence] + # Describes the installation of a package on the linked resource. + # + # Note: The following fields are mutually exclusive: `package`, `vulnerability`, `build`, `image`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] deployment + # @return [::Grafeas::V1::DeploymentOccurrence] + # Describes the deployment of an artifact on a runtime. + # + # Note: The following fields are mutually exclusive: `deployment`, `vulnerability`, `build`, `image`, `package`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] discovery + # @return [::Grafeas::V1::DiscoveryOccurrence] + # Describes when a resource was discovered. + # + # Note: The following fields are mutually exclusive: `discovery`, `vulnerability`, `build`, `image`, `package`, `deployment`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] attestation + # @return [::Grafeas::V1::AttestationOccurrence] + # Describes an attestation of an artifact. + # + # Note: The following fields are mutually exclusive: `attestation`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `upgrade`, `compliance`, `dsse_attestation`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] upgrade + # @return [::Grafeas::V1::UpgradeOccurrence] + # Describes an available package upgrade on the linked resource. + # + # Note: The following fields are mutually exclusive: `upgrade`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `compliance`, `dsse_attestation`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] compliance + # @return [::Grafeas::V1::ComplianceOccurrence] + # Describes a compliance violation on a linked resource. + # + # Note: The following fields are mutually exclusive: `compliance`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `dsse_attestation`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] dsse_attestation + # @return [::Grafeas::V1::DSSEAttestationOccurrence] + # Describes an attestation of an artifact using dsse. + # + # Note: The following fields are mutually exclusive: `dsse_attestation`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sbom_reference + # @return [::Grafeas::V1::SBOMReferenceOccurrence] + # Describes a specific SBOM reference occurrences. + # + # Note: The following fields are mutually exclusive: `sbom_reference`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] secret + # @return [::Grafeas::V1::SecretOccurrence] + # Describes a secret. + # + # Note: The following fields are mutually exclusive: `secret`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `sbom_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] envelope + # @return [::Grafeas::V1::Envelope] + # https://github.com/secure-systems-lab/dsse + class Occurrence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A type of analysis that can be done for a resource. + # @!attribute [rw] name + # @return [::String] + # Output only. The name of the note in the form of + # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + # @!attribute [rw] short_description + # @return [::String] + # A one sentence description of this note. + # @!attribute [rw] long_description + # @return [::String] + # A detailed description of this note. + # @!attribute [rw] kind + # @return [::Grafeas::V1::NoteKind] + # Output only. The type of analysis. This field can be used as a filter in + # list requests. + # @!attribute [rw] related_url + # @return [::Array<::Grafeas::V1::RelatedUrl>] + # URLs associated with this note. + # @!attribute [rw] expiration_time + # @return [::Google::Protobuf::Timestamp] + # Time of expiration for this note. Empty if note does not expire. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time this note was created. This field can be used as a + # filter in list requests. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time this note was last updated. This field can be used as + # a filter in list requests. + # @!attribute [rw] related_note_names + # @return [::Array<::String>] + # Other notes related to this note. + # @!attribute [rw] vulnerability + # @return [::Grafeas::V1::VulnerabilityNote] + # A note describing a package vulnerability. + # + # Note: The following fields are mutually exclusive: `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `vulnerability_assessment`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] build + # @return [::Grafeas::V1::BuildNote] + # A note describing build provenance for a verifiable build. + # + # Note: The following fields are mutually exclusive: `build`, `vulnerability`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `vulnerability_assessment`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] image + # @return [::Grafeas::V1::ImageNote] + # A note describing a base image. + # + # Note: The following fields are mutually exclusive: `image`, `vulnerability`, `build`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `vulnerability_assessment`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] package + # @return [::Grafeas::V1::PackageNote] + # A note describing a package hosted by various package managers. + # + # Note: The following fields are mutually exclusive: `package`, `vulnerability`, `build`, `image`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `vulnerability_assessment`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] deployment + # @return [::Grafeas::V1::DeploymentNote] + # A note describing something that can be deployed. + # + # Note: The following fields are mutually exclusive: `deployment`, `vulnerability`, `build`, `image`, `package`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `vulnerability_assessment`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] discovery + # @return [::Grafeas::V1::DiscoveryNote] + # A note describing the initial analysis of a resource. + # + # Note: The following fields are mutually exclusive: `discovery`, `vulnerability`, `build`, `image`, `package`, `deployment`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `vulnerability_assessment`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] attestation + # @return [::Grafeas::V1::AttestationNote] + # A note describing an attestation role. + # + # Note: The following fields are mutually exclusive: `attestation`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `upgrade`, `compliance`, `dsse_attestation`, `vulnerability_assessment`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] upgrade + # @return [::Grafeas::V1::UpgradeNote] + # A note describing available package upgrades. + # + # Note: The following fields are mutually exclusive: `upgrade`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `compliance`, `dsse_attestation`, `vulnerability_assessment`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] compliance + # @return [::Grafeas::V1::ComplianceNote] + # A note describing a compliance check. + # + # Note: The following fields are mutually exclusive: `compliance`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `dsse_attestation`, `vulnerability_assessment`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] dsse_attestation + # @return [::Grafeas::V1::DSSEAttestationNote] + # A note describing a dsse attestation note. + # + # Note: The following fields are mutually exclusive: `dsse_attestation`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `vulnerability_assessment`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] vulnerability_assessment + # @return [::Grafeas::V1::VulnerabilityAssessmentNote] + # A note describing a vulnerability assessment. + # + # Note: The following fields are mutually exclusive: `vulnerability_assessment`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sbom_reference + # @return [::Grafeas::V1::SBOMReferenceNote] + # A note describing an SBOM reference. + # + # Note: The following fields are mutually exclusive: `sbom_reference`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `vulnerability_assessment`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] secret + # @return [::Grafeas::V1::SecretNote] + # A note describing a secret. + # + # Note: The following fields are mutually exclusive: `secret`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `vulnerability_assessment`, `sbom_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Note + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get an occurrence. + # @!attribute [rw] name + # @return [::String] + # The name of the occurrence in the form of + # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + class GetOccurrenceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list occurrences. + # @!attribute [rw] parent + # @return [::String] + # The name of the project to list occurrences for in the form of + # `projects/[PROJECT_ID]`. + # @!attribute [rw] filter + # @return [::String] + # The filter expression. + # @!attribute [rw] page_size + # @return [::Integer] + # Number of occurrences to return in the list. Must be positive. Max allowed + # page size is 1000. If not specified, page size defaults to 20. + # @!attribute [rw] page_token + # @return [::String] + # Token to provide to skip to a particular spot in the list. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # If set, the request will return all reachable Occurrences + # and report all unreachable regions in the `unreachable` field in + # the response. + # + # Only applicable for requests in the global region. + class ListOccurrencesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for listing occurrences. + # @!attribute [rw] occurrences + # @return [::Array<::Grafeas::V1::Occurrence>] + # The occurrences requested. + # @!attribute [rw] next_page_token + # @return [::String] + # The next pagination token in the list response. It should be used as + # `page_token` for the following request. An empty value means no more + # results. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable regions. Populated for requests from the global region + # when `return_partial_success` is set. + # + # Format: `projects/[PROJECT_ID]/locations/[LOCATION]` + class ListOccurrencesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete an occurrence. + # @!attribute [rw] name + # @return [::String] + # The name of the occurrence in the form of + # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + class DeleteOccurrenceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create a new occurrence. + # @!attribute [rw] parent + # @return [::String] + # The name of the project in the form of `projects/[PROJECT_ID]`, under which + # the occurrence is to be created. + # @!attribute [rw] occurrence + # @return [::Grafeas::V1::Occurrence] + # The occurrence to create. + class CreateOccurrenceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update an occurrence. + # @!attribute [rw] name + # @return [::String] + # The name of the occurrence in the form of + # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + # @!attribute [rw] occurrence + # @return [::Grafeas::V1::Occurrence] + # The updated occurrence. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The fields to update. + class UpdateOccurrenceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get a note. + # @!attribute [rw] name + # @return [::String] + # The name of the note in the form of + # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + class GetNoteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get the note to which the specified occurrence is attached. + # @!attribute [rw] name + # @return [::String] + # The name of the occurrence in the form of + # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + class GetOccurrenceNoteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list notes. + # @!attribute [rw] parent + # @return [::String] + # The name of the project to list notes for in the form of + # `projects/[PROJECT_ID]`. + # @!attribute [rw] filter + # @return [::String] + # The filter expression. + # @!attribute [rw] page_size + # @return [::Integer] + # Number of notes to return in the list. Must be positive. Max allowed page + # size is 1000. If not specified, page size defaults to 20. + # @!attribute [rw] page_token + # @return [::String] + # Token to provide to skip to a particular spot in the list. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # If set, the request will return all reachable Notes + # and report all unreachable regions in the `unreachable` field in + # the response. + # + # Only applicable for requests in the global region. + class ListNotesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for listing notes. + # @!attribute [rw] notes + # @return [::Array<::Grafeas::V1::Note>] + # The notes requested. + # @!attribute [rw] next_page_token + # @return [::String] + # The next pagination token in the list response. It should be used as + # `page_token` for the following request. An empty value means no more + # results. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable regions. Populated for requests from the global region + # when `return_partial_success` is set. + # + # Format: `projects/[PROJECT_ID]/locations/[LOCATION]` + class ListNotesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete a note. + # @!attribute [rw] name + # @return [::String] + # The name of the note in the form of + # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + class DeleteNoteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create a new note. + # @!attribute [rw] parent + # @return [::String] + # The name of the project in the form of `projects/[PROJECT_ID]`, under which + # the note is to be created. + # @!attribute [rw] note_id + # @return [::String] + # The ID to use for this note. + # @!attribute [rw] note + # @return [::Grafeas::V1::Note] + # The note to create. + class CreateNoteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update a note. + # @!attribute [rw] name + # @return [::String] + # The name of the note in the form of + # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + # @!attribute [rw] note + # @return [::Grafeas::V1::Note] + # The updated note. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The fields to update. + class UpdateNoteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list occurrences for a note. + # @!attribute [rw] name + # @return [::String] + # The name of the note to list occurrences for in the form of + # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + # @!attribute [rw] filter + # @return [::String] + # The filter expression. + # @!attribute [rw] page_size + # @return [::Integer] + # Number of occurrences to return in the list. + # @!attribute [rw] page_token + # @return [::String] + # Token to provide to skip to a particular spot in the list. + class ListNoteOccurrencesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for listing occurrences for a note. + # @!attribute [rw] occurrences + # @return [::Array<::Grafeas::V1::Occurrence>] + # The occurrences attached to the specified note. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to provide to skip to a particular spot in the list. + class ListNoteOccurrencesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create notes in batch. + # @!attribute [rw] parent + # @return [::String] + # The name of the project in the form of `projects/[PROJECT_ID]`, under which + # the notes are to be created. + # @!attribute [rw] notes + # @return [::Google::Protobuf::Map{::String => ::Grafeas::V1::Note}] + # The notes to create. Max allowed length is 1000. + class BatchCreateNotesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Grafeas::V1::Note] + class NotesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Response for creating notes in batch. + # @!attribute [rw] notes + # @return [::Array<::Grafeas::V1::Note>] + # The notes that were created. + class BatchCreateNotesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create occurrences in batch. + # @!attribute [rw] parent + # @return [::String] + # The name of the project in the form of `projects/[PROJECT_ID]`, under which + # the occurrences are to be created. + # @!attribute [rw] occurrences + # @return [::Array<::Grafeas::V1::Occurrence>] + # The occurrences to create. Max allowed length is 1000. + class BatchCreateOccurrencesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for creating occurrences in batch. + # @!attribute [rw] occurrences + # @return [::Array<::Grafeas::V1::Occurrence>] + # The occurrences that were created. + class BatchCreateOccurrencesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/image.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/image.rb new file mode 100644 index 000000000000..546d369f44fc --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/image.rb @@ -0,0 +1,95 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Grafeas + module V1 + # Layer holds metadata specific to a layer of a Docker image. + # @!attribute [rw] directive + # @return [::String] + # Required. The recovered Dockerfile directive used to construct this layer. + # See https://docs.docker.com/engine/reference/builder/ for more information. + # @!attribute [rw] arguments + # @return [::String] + # The recovered arguments to the Dockerfile directive. + class Layer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A set of properties that uniquely identify a given Docker image. + # @!attribute [rw] v1_name + # @return [::String] + # Required. The layer ID of the final layer in the Docker image's v1 + # representation. + # @!attribute [rw] v2_blob + # @return [::Array<::String>] + # Required. The ordered list of v2 blobs that represent a given image. + # @!attribute [rw] v2_name + # @return [::String] + # Output only. The name of the image's v2 blobs computed via: + # [bottom] := v2_blob[bottom] + # [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) + # Only the name of the final blob is kept. + class Fingerprint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Basis describes the base image portion (Note) of the DockerImage + # relationship. Linked occurrences are derived from this or an equivalent image + # via: + # FROM + # Or an equivalent reference, e.g., a tag of the resource_url. + # @!attribute [rw] resource_url + # @return [::String] + # Required. Immutable. The resource_url for the resource representing the + # basis of associated occurrence images. + # @!attribute [rw] fingerprint + # @return [::Grafeas::V1::Fingerprint] + # Required. Immutable. The fingerprint of the base image. + class ImageNote + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of the derived image portion of the DockerImage relationship. This + # image would be produced from a Dockerfile with FROM . + # @!attribute [rw] fingerprint + # @return [::Grafeas::V1::Fingerprint] + # Required. The fingerprint of the derived image. + # @!attribute [rw] distance + # @return [::Integer] + # Output only. The number of layers by which this image differs from the + # associated image basis. + # @!attribute [rw] layer_info + # @return [::Array<::Grafeas::V1::Layer>] + # This contains layer-specific metadata, if populated it has length + # "distance" and is ordered with [distance] being the layer immediately + # following the base image and [1] being the final layer. + # @!attribute [rw] base_resource_url + # @return [::String] + # Output only. This contains the base image URL for the derived image + # occurrence. + class ImageOccurrence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/intoto_provenance.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/intoto_provenance.rb new file mode 100644 index 000000000000..c808aee223da --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/intoto_provenance.rb @@ -0,0 +1,134 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Grafeas + module V1 + # Steps taken to build the artifact. + # For a TaskRun, typically each container corresponds to one step in the + # recipe. + # @!attribute [rw] type + # @return [::String] + # URI indicating what type of recipe was performed. It determines the meaning + # of recipe.entryPoint, recipe.arguments, recipe.environment, and materials. + # @!attribute [rw] defined_in_material + # @return [::Integer] + # Index in materials containing the recipe steps that are not implied by + # recipe.type. For example, if the recipe type were "make", then this would + # point to the source containing the Makefile, not the make program itself. + # Set to -1 if the recipe doesn't come from a material, as zero is default + # unset value for int64. + # @!attribute [rw] entry_point + # @return [::String] + # String identifying the entry point into the build. + # This is often a path to a configuration file and/or a target label within + # that file. The syntax and meaning are defined by recipe.type. For example, + # if the recipe type were "make", then this would reference the directory in + # which to run make as well as which target to use. + # @!attribute [rw] arguments + # @return [::Array<::Google::Protobuf::Any>] + # Collection of all external inputs that influenced the build on top of + # recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe + # type were "make", then this might be the flags passed to make aside from + # the target, which is captured in recipe.entryPoint. Since the arguments + # field can greatly vary in structure, depending on the builder and recipe + # type, this is of form "Any". + # @!attribute [rw] environment + # @return [::Array<::Google::Protobuf::Any>] + # Any other builder-controlled inputs necessary for correctly evaluating the + # recipe. Usually only needed for reproducing the build but not evaluated as + # part of policy. Since the environment field can greatly vary in structure, + # depending on the builder and recipe type, this is of form "Any". + class Recipe + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Indicates that the builder claims certain fields in this message to be + # complete. + # @!attribute [rw] arguments + # @return [::Boolean] + # If true, the builder claims that recipe.arguments is complete, meaning that + # all external inputs are properly captured in the recipe. + # @!attribute [rw] environment + # @return [::Boolean] + # If true, the builder claims that recipe.environment is claimed to be + # complete. + # @!attribute [rw] materials + # @return [::Boolean] + # If true, the builder claims that materials are complete, usually through + # some controls to prevent network access. Sometimes called "hermetic". + class Completeness + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Other properties of the build. + # @!attribute [rw] build_invocation_id + # @return [::String] + # Identifies the particular build invocation, which can be useful for finding + # associated logs or other ad-hoc analysis. The value SHOULD be globally + # unique, per in-toto Provenance spec. + # @!attribute [rw] build_started_on + # @return [::Google::Protobuf::Timestamp] + # The timestamp of when the build started. + # @!attribute [rw] build_finished_on + # @return [::Google::Protobuf::Timestamp] + # The timestamp of when the build completed. + # @!attribute [rw] completeness + # @return [::Grafeas::V1::Completeness] + # Indicates that the builder claims certain fields in this message to be + # complete. + # @!attribute [rw] reproducible + # @return [::Boolean] + # If true, the builder claims that running the recipe on materials will + # produce bit-for-bit identical output. + class Metadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] id + # @return [::String] + class BuilderConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] builder_config + # @return [::Grafeas::V1::BuilderConfig] + # @!attribute [rw] recipe + # @return [::Grafeas::V1::Recipe] + # Identifies the configuration used for the build. + # When combined with materials, this SHOULD fully describe the build, + # such that re-running this recipe results in bit-for-bit identical output + # (if the build is reproducible). + # @!attribute [rw] metadata + # @return [::Grafeas::V1::Metadata] + # @!attribute [rw] materials + # @return [::Array<::String>] + # The collection of artifacts that influenced the build including sources, + # dependencies, build tools, base images, and so on. This is considered to be + # incomplete unless metadata.completeness.materials is true. Unset or null is + # equivalent to empty. + class InTotoProvenance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/intoto_statement.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/intoto_statement.rb new file mode 100644 index 000000000000..290e99770158 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/intoto_statement.rb @@ -0,0 +1,189 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Grafeas + module V1 + # Spec defined at + # https://github.com/in-toto/attestation/tree/main/spec#statement The + # serialized InTotoStatement will be stored as Envelope.payload. + # Envelope.payloadType is always "application/vnd.in-toto+json". + # @!attribute [rw] type + # @return [::String] + # Always `https://in-toto.io/Statement/v0.1`. + # @!attribute [rw] subject + # @return [::Array<::Grafeas::V1::Subject>] + # @!attribute [rw] predicate_type + # @return [::String] + # `https://slsa.dev/provenance/v0.1` for SlsaProvenance. + # @!attribute [rw] provenance + # @return [::Grafeas::V1::InTotoProvenance] + # Note: The following fields are mutually exclusive: `provenance`, `slsa_provenance`, `slsa_provenance_zero_two`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] slsa_provenance + # @return [::Grafeas::V1::SlsaProvenance] + # Note: The following fields are mutually exclusive: `slsa_provenance`, `provenance`, `slsa_provenance_zero_two`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] slsa_provenance_zero_two + # @return [::Grafeas::V1::SlsaProvenanceZeroTwo] + # Note: The following fields are mutually exclusive: `slsa_provenance_zero_two`, `provenance`, `slsa_provenance`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class InTotoStatement + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] name + # @return [::String] + # @!attribute [rw] digest + # @return [::Google::Protobuf::Map{::String => ::String}] + # `"": ""` + # Algorithms can be e.g. sha256, sha512 + # See + # https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet + class Subject + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class DigestEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] type + # @return [::String] + # InToto spec defined at + # https://github.com/in-toto/attestation/tree/main/spec#statement + # @!attribute [rw] subject + # @return [::Array<::Grafeas::V1::Subject>] + # @!attribute [rw] predicate_type + # @return [::String] + # @!attribute [rw] predicate + # @return [::Grafeas::V1::InTotoSlsaProvenanceV1::SlsaProvenanceV1] + class InTotoSlsaProvenanceV1 + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Keep in sync with schema at + # https://github.com/slsa-framework/slsa/blob/main/docs/provenance/schema/v1/provenance.proto + # Builder renamed to ProvenanceBuilder because of Java conflicts. + # @!attribute [rw] build_definition + # @return [::Grafeas::V1::InTotoSlsaProvenanceV1::BuildDefinition] + # @!attribute [rw] run_details + # @return [::Grafeas::V1::InTotoSlsaProvenanceV1::RunDetails] + class SlsaProvenanceV1 + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] build_type + # @return [::String] + # @!attribute [rw] external_parameters + # @return [::Google::Protobuf::Struct] + # @!attribute [rw] internal_parameters + # @return [::Google::Protobuf::Struct] + # @!attribute [rw] resolved_dependencies + # @return [::Array<::Grafeas::V1::InTotoSlsaProvenanceV1::ResourceDescriptor>] + class BuildDefinition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] name + # @return [::String] + # @!attribute [rw] uri + # @return [::String] + # @!attribute [rw] digest + # @return [::Google::Protobuf::Map{::String => ::String}] + # @!attribute [rw] content + # @return [::String] + # @!attribute [rw] download_location + # @return [::String] + # @!attribute [rw] media_type + # @return [::String] + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class DigestEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] builder + # @return [::Grafeas::V1::InTotoSlsaProvenanceV1::ProvenanceBuilder] + # @!attribute [rw] metadata + # @return [::Grafeas::V1::InTotoSlsaProvenanceV1::BuildMetadata] + # @!attribute [rw] byproducts + # @return [::Array<::Grafeas::V1::InTotoSlsaProvenanceV1::ResourceDescriptor>] + class RunDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] id + # @return [::String] + # @!attribute [rw] version + # @return [::Google::Protobuf::Map{::String => ::String}] + # @!attribute [rw] builder_dependencies + # @return [::Array<::Grafeas::V1::InTotoSlsaProvenanceV1::ResourceDescriptor>] + class ProvenanceBuilder + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class VersionEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] invocation_id + # @return [::String] + # @!attribute [rw] started_on + # @return [::Google::Protobuf::Timestamp] + # @!attribute [rw] finished_on + # @return [::Google::Protobuf::Timestamp] + class BuildMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/package.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/package.rb new file mode 100644 index 000000000000..1b795022499a --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/package.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! + + +module Grafeas + module V1 + # This represents a particular channel of distribution for a given package. + # E.g., Debian's jessie-backports dpkg mirror. + # @!attribute [rw] cpe_uri + # @return [::String] + # The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + # denoting the package manager version distributing a package. + # @!attribute [rw] architecture + # @return [::Grafeas::V1::Architecture] + # The CPU architecture for which packages in this distribution channel were + # built. + # @!attribute [rw] latest_version + # @return [::Grafeas::V1::Version] + # The latest available version of this package in this distribution channel. + # @!attribute [rw] maintainer + # @return [::String] + # A freeform string denoting the maintainer of this package. + # @!attribute [rw] url + # @return [::String] + # The distribution channel-specific homepage for this package. + # @!attribute [rw] description + # @return [::String] + # The distribution channel-specific description of this package. + class Distribution + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An occurrence of a particular package installation found within a system's + # filesystem. E.g., glibc was found in `/var/lib/dpkg/status`. + # @!attribute [rw] cpe_uri + # @return [::String] + # Deprecated. + # The CPE URI in [CPE format](https://cpe.mitre.org/specification/) + # @!attribute [rw] version + # @return [::Grafeas::V1::Version] + # Deprecated. + # The version installed at this location. + # @!attribute [rw] path + # @return [::String] + # The path from which we gathered that this package/version is installed. + class Location + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # PackageNote represents a particular package version. + # @!attribute [rw] name + # @return [::String] + # The name of the package. + # @!attribute [rw] distribution + # @return [::Array<::Grafeas::V1::Distribution>] + # Deprecated. + # The various channels by which a package is distributed. + # @!attribute [rw] package_type + # @return [::String] + # The type of package; whether native or non native (e.g., ruby gems, + # node.js packages, etc.). + # @!attribute [rw] cpe_uri + # @return [::String] + # The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + # denoting the package manager version distributing a package. + # The cpe_uri will be blank for language packages. + # @!attribute [rw] architecture + # @return [::Grafeas::V1::Architecture] + # The CPU architecture for which packages in this distribution channel were + # built. Architecture will be blank for language packages. + # @!attribute [rw] version + # @return [::Grafeas::V1::Version] + # The version of the package. + # @!attribute [rw] maintainer + # @return [::String] + # A freeform text denoting the maintainer of this package. + # @!attribute [rw] url + # @return [::String] + # The homepage for this package. + # @!attribute [rw] description + # @return [::String] + # The description of this package. + # @!attribute [rw] license + # @return [::Grafeas::V1::License] + # Licenses that have been declared by the authors of the package. + # @!attribute [rw] digest + # @return [::Array<::Grafeas::V1::Digest>] + # Hash value, typically a file digest, that allows unique + # identification a specific package. + class PackageNote + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details on how a particular software package was installed on a system. + # @!attribute [r] name + # @return [::String] + # The name of the installed package. + # @!attribute [rw] location + # @return [::Array<::Grafeas::V1::Location>] + # All of the places within the filesystem versions of this package + # have been found. + # @!attribute [r] package_type + # @return [::String] + # The type of package; whether native or non native (e.g., ruby gems, + # node.js packages, etc.). + # @!attribute [r] cpe_uri + # @return [::String] + # The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + # denoting the package manager version distributing a package. + # The cpe_uri will be blank for language packages. + # @!attribute [r] architecture + # @return [::Grafeas::V1::Architecture] + # The CPU architecture for which packages in this distribution channel were + # built. Architecture will be blank for language packages. + # @!attribute [rw] license + # @return [::Grafeas::V1::License] + # Licenses that have been declared by the authors of the package. + # @!attribute [r] version + # @return [::Grafeas::V1::Version] + # The version of the package. + class PackageOccurrence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Version contains structured information about the version of a package. + # @!attribute [rw] epoch + # @return [::Integer] + # Used to correct mistakes in the version numbering scheme. + # @!attribute [rw] name + # @return [::String] + # Required only when version kind is NORMAL. The main part of the version + # name. + # @!attribute [rw] revision + # @return [::String] + # The iteration of the package build from the above version. + # @!attribute [rw] inclusive + # @return [::Boolean] + # Whether this version is specifying part of an inclusive range. Grafeas + # does not have the capability to specify version ranges; instead we have + # fields that specify start version and end versions. At times this is + # insufficient - we also need to specify whether the version is included in + # the range or is excluded from the range. This boolean is expected to be set + # to true when the version is included in a range. + # @!attribute [rw] kind + # @return [::Grafeas::V1::Version::VersionKind] + # Required. Distinguishes between sentinel MIN/MAX versions and normal + # versions. + # @!attribute [rw] full_name + # @return [::String] + # Human readable version string. This string is of the form + # :- and is only set when kind is NORMAL. + class Version + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Whether this is an ordinary package version or a sentinel MIN/MAX version. + module VersionKind + # Unknown. + VERSION_KIND_UNSPECIFIED = 0 + + # A standard package version. + NORMAL = 1 + + # A special version representing negative infinity. + MINIMUM = 2 + + # A special version representing positive infinity. + MAXIMUM = 3 + end + end + + # Instruction set architectures supported by various package managers. + module Architecture + # Unknown architecture. + ARCHITECTURE_UNSPECIFIED = 0 + + # X86 architecture. + X86 = 1 + + # X64 architecture. + X64 = 2 + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/provenance.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/provenance.rb new file mode 100644 index 000000000000..a7454aeaabbf --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/provenance.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 Grafeas + module V1 + # Provenance of a build. Contains all information needed to verify the full + # details about the build from source to completion. + # @!attribute [rw] id + # @return [::String] + # Required. Unique identifier of the build. + # @!attribute [rw] project_id + # @return [::String] + # ID of the project. + # @!attribute [rw] commands + # @return [::Array<::Grafeas::V1::Command>] + # Commands requested by the build. + # @!attribute [rw] built_artifacts + # @return [::Array<::Grafeas::V1::Artifact>] + # Output of the build. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Time at which the build was created. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Time at which execution of the build was started. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Time at which execution of the build was finished. + # @!attribute [rw] creator + # @return [::String] + # E-mail address of the user who initiated this build. Note that this was the + # user's e-mail address at the time the build was initiated; this address may + # not represent the same end-user for all time. + # @!attribute [rw] logs_uri + # @return [::String] + # URI where any logs for this provenance were written. + # @!attribute [rw] source_provenance + # @return [::Grafeas::V1::Source] + # Details of the Source input to the build. + # @!attribute [rw] trigger_id + # @return [::String] + # Trigger identifier if the build was triggered automatically; empty if not. + # @!attribute [rw] build_options + # @return [::Google::Protobuf::Map{::String => ::String}] + # Special options applied to this build. This is a catch-all field where + # build providers can enter any desired additional details. + # @!attribute [rw] builder_version + # @return [::String] + # Version string of the builder at the time this build was executed. + class BuildProvenance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class BuildOptionsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Source describes the location of the source used for the build. + # @!attribute [rw] artifact_storage_source_uri + # @return [::String] + # If provided, the input binary artifacts for the build came from this + # location. + # @!attribute [rw] file_hashes + # @return [::Google::Protobuf::Map{::String => ::Grafeas::V1::FileHashes}] + # Hash(es) of the build source, which can be used to verify that the original + # source integrity was maintained in the build. + # + # The keys to this map are file paths used as build source and the values + # contain the hash values for those files. + # + # If the build source came in a single package such as a gzipped tarfile + # (.tar.gz), the FileHash will be for the single path to that file. + # @!attribute [rw] context + # @return [::Grafeas::V1::SourceContext] + # If provided, the source code used for the build came from this location. + # @!attribute [rw] additional_contexts + # @return [::Array<::Grafeas::V1::SourceContext>] + # If provided, some of the source code used for the build may be found in + # these locations, in the case where the source repository had multiple + # remotes or submodules. This list will not include the context specified in + # the context field. + class Source + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Grafeas::V1::FileHashes] + class FileHashesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Container message for hashes of byte content of files, used in source + # messages to verify integrity of source input to the build. + # @!attribute [rw] file_hash + # @return [::Array<::Grafeas::V1::Hash>] + # Required. Collection of file hashes. + class FileHashes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Container message for hash values. + # @!attribute [rw] type + # @return [::String] + # Required. The type of hash that was performed, e.g. "SHA-256". + # @!attribute [rw] value + # @return [::String] + # Required. The hash value. + class Hash + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Command describes a step performed as part of the build pipeline. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the command, as presented on the command line, or if the + # command is packaged as a Docker container, as presented to `docker pull`. + # @!attribute [rw] env + # @return [::Array<::String>] + # Environment variables set before running this command. + # @!attribute [rw] args + # @return [::Array<::String>] + # Command-line arguments used when executing this command. + # @!attribute [rw] dir + # @return [::String] + # Working directory (relative to project source root) used when running this + # command. + # @!attribute [rw] id + # @return [::String] + # Optional unique identifier for this command, used in wait_for to reference + # this command as a dependency. + # @!attribute [rw] wait_for + # @return [::Array<::String>] + # The ID(s) of the command(s) that this command depends on. + class Command + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Artifact describes a build product. + # @!attribute [rw] checksum + # @return [::String] + # Hash or checksum value of a binary, or Docker Registry 2.0 digest of a + # container. + # @!attribute [rw] id + # @return [::String] + # Artifact ID, if any; for container images, this will be a URL by digest + # like `gcr.io/projectID/imagename@sha256:123456`. + # @!attribute [rw] names + # @return [::Array<::String>] + # Related artifact names. This may be the path to a binary or jar file, or in + # the case of a container build, the name used to push the container image to + # Google Container Registry, as presented to `docker push`. Note that a + # single Artifact ID can have multiple names, for example if two tags are + # applied to one image. + class Artifact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A SourceContext is a reference to a tree of files. A SourceContext together + # with a path point to a unique revision of a single file or directory. + # @!attribute [rw] cloud_repo + # @return [::Grafeas::V1::CloudRepoSourceContext] + # A SourceContext referring to a revision in a Google Cloud Source Repo. + # + # Note: The following fields are mutually exclusive: `cloud_repo`, `gerrit`, `git`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gerrit + # @return [::Grafeas::V1::GerritSourceContext] + # A SourceContext referring to a Gerrit project. + # + # Note: The following fields are mutually exclusive: `gerrit`, `cloud_repo`, `git`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] git + # @return [::Grafeas::V1::GitSourceContext] + # A SourceContext referring to any third party Git repo (e.g., GitHub). + # + # Note: The following fields are mutually exclusive: `git`, `cloud_repo`, `gerrit`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels with user defined metadata. + class SourceContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # An alias to a repo revision. + # @!attribute [rw] kind + # @return [::Grafeas::V1::AliasContext::Kind] + # The alias kind. + # @!attribute [rw] name + # @return [::String] + # The alias name. + class AliasContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of an alias. + module Kind + # Unknown. + KIND_UNSPECIFIED = 0 + + # Git tag. + FIXED = 1 + + # Git branch. + MOVABLE = 2 + + # Used to specify non-standard aliases. For example, if a Git repo has a + # ref named "refs/foo/bar". + OTHER = 4 + end + end + + # A CloudRepoSourceContext denotes a particular revision in a Google Cloud + # Source Repo. + # @!attribute [rw] repo_id + # @return [::Grafeas::V1::RepoId] + # The ID of the repo. + # @!attribute [rw] revision_id + # @return [::String] + # A revision ID. + # + # Note: The following fields are mutually exclusive: `revision_id`, `alias_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] alias_context + # @return [::Grafeas::V1::AliasContext] + # An alias, which may be a branch or tag. + # + # Note: The following fields are mutually exclusive: `alias_context`, `revision_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class CloudRepoSourceContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A SourceContext referring to a Gerrit project. + # @!attribute [rw] host_uri + # @return [::String] + # The URI of a running Gerrit instance. + # @!attribute [rw] gerrit_project + # @return [::String] + # The full project name within the host. Projects may be nested, so + # "project/subproject" is a valid project name. The "repo name" is the + # hostURI/project. + # @!attribute [rw] revision_id + # @return [::String] + # A revision (commit) ID. + # + # Note: The following fields are mutually exclusive: `revision_id`, `alias_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] alias_context + # @return [::Grafeas::V1::AliasContext] + # An alias, which may be a branch or tag. + # + # Note: The following fields are mutually exclusive: `alias_context`, `revision_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class GerritSourceContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A GitSourceContext denotes a particular revision in a third party Git + # repository (e.g., GitHub). + # @!attribute [rw] url + # @return [::String] + # Git repository URL. + # @!attribute [rw] revision_id + # @return [::String] + # Git commit hash. + class GitSourceContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A unique identifier for a Cloud Repo. + # @!attribute [rw] project_repo_id + # @return [::Grafeas::V1::ProjectRepoId] + # A combination of a project ID and a repo name. + # + # Note: The following fields are mutually exclusive: `project_repo_id`, `uid`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] uid + # @return [::String] + # A server-assigned, globally unique identifier. + # + # Note: The following fields are mutually exclusive: `uid`, `project_repo_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class RepoId + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Selects a repo using a Google Cloud Platform project ID (e.g., + # winged-cargo-31) and a repo name within that project. + # @!attribute [rw] project_id + # @return [::String] + # The ID of the project. + # @!attribute [rw] repo_name + # @return [::String] + # The name of the repo. Leave empty for the default repo. + class ProjectRepoId + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/risk.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/risk.rb new file mode 100644 index 000000000000..368497cf719b --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/risk.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! + + +module Grafeas + module V1 + # @!attribute [rw] cisa_kev + # @return [::Grafeas::V1::CISAKnownExploitedVulnerabilities] + # CISA maintains the authoritative source of vulnerabilities that have been + # exploited in the wild. + # @!attribute [rw] epss + # @return [::Grafeas::V1::ExploitPredictionScoringSystem] + # The Exploit Prediction Scoring System (EPSS) estimates the likelihood + # (probability) that a software vulnerability will be exploited in the wild. + class Risk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] known_ransomware_campaign_use + # @return [::String] + # Whether the vulnerability is known to have been leveraged as part of a + # ransomware campaign. + class CISAKnownExploitedVulnerabilities + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] percentile + # @return [::Float] + # The percentile of the current score, the proportion of all scored + # vulnerabilities with the same or a lower EPSS score + # @!attribute [rw] score + # @return [::Float] + # The EPSS score representing the probability [0-1] of exploitation in the + # wild in the next 30 days + class ExploitPredictionScoringSystem + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/sbom.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/sbom.rb new file mode 100644 index 000000000000..c058bcfa65f6 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/sbom.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Grafeas + module V1 + # The note representing an SBOM reference. + # @!attribute [rw] format + # @return [::String] + # The format that SBOM takes. E.g. may be spdx, cyclonedx, etc... + # @!attribute [rw] version + # @return [::String] + # The version of the format that the SBOM takes. E.g. if the format + # is spdx, the version may be 2.3. + class SBOMReferenceNote + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The occurrence representing an SBOM reference as applied to a specific + # resource. The occurrence follows the DSSE specification. See + # https://github.com/secure-systems-lab/dsse/blob/master/envelope.md for more + # details. + # @!attribute [rw] payload + # @return [::Grafeas::V1::SbomReferenceIntotoPayload] + # The actual payload that contains the SBOM reference data. + # @!attribute [rw] payload_type + # @return [::String] + # The kind of payload that SbomReferenceIntotoPayload takes. Since it's in + # the intoto format, this value is expected to be + # 'application/vnd.in-toto+json'. + # @!attribute [rw] signatures + # @return [::Array<::Grafeas::V1::EnvelopeSignature>] + # The signatures over the payload. + class SBOMReferenceOccurrence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The actual payload that contains the SBOM Reference data. + # The payload follows the intoto statement specification. See + # https://github.com/in-toto/attestation/blob/main/spec/v1.0/statement.md + # for more details. + # @!attribute [rw] type + # @return [::String] + # Identifier for the schema of the Statement. + # @!attribute [rw] predicate_type + # @return [::String] + # URI identifying the type of the Predicate. + # @!attribute [rw] subject + # @return [::Array<::Grafeas::V1::Subject>] + # Set of software artifacts that the attestation applies to. Each element + # represents a single software artifact. + # @!attribute [rw] predicate + # @return [::Grafeas::V1::SbomReferenceIntotoPredicate] + # Additional parameters of the Predicate. Includes the actual data about the + # SBOM. + class SbomReferenceIntotoPayload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A predicate which describes the SBOM being referenced. + # @!attribute [rw] referrer_id + # @return [::String] + # The person or system referring this predicate to the consumer. + # @!attribute [rw] location + # @return [::String] + # The location of the SBOM. + # @!attribute [rw] mime_type + # @return [::String] + # The mime type of the SBOM. + # @!attribute [rw] digest + # @return [::Google::Protobuf::Map{::String => ::String}] + # A map of algorithm to digest of the contents of the SBOM. + class SbomReferenceIntotoPredicate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class DigestEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/secret.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/secret.rb new file mode 100644 index 000000000000..19111283e758 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/secret.rb @@ -0,0 +1,165 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Grafeas + module V1 + # The note representing a secret. + class SecretNote + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The occurrence provides details of a secret. + # @!attribute [rw] kind + # @return [::Grafeas::V1::SecretKind] + # Type of secret. + # @!attribute [rw] locations + # @return [::Array<::Grafeas::V1::SecretLocation>] + # Locations where the secret is detected. + # @!attribute [rw] statuses + # @return [::Array<::Grafeas::V1::SecretStatus>] + # Status of the secret. + # @!attribute [rw] data + # @return [::Google::Protobuf::Any] + # Scan result of the secret. + # @!attribute [rw] digest + # @return [::Grafeas::V1::Digest] + # Hash value, typically a digest for the secret data, that allows unique + # identification of a specific secret. + class SecretOccurrence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The location of the secret. + # @!attribute [rw] file_location + # @return [::Grafeas::V1::FileLocation] + # The secret is found from a file. + class SecretLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The status of the secret with a timestamp. + # @!attribute [rw] status + # @return [::Grafeas::V1::SecretStatus::Status] + # The status of the secret. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time the secret status was last updated. + # @!attribute [rw] message + # @return [::String] + # Optional message about the status code. + class SecretStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The status of the secret. + module Status + # Unspecified + STATUS_UNSPECIFIED = 0 + + # The status of the secret is unknown. + UNKNOWN = 1 + + # The secret is valid. + VALID = 2 + + # The secret is invalid. + INVALID = 3 + end + end + + # Kind of secret. + module SecretKind + # Unspecified + SECRET_KIND_UNSPECIFIED = 0 + + # The secret kind is unknown. + SECRET_KIND_UNKNOWN = 1 + + # A Google Cloud service account key per: + # https://cloud.google.com/iam/docs/creating-managing-service-account-keys + SECRET_KIND_GCP_SERVICE_ACCOUNT_KEY = 2 + + # A Google Cloud API key per: + # https://cloud.google.com/docs/authentication/api-keys + SECRET_KIND_GCP_API_KEY = 3 + + # A Google Cloud OAuth2 client credentials per: + # https://developers.google.com/identity/protocols/oauth2 + SECRET_KIND_GCP_OAUTH2_CLIENT_CREDENTIALS = 4 + + # A Google Cloud OAuth2 access token per: + # https://cloud.google.com/docs/authentication/token-types#access + SECRET_KIND_GCP_OAUTH2_ACCESS_TOKEN = 5 + + # An Anthropic Admin API key. + SECRET_KIND_ANTHROPIC_ADMIN_API_KEY = 6 + + # An Anthropic API key. + SECRET_KIND_ANTHROPIC_API_KEY = 7 + + # An Azure access token. + SECRET_KIND_AZURE_ACCESS_TOKEN = 8 + + # An Azure Identity Platform ID token. + SECRET_KIND_AZURE_IDENTITY_TOKEN = 9 + + # A Docker Hub personal access token. + SECRET_KIND_DOCKER_HUB_PERSONAL_ACCESS_TOKEN = 10 + + # A GitHub App refresh token. + SECRET_KIND_GITHUB_APP_REFRESH_TOKEN = 11 + + # A GitHub App server-to-server token. + SECRET_KIND_GITHUB_APP_SERVER_TO_SERVER_TOKEN = 12 + + # A GitHub App user-to-server token. + SECRET_KIND_GITHUB_APP_USER_TO_SERVER_TOKEN = 13 + + # A GitHub personal access token (classic). + SECRET_KIND_GITHUB_CLASSIC_PERSONAL_ACCESS_TOKEN = 14 + + # A GitHub fine-grained personal access token. + SECRET_KIND_GITHUB_FINE_GRAINED_PERSONAL_ACCESS_TOKEN = 15 + + # A GitHub OAuth token. + SECRET_KIND_GITHUB_OAUTH_TOKEN = 16 + + # A Hugging Face API key. + SECRET_KIND_HUGGINGFACE_API_KEY = 17 + + # An OpenAI API key. + SECRET_KIND_OPENAI_API_KEY = 18 + + # A Perplexity API key. + SECRET_KIND_PERPLEXITY_API_KEY = 19 + + # A Stripe secret key. + SECRET_KIND_STRIPE_SECRET_KEY = 20 + + # A Stripe restricted key. + SECRET_KIND_STRIPE_RESTRICTED_KEY = 21 + + # A Stripe webhook secret. + SECRET_KIND_STRIPE_WEBHOOK_SECRET = 22 + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/severity.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/severity.rb new file mode 100644 index 000000000000..49d42db38b43 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/severity.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 Grafeas + module V1 + # Note provider assigned severity/impact ranking. + module Severity + # Unknown. + SEVERITY_UNSPECIFIED = 0 + + # Minimal severity. + MINIMAL = 1 + + # Low severity. + LOW = 2 + + # Medium severity. + MEDIUM = 3 + + # High severity. + HIGH = 4 + + # Critical severity. + CRITICAL = 5 + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance.rb new file mode 100644 index 000000000000..de245b5e9238 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance.rb @@ -0,0 +1,152 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Grafeas + module V1 + # @!attribute [rw] builder + # @return [::Grafeas::V1::SlsaProvenance::SlsaBuilder] + # @!attribute [rw] recipe + # @return [::Grafeas::V1::SlsaProvenance::SlsaRecipe] + # Identifies the configuration used for the build. + # When combined with materials, this SHOULD fully describe the build, + # such that re-running this recipe results in bit-for-bit identical output + # (if the build is reproducible). + # @!attribute [rw] metadata + # @return [::Grafeas::V1::SlsaProvenance::SlsaMetadata] + # @!attribute [rw] materials + # @return [::Array<::Grafeas::V1::SlsaProvenance::Material>] + # The collection of artifacts that influenced the build including sources, + # dependencies, build tools, base images, and so on. This is considered to be + # incomplete unless metadata.completeness.materials is true. Unset or null is + # equivalent to empty. + class SlsaProvenance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Steps taken to build the artifact. + # For a TaskRun, typically each container corresponds to one step in the + # recipe. + # @!attribute [rw] type + # @return [::String] + # URI indicating what type of recipe was performed. It determines the + # meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and + # materials. + # @!attribute [rw] defined_in_material + # @return [::Integer] + # Index in materials containing the recipe steps that are not implied by + # recipe.type. For example, if the recipe type were "make", then this would + # point to the source containing the Makefile, not the make program itself. + # Set to -1 if the recipe doesn't come from a material, as zero is default + # unset value for int64. + # @!attribute [rw] entry_point + # @return [::String] + # String identifying the entry point into the build. + # This is often a path to a configuration file and/or a target label within + # that file. The syntax and meaning are defined by recipe.type. For + # example, if the recipe type were "make", then this would reference the + # directory in which to run make as well as which target to use. + # @!attribute [rw] arguments + # @return [::Google::Protobuf::Any] + # Collection of all external inputs that influenced the build on top of + # recipe.definedInMaterial and recipe.entryPoint. For example, if the + # recipe type were "make", then this might be the flags passed to make + # aside from the target, which is captured in recipe.entryPoint. Depending + # on the recipe Type, the structure may be different. + # @!attribute [rw] environment + # @return [::Google::Protobuf::Any] + # Any other builder-controlled inputs necessary for correctly evaluating + # the recipe. Usually only needed for reproducing the build but not + # evaluated as part of policy. Depending on the recipe Type, the structure + # may be different. + class SlsaRecipe + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Indicates that the builder claims certain fields in this message to be + # complete. + # @!attribute [rw] arguments + # @return [::Boolean] + # If true, the builder claims that recipe.arguments is complete, meaning + # that all external inputs are properly captured in the recipe. + # @!attribute [rw] environment + # @return [::Boolean] + # If true, the builder claims that recipe.environment is claimed to be + # complete. + # @!attribute [rw] materials + # @return [::Boolean] + # If true, the builder claims that materials are complete, usually through + # some controls to prevent network access. Sometimes called "hermetic". + class SlsaCompleteness + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Other properties of the build. + # @!attribute [rw] build_invocation_id + # @return [::String] + # Identifies the particular build invocation, which can be useful for + # finding associated logs or other ad-hoc analysis. The value SHOULD be + # globally unique, per in-toto Provenance spec. + # @!attribute [rw] build_started_on + # @return [::Google::Protobuf::Timestamp] + # The timestamp of when the build started. + # @!attribute [rw] build_finished_on + # @return [::Google::Protobuf::Timestamp] + # The timestamp of when the build completed. + # @!attribute [rw] completeness + # @return [::Grafeas::V1::SlsaProvenance::SlsaCompleteness] + # Indicates that the builder claims certain fields in this message to be + # complete. + # @!attribute [rw] reproducible + # @return [::Boolean] + # If true, the builder claims that running the recipe on materials will + # produce bit-for-bit identical output. + class SlsaMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] id + # @return [::String] + class SlsaBuilder + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] uri + # @return [::String] + # @!attribute [rw] digest + # @return [::Google::Protobuf::Map{::String => ::String}] + class Material + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class DigestEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance_zero_two.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance_zero_two.rb new file mode 100644 index 000000000000..8cbf519a6aea --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance_zero_two.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 Grafeas + module V1 + # @!attribute [rw] builder + # @return [::Grafeas::V1::SlsaProvenanceZeroTwo::SlsaBuilder] + # @!attribute [rw] build_type + # @return [::String] + # @!attribute [rw] invocation + # @return [::Grafeas::V1::SlsaProvenanceZeroTwo::SlsaInvocation] + # @!attribute [rw] build_config + # @return [::Google::Protobuf::Struct] + # @!attribute [rw] metadata + # @return [::Grafeas::V1::SlsaProvenanceZeroTwo::SlsaMetadata] + # @!attribute [rw] materials + # @return [::Array<::Grafeas::V1::SlsaProvenanceZeroTwo::SlsaMaterial>] + class SlsaProvenanceZeroTwo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Identifies the entity that executed the recipe, which is trusted to have + # correctly performed the operation and populated this provenance. + # @!attribute [rw] id + # @return [::String] + class SlsaBuilder + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The collection of artifacts that influenced the build including sources, + # dependencies, build tools, base images, and so on. + # @!attribute [rw] uri + # @return [::String] + # @!attribute [rw] digest + # @return [::Google::Protobuf::Map{::String => ::String}] + class SlsaMaterial + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class DigestEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Identifies the event that kicked off the build. + # @!attribute [rw] config_source + # @return [::Grafeas::V1::SlsaProvenanceZeroTwo::SlsaConfigSource] + # @!attribute [rw] parameters + # @return [::Google::Protobuf::Struct] + # @!attribute [rw] environment + # @return [::Google::Protobuf::Struct] + class SlsaInvocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes where the config file that kicked off the build came from. + # This is effectively a pointer to the source where buildConfig came from. + # @!attribute [rw] uri + # @return [::String] + # @!attribute [rw] digest + # @return [::Google::Protobuf::Map{::String => ::String}] + # @!attribute [rw] entry_point + # @return [::String] + class SlsaConfigSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class DigestEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Other properties of the build. + # @!attribute [rw] build_invocation_id + # @return [::String] + # @!attribute [rw] build_started_on + # @return [::Google::Protobuf::Timestamp] + # @!attribute [rw] build_finished_on + # @return [::Google::Protobuf::Timestamp] + # @!attribute [rw] completeness + # @return [::Grafeas::V1::SlsaProvenanceZeroTwo::SlsaCompleteness] + # @!attribute [rw] reproducible + # @return [::Boolean] + class SlsaMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Indicates that the builder claims certain fields in this message to be + # complete. + # @!attribute [rw] parameters + # @return [::Boolean] + # @!attribute [rw] environment + # @return [::Boolean] + # @!attribute [rw] materials + # @return [::Boolean] + class SlsaCompleteness + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/upgrade.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/upgrade.rb new file mode 100644 index 000000000000..d5353ac7f060 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/upgrade.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 Grafeas + module V1 + # An Upgrade Note represents a potential upgrade of a package to a given + # version. For each package version combination (i.e. bash 4.0, bash 4.1, + # bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field + # represents the information related to the update. + # @!attribute [rw] package + # @return [::String] + # Required for non-Windows OS. The package this Upgrade is for. + # @!attribute [rw] version + # @return [::Grafeas::V1::Version] + # Required for non-Windows OS. The version of the package in machine + human + # readable form. + # @!attribute [rw] distributions + # @return [::Array<::Grafeas::V1::UpgradeDistribution>] + # Metadata about the upgrade for each specific operating system. + # @!attribute [rw] windows_update + # @return [::Grafeas::V1::WindowsUpdate] + # Required for Windows OS. Represents the metadata about the Windows update. + class UpgradeNote + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Upgrade Distribution represents metadata about the Upgrade for each + # operating system (CPE). Some distributions have additional metadata around + # updates, classifying them into various categories and severities. + # @!attribute [rw] cpe_uri + # @return [::String] + # Required - The specific operating system this metadata applies to. See + # https://cpe.mitre.org/specification/. + # @!attribute [rw] classification + # @return [::String] + # The operating system classification of this Upgrade, as specified by the + # upstream operating system upgrade feed. For Windows the classification is + # one of the category_ids listed at + # https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) + # @!attribute [rw] severity + # @return [::String] + # The severity as specified by the upstream operating system. + # @!attribute [rw] cve + # @return [::Array<::String>] + # The cve tied to this Upgrade. + class UpgradeDistribution + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Windows Update represents the metadata about the update for the Windows + # operating system. The fields in this message come from the Windows Update API + # documented at + # https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate. + # @!attribute [rw] identity + # @return [::Grafeas::V1::WindowsUpdate::Identity] + # Required - The unique identifier for the update. + # @!attribute [rw] title + # @return [::String] + # The localized title of the update. + # @!attribute [rw] description + # @return [::String] + # The localized description of the update. + # @!attribute [rw] categories + # @return [::Array<::Grafeas::V1::WindowsUpdate::Category>] + # The list of categories to which the update belongs. + # @!attribute [rw] kb_article_ids + # @return [::Array<::String>] + # The Microsoft Knowledge Base article IDs that are associated with the + # update. + # @!attribute [rw] support_url + # @return [::String] + # The hyperlink to the support information for the update. + # @!attribute [rw] last_published_timestamp + # @return [::Google::Protobuf::Timestamp] + # The last published timestamp of the update. + class WindowsUpdate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The unique identifier of the update. + # @!attribute [rw] update_id + # @return [::String] + # The revision independent identifier of the update. + # @!attribute [rw] revision + # @return [::Integer] + # The revision number of the update. + class Identity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The category to which the update belongs. + # @!attribute [rw] category_id + # @return [::String] + # The identifier of the category. + # @!attribute [rw] name + # @return [::String] + # The localized name of the category. + class Category + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # An Upgrade Occurrence represents that a specific resource_url could install a + # specific upgrade. This presence is supplied via local sources (i.e. it is + # present in the mirror and the running system has noticed its availability). + # For Windows, both distribution and windows_update contain information for the + # Windows update. + # @!attribute [rw] package + # @return [::String] + # Required for non-Windows OS. The package this Upgrade is for. + # @!attribute [rw] parsed_version + # @return [::Grafeas::V1::Version] + # Required for non-Windows OS. The version of the package in a machine + + # human readable form. + # @!attribute [rw] distribution + # @return [::Grafeas::V1::UpgradeDistribution] + # Metadata about the upgrade for available for the specific operating system + # for the resource_url. This allows efficient filtering, as well as + # making it easier to use the occurrence. + # @!attribute [rw] windows_update + # @return [::Grafeas::V1::WindowsUpdate] + # Required for Windows OS. Represents the metadata about the Windows update. + class UpgradeOccurrence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/vex.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/vex.rb new file mode 100644 index 000000000000..d0cf29a1341c --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/vex.rb @@ -0,0 +1,237 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Grafeas + module V1 + # A single VulnerabilityAssessmentNote represents + # one particular product's vulnerability assessment for one CVE. + # @!attribute [rw] title + # @return [::String] + # The title of the note. E.g. `Vex-Debian-11.4` + # @!attribute [rw] short_description + # @return [::String] + # A one sentence description of this Vex. + # @!attribute [rw] long_description + # @return [::String] + # A detailed description of this Vex. + # @!attribute [rw] language_code + # @return [::String] + # Identifies the language used by this document, + # corresponding to IETF BCP 47 / RFC 5646. + # @!attribute [rw] publisher + # @return [::Grafeas::V1::VulnerabilityAssessmentNote::Publisher] + # Publisher details of this Note. + # @!attribute [rw] product + # @return [::Grafeas::V1::VulnerabilityAssessmentNote::Product] + # The product affected by this vex. + # @!attribute [rw] assessment + # @return [::Grafeas::V1::VulnerabilityAssessmentNote::Assessment] + # Represents a vulnerability assessment for the product. + class VulnerabilityAssessmentNote + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Publisher contains information about the publisher of + # this Note. + # (-- api-linter: core::0123::resource-annotation=disabled + # aip.dev/not-precedent: Publisher is not a separate resource. --) + # @!attribute [rw] name + # @return [::String] + # Name of the publisher. + # Examples: 'Google', 'Google Cloud Platform'. + # @!attribute [rw] issuing_authority + # @return [::String] + # Provides information about the authority of the issuing party to + # release the document, in particular, the party's constituency and + # responsibilities or other obligations. + # @!attribute [rw] publisher_namespace + # @return [::String] + # The context or namespace. + # Contains a URL which is under control of the issuing party and can + # be used as a globally unique identifier for that issuing party. + # Example: https://csaf.io + class Publisher + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Product contains information about a product and how to uniquely identify + # it. + # (-- api-linter: core::0123::resource-annotation=disabled + # aip.dev/not-precedent: Product is not a separate resource. --) + # @!attribute [rw] name + # @return [::String] + # Name of the product. + # @!attribute [rw] id + # @return [::String] + # Token that identifies a product so that it can be referred to from other + # parts in the document. There is no predefined format as long as it + # uniquely identifies a group in the context of the current document. + # @!attribute [rw] generic_uri + # @return [::String] + # Contains a URI which is vendor-specific. + # Example: The artifact repository URL of an image. + class Product + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Assessment provides all information that is related to a single + # vulnerability for this product. + # @!attribute [rw] cve + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) + # tracking number for the vulnerability. + # Deprecated: Use vulnerability_id instead to denote CVEs. + # @!attribute [rw] vulnerability_id + # @return [::String] + # The vulnerability identifier for this Assessment. Will hold one of + # common identifiers e.g. CVE, GHSA etc. + # @!attribute [rw] short_description + # @return [::String] + # A one sentence description of this Vex. + # @!attribute [rw] long_description + # @return [::String] + # A detailed description of this Vex. + # @!attribute [rw] related_uris + # @return [::Array<::Grafeas::V1::RelatedUrl>] + # Holds a list of references associated with this vulnerability item and + # assessment. These uris have additional information about the + # vulnerability and the assessment itself. E.g. Link to a document which + # details how this assessment concluded the state of this vulnerability. + # @!attribute [rw] state + # @return [::Grafeas::V1::VulnerabilityAssessmentNote::Assessment::State] + # Provides the state of this Vulnerability assessment. + # @!attribute [rw] impacts + # @return [::Array<::String>] + # Contains information about the impact of this vulnerability, + # this will change with time. + # @!attribute [rw] justification + # @return [::Grafeas::V1::VulnerabilityAssessmentNote::Assessment::Justification] + # Justification provides the justification when the state of the + # assessment if NOT_AFFECTED. + # @!attribute [rw] remediations + # @return [::Array<::Grafeas::V1::VulnerabilityAssessmentNote::Assessment::Remediation>] + # Specifies details on how to handle (and presumably, fix) a vulnerability. + class Assessment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Justification provides the justification when the state of the + # assessment if NOT_AFFECTED. + # @!attribute [rw] justification_type + # @return [::Grafeas::V1::VulnerabilityAssessmentNote::Assessment::Justification::JustificationType] + # The justification type for this vulnerability. + # @!attribute [rw] details + # @return [::String] + # Additional details on why this justification was chosen. + class Justification + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Provides the type of justification. + module JustificationType + # JUSTIFICATION_TYPE_UNSPECIFIED. + JUSTIFICATION_TYPE_UNSPECIFIED = 0 + + # The vulnerable component is not present in the product. + COMPONENT_NOT_PRESENT = 1 + + # The vulnerable code is not present. Typically this case + # occurs when source code is configured or built in a way that excludes + # the vulnerable code. + VULNERABLE_CODE_NOT_PRESENT = 2 + + # The vulnerable code can not be executed. + # Typically this case occurs when the product includes the vulnerable + # code but does not call or use the vulnerable code. + VULNERABLE_CODE_NOT_IN_EXECUTE_PATH = 3 + + # The vulnerable code cannot be controlled by an attacker to exploit + # the vulnerability. + VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY = 4 + + # The product includes built-in protections or features that prevent + # exploitation of the vulnerability. These built-in protections cannot + # be subverted by the attacker and cannot be configured or disabled by + # the user. These mitigations completely prevent exploitation based on + # known attack vectors. + INLINE_MITIGATIONS_ALREADY_EXIST = 5 + end + end + + # Specifies details on how to handle (and presumably, fix) a vulnerability. + # @!attribute [rw] remediation_type + # @return [::Grafeas::V1::VulnerabilityAssessmentNote::Assessment::Remediation::RemediationType] + # The type of remediation that can be applied. + # @!attribute [rw] details + # @return [::String] + # Contains a comprehensive human-readable discussion of the remediation. + # @!attribute [rw] remediation_uri + # @return [::Grafeas::V1::RelatedUrl] + # Contains the URL where to obtain the remediation. + class Remediation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of remediation that can be applied. + module RemediationType + # No remediation type specified. + REMEDIATION_TYPE_UNSPECIFIED = 0 + + # A MITIGATION is available. + MITIGATION = 1 + + # No fix is planned. + NO_FIX_PLANNED = 2 + + # Not available. + NONE_AVAILABLE = 3 + + # A vendor fix is available. + VENDOR_FIX = 4 + + # A workaround is available. + WORKAROUND = 5 + end + end + + # Provides the state of this Vulnerability assessment. + module State + # No state is specified. + STATE_UNSPECIFIED = 0 + + # This product is known to be affected by this vulnerability. + AFFECTED = 1 + + # This product is known to be not affected by this vulnerability. + NOT_AFFECTED = 2 + + # This product contains a fix for this vulnerability. + FIXED = 3 + + # It is not known yet whether these versions are or are not affected + # by the vulnerability. However, it is still under investigation. + UNDER_INVESTIGATION = 4 + end + end + end + end +end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/vulnerability.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/vulnerability.rb new file mode 100644 index 000000000000..1c116d3d5f83 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/vulnerability.rb @@ -0,0 +1,323 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Grafeas + module V1 + # A security vulnerability that can be found in resources. + # @!attribute [rw] cvss_score + # @return [::Float] + # The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 + # where 0 indicates low severity and 10 indicates high severity. + # @!attribute [rw] severity + # @return [::Grafeas::V1::Severity] + # The note provider assigned severity of this vulnerability. + # @!attribute [rw] details + # @return [::Array<::Grafeas::V1::VulnerabilityNote::Detail>] + # Details of all known distros and packages affected by this vulnerability. + # @!attribute [rw] cvss_v3 + # @return [::Grafeas::V1::CVSSv3] + # The full description of the CVSSv3 for this vulnerability. + # @!attribute [rw] windows_details + # @return [::Array<::Grafeas::V1::VulnerabilityNote::WindowsDetail>] + # Windows details get their own format because the information format and + # model don't match a normal detail. Specifically Windows updates are done as + # patches, thus Windows vulnerabilities really are a missing package, rather + # than a package being at an incorrect version. + # @!attribute [rw] source_update_time + # @return [::Google::Protobuf::Timestamp] + # The time this information was last changed at the source. This is an + # upstream timestamp from the underlying information source - e.g. Ubuntu + # security tracker. + # @!attribute [rw] cvss_version + # @return [::Grafeas::V1::CVSSVersion] + # CVSS version used to populate cvss_score and severity. + # @!attribute [rw] cvss_v2 + # @return [::Grafeas::V1::CVSS] + # The full description of the v2 CVSS for this vulnerability. + # @!attribute [rw] advisory_publish_time + # @return [::Google::Protobuf::Timestamp] + # The time this advisory was published by the source. + # @!attribute [rw] cvss_v4 + # @return [::Grafeas::V1::CVSS] + # The full description of the v4 CVSS for this vulnerability. + class VulnerabilityNote + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A detail for a distro and package affected by this vulnerability and its + # associated fix (if one is available). + # @!attribute [rw] severity_name + # @return [::String] + # The distro assigned severity of this vulnerability. + # @!attribute [rw] description + # @return [::String] + # A vendor-specific description of this vulnerability. + # @!attribute [rw] package_type + # @return [::String] + # The type of package; whether native or non native (e.g., ruby gems, + # node.js packages, etc.). + # @!attribute [rw] affected_cpe_uri + # @return [::String] + # Required. The [CPE URI](https://cpe.mitre.org/specification/) this + # vulnerability affects. + # @!attribute [rw] affected_package + # @return [::String] + # Required. The package this vulnerability affects. + # @!attribute [rw] affected_version_start + # @return [::Grafeas::V1::Version] + # The version number at the start of an interval in which this + # vulnerability exists. A vulnerability can affect a package between + # version numbers that are disjoint sets of intervals (example: + # [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be + # represented in its own Detail. If a specific affected version is provided + # by a vulnerability database, affected_version_start and + # affected_version_end will be the same in that Detail. + # @!attribute [rw] affected_version_end + # @return [::Grafeas::V1::Version] + # The version number at the end of an interval in which this vulnerability + # exists. A vulnerability can affect a package between version numbers + # that are disjoint sets of intervals (example: [1.0.0-1.1.0], + # [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its + # own Detail. If a specific affected version is provided by a vulnerability + # database, affected_version_start and affected_version_end will be the + # same in that Detail. + # @!attribute [rw] fixed_cpe_uri + # @return [::String] + # The distro recommended [CPE URI](https://cpe.mitre.org/specification/) + # to update to that contains a fix for this vulnerability. It is possible + # for this to be different from the affected_cpe_uri. + # @!attribute [rw] fixed_package + # @return [::String] + # The distro recommended package to update to that contains a fix for this + # vulnerability. It is possible for this to be different from the + # affected_package. + # @!attribute [rw] fixed_version + # @return [::Grafeas::V1::Version] + # The distro recommended version to update to that contains a + # fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no + # such version is yet available. + # @!attribute [rw] is_obsolete + # @return [::Boolean] + # Whether this detail is obsolete. Occurrences are expected not to point to + # obsolete details. + # @!attribute [rw] source_update_time + # @return [::Google::Protobuf::Timestamp] + # The time this information was last changed at the source. This is an + # upstream timestamp from the underlying information source - e.g. Ubuntu + # security tracker. + # @!attribute [rw] source + # @return [::String] + # The source from which the information in this Detail was obtained. + # @!attribute [rw] vendor + # @return [::String] + # The name of the vendor of the product. + class Detail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] cpe_uri + # @return [::String] + # Required. The [CPE URI](https://cpe.mitre.org/specification/) this + # vulnerability affects. + # @!attribute [rw] name + # @return [::String] + # Required. The name of this vulnerability. + # @!attribute [rw] description + # @return [::String] + # The description of this vulnerability. + # @!attribute [rw] fixing_kbs + # @return [::Array<::Grafeas::V1::VulnerabilityNote::WindowsDetail::KnowledgeBase>] + # Required. The names of the KBs which have hotfixes to mitigate this + # vulnerability. Note that there may be multiple hotfixes (and thus + # multiple KBs) that mitigate a given vulnerability. Currently any listed + # KBs presence is considered a fix. + class WindowsDetail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] name + # @return [::String] + # The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). + # @!attribute [rw] url + # @return [::String] + # A link to the KB in the [Windows update catalog] + # (https://www.catalog.update.microsoft.com/). + class KnowledgeBase + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # An occurrence of a severity vulnerability on a resource. + # @!attribute [rw] type + # @return [::String] + # The type of package; whether native or non native (e.g., ruby gems, node.js + # packages, etc.). + # @!attribute [rw] severity + # @return [::Grafeas::V1::Severity] + # Output only. The note provider assigned severity of this vulnerability. + # @!attribute [rw] cvss_score + # @return [::Float] + # Output only. The CVSS score of this vulnerability. CVSS score is on a + # scale of 0 - 10 where 0 indicates low severity and 10 indicates high + # severity. + # @!attribute [rw] cvssv3 + # @return [::Grafeas::V1::CVSS] + # The cvss v3 score for the vulnerability. + # @!attribute [rw] package_issue + # @return [::Array<::Grafeas::V1::VulnerabilityOccurrence::PackageIssue>] + # Required. The set of affected locations and their fixes (if available) + # within the associated resource. + # @!attribute [rw] short_description + # @return [::String] + # Output only. A one sentence description of this vulnerability. + # @!attribute [rw] long_description + # @return [::String] + # Output only. A detailed description of this vulnerability. + # @!attribute [rw] related_urls + # @return [::Array<::Grafeas::V1::RelatedUrl>] + # Output only. URLs related to this vulnerability. + # @!attribute [rw] effective_severity + # @return [::Grafeas::V1::Severity] + # The distro assigned severity for this vulnerability when it is available, + # otherwise this is the note provider assigned severity. + # + # When there are multiple PackageIssues for this vulnerability, they can have + # different effective severities because some might be provided by the distro + # while others are provided by the language ecosystem for a language pack. + # For this reason, it is advised to use the effective severity on the + # PackageIssue level. In the case where multiple PackageIssues have differing + # effective severities, this field should be the highest severity for any of + # the PackageIssues. + # @!attribute [rw] fix_available + # @return [::Boolean] + # Output only. Whether at least one of the affected packages has a fix + # available. + # @!attribute [rw] cvss_version + # @return [::Grafeas::V1::CVSSVersion] + # Output only. CVSS version used to populate cvss_score and severity. + # @!attribute [rw] cvss_v2 + # @return [::Grafeas::V1::CVSS] + # The cvss v2 score for the vulnerability. + # @!attribute [rw] vex_assessment + # @return [::Grafeas::V1::VulnerabilityOccurrence::VexAssessment] + # @!attribute [rw] extra_details + # @return [::String] + # Occurrence-specific extra details about the vulnerability. + # @!attribute [rw] risk + # @return [::Grafeas::V1::Risk] + # Risk information about the vulnerability, such as CISA, EPSS, etc. + # @!attribute [rw] cvss_v4 + # @return [::Grafeas::V1::CVSS] + # The cvss v4 score for the vulnerability. + class VulnerabilityOccurrence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A detail for a distro and package this vulnerability occurrence was found + # in and its associated fix (if one is available). + # @!attribute [rw] affected_cpe_uri + # @return [::String] + # Required. The [CPE URI](https://cpe.mitre.org/specification/) this + # vulnerability was found in. + # @!attribute [rw] affected_package + # @return [::String] + # Required. The package this vulnerability was found in. + # @!attribute [rw] affected_version + # @return [::Grafeas::V1::Version] + # Required. The version of the package that is installed on the resource + # affected by this vulnerability. + # @!attribute [rw] fixed_cpe_uri + # @return [::String] + # The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability + # was fixed in. It is possible for this to be different from the + # affected_cpe_uri. + # @!attribute [rw] fixed_package + # @return [::String] + # The package this vulnerability was fixed in. It is possible for this to + # be different from the affected_package. + # @!attribute [rw] fixed_version + # @return [::Grafeas::V1::Version] + # Required. The version of the package this vulnerability was fixed in. + # Setting this to VersionKind.MAXIMUM means no fix is yet available. + # @!attribute [rw] fix_available + # @return [::Boolean] + # Output only. Whether a fix is available for this package. + # @!attribute [rw] package_type + # @return [::String] + # The type of package (e.g. OS, MAVEN, GO). + # @!attribute [r] effective_severity + # @return [::Grafeas::V1::Severity] + # The distro or language system assigned severity for this vulnerability + # when that is available and note provider assigned severity when it is not + # available. + # @!attribute [rw] file_location + # @return [::Array<::Grafeas::V1::FileLocation>] + # The location at which this package was found. + class PackageIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # VexAssessment provides all publisher provided Vex information that is + # related to this vulnerability. + # @!attribute [rw] cve + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) + # tracking number for the vulnerability. + # Deprecated: Use vulnerability_id instead to denote CVEs. + # @!attribute [rw] vulnerability_id + # @return [::String] + # The vulnerability identifier for this Assessment. Will hold one of + # common identifiers e.g. CVE, GHSA etc. + # @!attribute [rw] related_uris + # @return [::Array<::Grafeas::V1::RelatedUrl>] + # Holds a list of references associated with this vulnerability item and + # assessment. + # @!attribute [rw] note_name + # @return [::String] + # The VulnerabilityAssessment note from which this VexAssessment was + # generated. + # This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`. + # (-- api-linter: core::0122::name-suffix=disabled + # aip.dev/not-precedent: The suffix is kept for consistency. --) + # @!attribute [rw] state + # @return [::Grafeas::V1::VulnerabilityAssessmentNote::Assessment::State] + # Provides the state of this Vulnerability assessment. + # @!attribute [rw] impacts + # @return [::Array<::String>] + # Contains information about the impact of this vulnerability, + # this will change with time. + # @!attribute [rw] remediations + # @return [::Array<::Grafeas::V1::VulnerabilityAssessmentNote::Assessment::Remediation>] + # Specifies details on how to handle (and presumably, fix) a vulnerability. + # @!attribute [rw] justification + # @return [::Grafeas::V1::VulnerabilityAssessmentNote::Assessment::Justification] + # Justification provides the justification when the state of the + # assessment if NOT_AFFECTED. + class VexAssessment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/grafeas-v1/snippets/Gemfile b/owl-bot-staging/grafeas-v1/snippets/Gemfile new file mode 100644 index 000000000000..549551d9d158 --- /dev/null +++ b/owl-bot-staging/grafeas-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 "grafeas-v1", path: "../" +else + gem "grafeas-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/grafeas-v1/snippets/grafeas/batch_create_notes.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/batch_create_notes.rb new file mode 100644 index 000000000000..3dca19f5e30c --- /dev/null +++ b/owl-bot-staging/grafeas-v1/snippets/grafeas/batch_create_notes.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START containeranalysis_v1_generated_Grafeas_BatchCreateNotes_sync] +require "grafeas/v1" + +## +# Snippet for the batch_create_notes call in the Grafeas service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Grafeas::V1::Grafeas::Client#batch_create_notes. +# +def batch_create_notes + # Create a client object. The client can be reused for multiple calls. + client = Grafeas::V1::Grafeas::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Grafeas::V1::BatchCreateNotesRequest.new + + # Call the batch_create_notes method. + result = client.batch_create_notes request + + # The returned object is of type Grafeas::V1::BatchCreateNotesResponse. + p result +end +# [END containeranalysis_v1_generated_Grafeas_BatchCreateNotes_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/batch_create_occurrences.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/batch_create_occurrences.rb new file mode 100644 index 000000000000..7fb0e10e68bd --- /dev/null +++ b/owl-bot-staging/grafeas-v1/snippets/grafeas/batch_create_occurrences.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START containeranalysis_v1_generated_Grafeas_BatchCreateOccurrences_sync] +require "grafeas/v1" + +## +# Snippet for the batch_create_occurrences call in the Grafeas service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Grafeas::V1::Grafeas::Client#batch_create_occurrences. +# +def batch_create_occurrences + # Create a client object. The client can be reused for multiple calls. + client = Grafeas::V1::Grafeas::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Grafeas::V1::BatchCreateOccurrencesRequest.new + + # Call the batch_create_occurrences method. + result = client.batch_create_occurrences request + + # The returned object is of type Grafeas::V1::BatchCreateOccurrencesResponse. + p result +end +# [END containeranalysis_v1_generated_Grafeas_BatchCreateOccurrences_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/create_note.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/create_note.rb new file mode 100644 index 000000000000..78afb9c5c326 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/snippets/grafeas/create_note.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START containeranalysis_v1_generated_Grafeas_CreateNote_sync] +require "grafeas/v1" + +## +# Snippet for the create_note call in the Grafeas service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Grafeas::V1::Grafeas::Client#create_note. +# +def create_note + # Create a client object. The client can be reused for multiple calls. + client = Grafeas::V1::Grafeas::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Grafeas::V1::CreateNoteRequest.new + + # Call the create_note method. + result = client.create_note request + + # The returned object is of type Grafeas::V1::Note. + p result +end +# [END containeranalysis_v1_generated_Grafeas_CreateNote_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/create_occurrence.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/create_occurrence.rb new file mode 100644 index 000000000000..f096444c8a9a --- /dev/null +++ b/owl-bot-staging/grafeas-v1/snippets/grafeas/create_occurrence.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START containeranalysis_v1_generated_Grafeas_CreateOccurrence_sync] +require "grafeas/v1" + +## +# Snippet for the create_occurrence call in the Grafeas service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Grafeas::V1::Grafeas::Client#create_occurrence. +# +def create_occurrence + # Create a client object. The client can be reused for multiple calls. + client = Grafeas::V1::Grafeas::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Grafeas::V1::CreateOccurrenceRequest.new + + # Call the create_occurrence method. + result = client.create_occurrence request + + # The returned object is of type Grafeas::V1::Occurrence. + p result +end +# [END containeranalysis_v1_generated_Grafeas_CreateOccurrence_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/delete_note.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/delete_note.rb new file mode 100644 index 000000000000..130f3650ad78 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/snippets/grafeas/delete_note.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START containeranalysis_v1_generated_Grafeas_DeleteNote_sync] +require "grafeas/v1" + +## +# Snippet for the delete_note call in the Grafeas service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Grafeas::V1::Grafeas::Client#delete_note. +# +def delete_note + # Create a client object. The client can be reused for multiple calls. + client = Grafeas::V1::Grafeas::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Grafeas::V1::DeleteNoteRequest.new + + # Call the delete_note method. + result = client.delete_note request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END containeranalysis_v1_generated_Grafeas_DeleteNote_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/delete_occurrence.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/delete_occurrence.rb new file mode 100644 index 000000000000..345a7bafaffb --- /dev/null +++ b/owl-bot-staging/grafeas-v1/snippets/grafeas/delete_occurrence.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START containeranalysis_v1_generated_Grafeas_DeleteOccurrence_sync] +require "grafeas/v1" + +## +# Snippet for the delete_occurrence call in the Grafeas service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Grafeas::V1::Grafeas::Client#delete_occurrence. +# +def delete_occurrence + # Create a client object. The client can be reused for multiple calls. + client = Grafeas::V1::Grafeas::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Grafeas::V1::DeleteOccurrenceRequest.new + + # Call the delete_occurrence method. + result = client.delete_occurrence request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END containeranalysis_v1_generated_Grafeas_DeleteOccurrence_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/get_note.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/get_note.rb new file mode 100644 index 000000000000..fb90bd7d7bf7 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/snippets/grafeas/get_note.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START containeranalysis_v1_generated_Grafeas_GetNote_sync] +require "grafeas/v1" + +## +# Snippet for the get_note call in the Grafeas service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Grafeas::V1::Grafeas::Client#get_note. +# +def get_note + # Create a client object. The client can be reused for multiple calls. + client = Grafeas::V1::Grafeas::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Grafeas::V1::GetNoteRequest.new + + # Call the get_note method. + result = client.get_note request + + # The returned object is of type Grafeas::V1::Note. + p result +end +# [END containeranalysis_v1_generated_Grafeas_GetNote_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/get_occurrence.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/get_occurrence.rb new file mode 100644 index 000000000000..34efaee3033e --- /dev/null +++ b/owl-bot-staging/grafeas-v1/snippets/grafeas/get_occurrence.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START containeranalysis_v1_generated_Grafeas_GetOccurrence_sync] +require "grafeas/v1" + +## +# Snippet for the get_occurrence call in the Grafeas service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Grafeas::V1::Grafeas::Client#get_occurrence. +# +def get_occurrence + # Create a client object. The client can be reused for multiple calls. + client = Grafeas::V1::Grafeas::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Grafeas::V1::GetOccurrenceRequest.new + + # Call the get_occurrence method. + result = client.get_occurrence request + + # The returned object is of type Grafeas::V1::Occurrence. + p result +end +# [END containeranalysis_v1_generated_Grafeas_GetOccurrence_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/get_occurrence_note.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/get_occurrence_note.rb new file mode 100644 index 000000000000..eb5c20b49106 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/snippets/grafeas/get_occurrence_note.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START containeranalysis_v1_generated_Grafeas_GetOccurrenceNote_sync] +require "grafeas/v1" + +## +# Snippet for the get_occurrence_note call in the Grafeas service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Grafeas::V1::Grafeas::Client#get_occurrence_note. +# +def get_occurrence_note + # Create a client object. The client can be reused for multiple calls. + client = Grafeas::V1::Grafeas::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Grafeas::V1::GetOccurrenceNoteRequest.new + + # Call the get_occurrence_note method. + result = client.get_occurrence_note request + + # The returned object is of type Grafeas::V1::Note. + p result +end +# [END containeranalysis_v1_generated_Grafeas_GetOccurrenceNote_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/list_note_occurrences.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/list_note_occurrences.rb new file mode 100644 index 000000000000..176aadb8a24c --- /dev/null +++ b/owl-bot-staging/grafeas-v1/snippets/grafeas/list_note_occurrences.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 containeranalysis_v1_generated_Grafeas_ListNoteOccurrences_sync] +require "grafeas/v1" + +## +# Snippet for the list_note_occurrences call in the Grafeas service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Grafeas::V1::Grafeas::Client#list_note_occurrences. +# +def list_note_occurrences + # Create a client object. The client can be reused for multiple calls. + client = Grafeas::V1::Grafeas::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Grafeas::V1::ListNoteOccurrencesRequest.new + + # Call the list_note_occurrences method. + result = client.list_note_occurrences request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Grafeas::V1::Occurrence. + p item + end +end +# [END containeranalysis_v1_generated_Grafeas_ListNoteOccurrences_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/list_notes.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/list_notes.rb new file mode 100644 index 000000000000..75a6d5fed888 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/snippets/grafeas/list_notes.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 containeranalysis_v1_generated_Grafeas_ListNotes_sync] +require "grafeas/v1" + +## +# Snippet for the list_notes call in the Grafeas service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Grafeas::V1::Grafeas::Client#list_notes. +# +def list_notes + # Create a client object. The client can be reused for multiple calls. + client = Grafeas::V1::Grafeas::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Grafeas::V1::ListNotesRequest.new + + # Call the list_notes method. + result = client.list_notes request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Grafeas::V1::Note. + p item + end +end +# [END containeranalysis_v1_generated_Grafeas_ListNotes_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/list_occurrences.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/list_occurrences.rb new file mode 100644 index 000000000000..e23051faf761 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/snippets/grafeas/list_occurrences.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 containeranalysis_v1_generated_Grafeas_ListOccurrences_sync] +require "grafeas/v1" + +## +# Snippet for the list_occurrences call in the Grafeas service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Grafeas::V1::Grafeas::Client#list_occurrences. +# +def list_occurrences + # Create a client object. The client can be reused for multiple calls. + client = Grafeas::V1::Grafeas::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Grafeas::V1::ListOccurrencesRequest.new + + # Call the list_occurrences method. + result = client.list_occurrences request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Grafeas::V1::Occurrence. + p item + end +end +# [END containeranalysis_v1_generated_Grafeas_ListOccurrences_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/update_note.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/update_note.rb new file mode 100644 index 000000000000..7744b6a35993 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/snippets/grafeas/update_note.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START containeranalysis_v1_generated_Grafeas_UpdateNote_sync] +require "grafeas/v1" + +## +# Snippet for the update_note call in the Grafeas service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Grafeas::V1::Grafeas::Client#update_note. +# +def update_note + # Create a client object. The client can be reused for multiple calls. + client = Grafeas::V1::Grafeas::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Grafeas::V1::UpdateNoteRequest.new + + # Call the update_note method. + result = client.update_note request + + # The returned object is of type Grafeas::V1::Note. + p result +end +# [END containeranalysis_v1_generated_Grafeas_UpdateNote_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/update_occurrence.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/update_occurrence.rb new file mode 100644 index 000000000000..8f2301dba810 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/snippets/grafeas/update_occurrence.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START containeranalysis_v1_generated_Grafeas_UpdateOccurrence_sync] +require "grafeas/v1" + +## +# Snippet for the update_occurrence call in the Grafeas service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Grafeas::V1::Grafeas::Client#update_occurrence. +# +def update_occurrence + # Create a client object. The client can be reused for multiple calls. + client = Grafeas::V1::Grafeas::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Grafeas::V1::UpdateOccurrenceRequest.new + + # Call the update_occurrence method. + result = client.update_occurrence request + + # The returned object is of type Grafeas::V1::Occurrence. + p result +end +# [END containeranalysis_v1_generated_Grafeas_UpdateOccurrence_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/snippet_metadata_grafeas.v1.json b/owl-bot-staging/grafeas-v1/snippets/snippet_metadata_grafeas.v1.json new file mode 100644 index 000000000000..75b0689c6fff --- /dev/null +++ b/owl-bot-staging/grafeas-v1/snippets/snippet_metadata_grafeas.v1.json @@ -0,0 +1,575 @@ +{ + "client_library": { + "name": "grafeas-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "grafeas.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "containeranalysis_v1_generated_Grafeas_GetOccurrence_sync", + "title": "Snippet for the get_occurrence call in the Grafeas service", + "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#get_occurrence.", + "file": "grafeas/get_occurrence.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_occurrence", + "full_name": "::Grafeas::V1::Grafeas::Client#get_occurrence", + "async": false, + "parameters": [ + { + "type": "::Grafeas::V1::GetOccurrenceRequest", + "name": "request" + } + ], + "result_type": "::Grafeas::V1::Occurrence", + "client": { + "short_name": "Grafeas::Client", + "full_name": "::Grafeas::V1::Grafeas::Client" + }, + "method": { + "short_name": "GetOccurrence", + "full_name": "grafeas.v1.Grafeas.GetOccurrence", + "service": { + "short_name": "Grafeas", + "full_name": "grafeas.v1.Grafeas" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "containeranalysis_v1_generated_Grafeas_ListOccurrences_sync", + "title": "Snippet for the list_occurrences call in the Grafeas service", + "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#list_occurrences.", + "file": "grafeas/list_occurrences.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_occurrences", + "full_name": "::Grafeas::V1::Grafeas::Client#list_occurrences", + "async": false, + "parameters": [ + { + "type": "::Grafeas::V1::ListOccurrencesRequest", + "name": "request" + } + ], + "result_type": "::Grafeas::V1::ListOccurrencesResponse", + "client": { + "short_name": "Grafeas::Client", + "full_name": "::Grafeas::V1::Grafeas::Client" + }, + "method": { + "short_name": "ListOccurrences", + "full_name": "grafeas.v1.Grafeas.ListOccurrences", + "service": { + "short_name": "Grafeas", + "full_name": "grafeas.v1.Grafeas" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "containeranalysis_v1_generated_Grafeas_DeleteOccurrence_sync", + "title": "Snippet for the delete_occurrence call in the Grafeas service", + "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#delete_occurrence.", + "file": "grafeas/delete_occurrence.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_occurrence", + "full_name": "::Grafeas::V1::Grafeas::Client#delete_occurrence", + "async": false, + "parameters": [ + { + "type": "::Grafeas::V1::DeleteOccurrenceRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Grafeas::Client", + "full_name": "::Grafeas::V1::Grafeas::Client" + }, + "method": { + "short_name": "DeleteOccurrence", + "full_name": "grafeas.v1.Grafeas.DeleteOccurrence", + "service": { + "short_name": "Grafeas", + "full_name": "grafeas.v1.Grafeas" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "containeranalysis_v1_generated_Grafeas_CreateOccurrence_sync", + "title": "Snippet for the create_occurrence call in the Grafeas service", + "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#create_occurrence.", + "file": "grafeas/create_occurrence.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_occurrence", + "full_name": "::Grafeas::V1::Grafeas::Client#create_occurrence", + "async": false, + "parameters": [ + { + "type": "::Grafeas::V1::CreateOccurrenceRequest", + "name": "request" + } + ], + "result_type": "::Grafeas::V1::Occurrence", + "client": { + "short_name": "Grafeas::Client", + "full_name": "::Grafeas::V1::Grafeas::Client" + }, + "method": { + "short_name": "CreateOccurrence", + "full_name": "grafeas.v1.Grafeas.CreateOccurrence", + "service": { + "short_name": "Grafeas", + "full_name": "grafeas.v1.Grafeas" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "containeranalysis_v1_generated_Grafeas_BatchCreateOccurrences_sync", + "title": "Snippet for the batch_create_occurrences call in the Grafeas service", + "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#batch_create_occurrences.", + "file": "grafeas/batch_create_occurrences.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_create_occurrences", + "full_name": "::Grafeas::V1::Grafeas::Client#batch_create_occurrences", + "async": false, + "parameters": [ + { + "type": "::Grafeas::V1::BatchCreateOccurrencesRequest", + "name": "request" + } + ], + "result_type": "::Grafeas::V1::BatchCreateOccurrencesResponse", + "client": { + "short_name": "Grafeas::Client", + "full_name": "::Grafeas::V1::Grafeas::Client" + }, + "method": { + "short_name": "BatchCreateOccurrences", + "full_name": "grafeas.v1.Grafeas.BatchCreateOccurrences", + "service": { + "short_name": "Grafeas", + "full_name": "grafeas.v1.Grafeas" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "containeranalysis_v1_generated_Grafeas_UpdateOccurrence_sync", + "title": "Snippet for the update_occurrence call in the Grafeas service", + "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#update_occurrence.", + "file": "grafeas/update_occurrence.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_occurrence", + "full_name": "::Grafeas::V1::Grafeas::Client#update_occurrence", + "async": false, + "parameters": [ + { + "type": "::Grafeas::V1::UpdateOccurrenceRequest", + "name": "request" + } + ], + "result_type": "::Grafeas::V1::Occurrence", + "client": { + "short_name": "Grafeas::Client", + "full_name": "::Grafeas::V1::Grafeas::Client" + }, + "method": { + "short_name": "UpdateOccurrence", + "full_name": "grafeas.v1.Grafeas.UpdateOccurrence", + "service": { + "short_name": "Grafeas", + "full_name": "grafeas.v1.Grafeas" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "containeranalysis_v1_generated_Grafeas_GetOccurrenceNote_sync", + "title": "Snippet for the get_occurrence_note call in the Grafeas service", + "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#get_occurrence_note.", + "file": "grafeas/get_occurrence_note.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_occurrence_note", + "full_name": "::Grafeas::V1::Grafeas::Client#get_occurrence_note", + "async": false, + "parameters": [ + { + "type": "::Grafeas::V1::GetOccurrenceNoteRequest", + "name": "request" + } + ], + "result_type": "::Grafeas::V1::Note", + "client": { + "short_name": "Grafeas::Client", + "full_name": "::Grafeas::V1::Grafeas::Client" + }, + "method": { + "short_name": "GetOccurrenceNote", + "full_name": "grafeas.v1.Grafeas.GetOccurrenceNote", + "service": { + "short_name": "Grafeas", + "full_name": "grafeas.v1.Grafeas" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "containeranalysis_v1_generated_Grafeas_GetNote_sync", + "title": "Snippet for the get_note call in the Grafeas service", + "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#get_note.", + "file": "grafeas/get_note.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_note", + "full_name": "::Grafeas::V1::Grafeas::Client#get_note", + "async": false, + "parameters": [ + { + "type": "::Grafeas::V1::GetNoteRequest", + "name": "request" + } + ], + "result_type": "::Grafeas::V1::Note", + "client": { + "short_name": "Grafeas::Client", + "full_name": "::Grafeas::V1::Grafeas::Client" + }, + "method": { + "short_name": "GetNote", + "full_name": "grafeas.v1.Grafeas.GetNote", + "service": { + "short_name": "Grafeas", + "full_name": "grafeas.v1.Grafeas" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "containeranalysis_v1_generated_Grafeas_ListNotes_sync", + "title": "Snippet for the list_notes call in the Grafeas service", + "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#list_notes.", + "file": "grafeas/list_notes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_notes", + "full_name": "::Grafeas::V1::Grafeas::Client#list_notes", + "async": false, + "parameters": [ + { + "type": "::Grafeas::V1::ListNotesRequest", + "name": "request" + } + ], + "result_type": "::Grafeas::V1::ListNotesResponse", + "client": { + "short_name": "Grafeas::Client", + "full_name": "::Grafeas::V1::Grafeas::Client" + }, + "method": { + "short_name": "ListNotes", + "full_name": "grafeas.v1.Grafeas.ListNotes", + "service": { + "short_name": "Grafeas", + "full_name": "grafeas.v1.Grafeas" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "containeranalysis_v1_generated_Grafeas_DeleteNote_sync", + "title": "Snippet for the delete_note call in the Grafeas service", + "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#delete_note.", + "file": "grafeas/delete_note.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_note", + "full_name": "::Grafeas::V1::Grafeas::Client#delete_note", + "async": false, + "parameters": [ + { + "type": "::Grafeas::V1::DeleteNoteRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Grafeas::Client", + "full_name": "::Grafeas::V1::Grafeas::Client" + }, + "method": { + "short_name": "DeleteNote", + "full_name": "grafeas.v1.Grafeas.DeleteNote", + "service": { + "short_name": "Grafeas", + "full_name": "grafeas.v1.Grafeas" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "containeranalysis_v1_generated_Grafeas_CreateNote_sync", + "title": "Snippet for the create_note call in the Grafeas service", + "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#create_note.", + "file": "grafeas/create_note.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_note", + "full_name": "::Grafeas::V1::Grafeas::Client#create_note", + "async": false, + "parameters": [ + { + "type": "::Grafeas::V1::CreateNoteRequest", + "name": "request" + } + ], + "result_type": "::Grafeas::V1::Note", + "client": { + "short_name": "Grafeas::Client", + "full_name": "::Grafeas::V1::Grafeas::Client" + }, + "method": { + "short_name": "CreateNote", + "full_name": "grafeas.v1.Grafeas.CreateNote", + "service": { + "short_name": "Grafeas", + "full_name": "grafeas.v1.Grafeas" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "containeranalysis_v1_generated_Grafeas_BatchCreateNotes_sync", + "title": "Snippet for the batch_create_notes call in the Grafeas service", + "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#batch_create_notes.", + "file": "grafeas/batch_create_notes.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_create_notes", + "full_name": "::Grafeas::V1::Grafeas::Client#batch_create_notes", + "async": false, + "parameters": [ + { + "type": "::Grafeas::V1::BatchCreateNotesRequest", + "name": "request" + } + ], + "result_type": "::Grafeas::V1::BatchCreateNotesResponse", + "client": { + "short_name": "Grafeas::Client", + "full_name": "::Grafeas::V1::Grafeas::Client" + }, + "method": { + "short_name": "BatchCreateNotes", + "full_name": "grafeas.v1.Grafeas.BatchCreateNotes", + "service": { + "short_name": "Grafeas", + "full_name": "grafeas.v1.Grafeas" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "containeranalysis_v1_generated_Grafeas_UpdateNote_sync", + "title": "Snippet for the update_note call in the Grafeas service", + "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#update_note.", + "file": "grafeas/update_note.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_note", + "full_name": "::Grafeas::V1::Grafeas::Client#update_note", + "async": false, + "parameters": [ + { + "type": "::Grafeas::V1::UpdateNoteRequest", + "name": "request" + } + ], + "result_type": "::Grafeas::V1::Note", + "client": { + "short_name": "Grafeas::Client", + "full_name": "::Grafeas::V1::Grafeas::Client" + }, + "method": { + "short_name": "UpdateNote", + "full_name": "grafeas.v1.Grafeas.UpdateNote", + "service": { + "short_name": "Grafeas", + "full_name": "grafeas.v1.Grafeas" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "containeranalysis_v1_generated_Grafeas_ListNoteOccurrences_sync", + "title": "Snippet for the list_note_occurrences call in the Grafeas service", + "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#list_note_occurrences.", + "file": "grafeas/list_note_occurrences.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_note_occurrences", + "full_name": "::Grafeas::V1::Grafeas::Client#list_note_occurrences", + "async": false, + "parameters": [ + { + "type": "::Grafeas::V1::ListNoteOccurrencesRequest", + "name": "request" + } + ], + "result_type": "::Grafeas::V1::ListNoteOccurrencesResponse", + "client": { + "short_name": "Grafeas::Client", + "full_name": "::Grafeas::V1::Grafeas::Client" + }, + "method": { + "short_name": "ListNoteOccurrences", + "full_name": "grafeas.v1.Grafeas.ListNoteOccurrences", + "service": { + "short_name": "Grafeas", + "full_name": "grafeas.v1.Grafeas" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/grafeas-v1/test/grafeas/v1/grafeas_paths_test.rb b/owl-bot-staging/grafeas-v1/test/grafeas/v1/grafeas_paths_test.rb new file mode 100644 index 000000000000..c1ca7ff02579 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/test/grafeas/v1/grafeas_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 "grafeas/v1/grafeas" + +class ::Grafeas::V1::Grafeas::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_note_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.note_path project: "value0", note: "value1" + assert_equal "projects/value0/notes/value1", path + end + end + + def test_occurrence_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.occurrence_path project: "value0", occurrence: "value1" + assert_equal "projects/value0/occurrences/value1", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end +end diff --git a/owl-bot-staging/grafeas-v1/test/grafeas/v1/grafeas_test.rb b/owl-bot-staging/grafeas-v1/test/grafeas/v1/grafeas_test.rb new file mode 100644 index 000000000000..507c27f7fff2 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/test/grafeas/v1/grafeas_test.rb @@ -0,0 +1,971 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "grafeas/v1/grafeas_pb" +require "grafeas/v1/grafeas" + +class ::Grafeas::V1::Grafeas::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_occurrence + # Create GRPC objects. + grpc_response = ::Grafeas::V1::Occurrence.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_occurrence_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_occurrence, name + assert_kind_of ::Grafeas::V1::GetOccurrenceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_occurrence_client_stub do + # Create client + c = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_occurrence({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_occurrence name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_occurrence ::Grafeas::V1::GetOccurrenceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_occurrence({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_occurrence(::Grafeas::V1::GetOccurrenceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_occurrence_client_stub.call_rpc_count + end + end + + def test_list_occurrences + # Create GRPC objects. + grpc_response = ::Grafeas::V1::ListOccurrencesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_occurrences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_occurrences, name + assert_kind_of ::Grafeas::V1::ListOccurrencesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_occurrences_client_stub do + # Create client + c = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_occurrences({ parent: parent, 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 + c.list_occurrences parent: parent, 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 + c.list_occurrences ::Grafeas::V1::ListOccurrencesRequest.new(parent: parent, 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 + c.list_occurrences({ parent: parent, 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 + c.list_occurrences(::Grafeas::V1::ListOccurrencesRequest.new(parent: parent, 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_occurrences_client_stub.call_rpc_count + end + end + + def test_delete_occurrence + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_occurrence_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_occurrence, name + assert_kind_of ::Grafeas::V1::DeleteOccurrenceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_occurrence_client_stub do + # Create client + c = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_occurrence({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_occurrence name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_occurrence ::Grafeas::V1::DeleteOccurrenceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_occurrence({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_occurrence(::Grafeas::V1::DeleteOccurrenceRequest.new(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_occurrence_client_stub.call_rpc_count + end + end + + def test_create_occurrence + # Create GRPC objects. + grpc_response = ::Grafeas::V1::Occurrence.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + occurrence = {} + + create_occurrence_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_occurrence, name + assert_kind_of ::Grafeas::V1::CreateOccurrenceRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Grafeas::V1::Occurrence), request["occurrence"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_occurrence_client_stub do + # Create client + c = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_occurrence({ parent: parent, occurrence: occurrence }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_occurrence parent: parent, occurrence: occurrence do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_occurrence ::Grafeas::V1::CreateOccurrenceRequest.new(parent: parent, occurrence: occurrence) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_occurrence({ parent: parent, occurrence: occurrence }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_occurrence(::Grafeas::V1::CreateOccurrenceRequest.new(parent: parent, occurrence: occurrence), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_occurrence_client_stub.call_rpc_count + end + end + + def test_batch_create_occurrences + # Create GRPC objects. + grpc_response = ::Grafeas::V1::BatchCreateOccurrencesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + occurrences = [{}] + + batch_create_occurrences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_create_occurrences, name + assert_kind_of ::Grafeas::V1::BatchCreateOccurrencesRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Grafeas::V1::Occurrence, request["occurrences"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_create_occurrences_client_stub do + # Create client + c = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.batch_create_occurrences({ parent: parent, occurrences: occurrences }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.batch_create_occurrences parent: parent, occurrences: occurrences do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.batch_create_occurrences ::Grafeas::V1::BatchCreateOccurrencesRequest.new(parent: parent, occurrences: occurrences) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.batch_create_occurrences({ parent: parent, occurrences: occurrences }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.batch_create_occurrences(::Grafeas::V1::BatchCreateOccurrencesRequest.new(parent: parent, occurrences: occurrences), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_create_occurrences_client_stub.call_rpc_count + end + end + + def test_update_occurrence + # Create GRPC objects. + grpc_response = ::Grafeas::V1::Occurrence.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + occurrence = {} + update_mask = {} + + update_occurrence_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_occurrence, name + assert_kind_of ::Grafeas::V1::UpdateOccurrenceRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Grafeas::V1::Occurrence), request["occurrence"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_occurrence_client_stub do + # Create client + c = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_occurrence({ name: name, occurrence: occurrence, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_occurrence name: name, occurrence: occurrence, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_occurrence ::Grafeas::V1::UpdateOccurrenceRequest.new(name: name, occurrence: occurrence, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_occurrence({ name: name, occurrence: occurrence, 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 + c.update_occurrence(::Grafeas::V1::UpdateOccurrenceRequest.new(name: name, occurrence: occurrence, 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_occurrence_client_stub.call_rpc_count + end + end + + def test_get_occurrence_note + # Create GRPC objects. + grpc_response = ::Grafeas::V1::Note.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_occurrence_note_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_occurrence_note, name + assert_kind_of ::Grafeas::V1::GetOccurrenceNoteRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_occurrence_note_client_stub do + # Create client + c = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_occurrence_note({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_occurrence_note name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_occurrence_note ::Grafeas::V1::GetOccurrenceNoteRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_occurrence_note({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_occurrence_note(::Grafeas::V1::GetOccurrenceNoteRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_occurrence_note_client_stub.call_rpc_count + end + end + + def test_get_note + # Create GRPC objects. + grpc_response = ::Grafeas::V1::Note.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_note_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_note, name + assert_kind_of ::Grafeas::V1::GetNoteRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_note_client_stub do + # Create client + c = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_note({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_note name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_note ::Grafeas::V1::GetNoteRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_note({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_note(::Grafeas::V1::GetNoteRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_note_client_stub.call_rpc_count + end + end + + def test_list_notes + # Create GRPC objects. + grpc_response = ::Grafeas::V1::ListNotesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_notes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_notes, name + assert_kind_of ::Grafeas::V1::ListNotesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_notes_client_stub do + # Create client + c = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_notes({ parent: parent, 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 + c.list_notes parent: parent, 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 + c.list_notes ::Grafeas::V1::ListNotesRequest.new(parent: parent, 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 + c.list_notes({ parent: parent, 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 + c.list_notes(::Grafeas::V1::ListNotesRequest.new(parent: parent, 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_notes_client_stub.call_rpc_count + end + end + + def test_delete_note + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_note_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_note, name + assert_kind_of ::Grafeas::V1::DeleteNoteRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_note_client_stub do + # Create client + c = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_note({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_note name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_note ::Grafeas::V1::DeleteNoteRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_note({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_note(::Grafeas::V1::DeleteNoteRequest.new(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_note_client_stub.call_rpc_count + end + end + + def test_create_note + # Create GRPC objects. + grpc_response = ::Grafeas::V1::Note.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + note_id = "hello world" + note = {} + + create_note_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_note, name + assert_kind_of ::Grafeas::V1::CreateNoteRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["note_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Grafeas::V1::Note), request["note"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_note_client_stub do + # Create client + c = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_note({ parent: parent, note_id: note_id, note: note }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_note parent: parent, note_id: note_id, note: note do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_note ::Grafeas::V1::CreateNoteRequest.new(parent: parent, note_id: note_id, note: note) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_note({ parent: parent, note_id: note_id, note: note }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_note(::Grafeas::V1::CreateNoteRequest.new(parent: parent, note_id: note_id, note: note), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_note_client_stub.call_rpc_count + end + end + + def test_batch_create_notes + # Create GRPC objects. + grpc_response = ::Grafeas::V1::BatchCreateNotesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + notes = {} + + batch_create_notes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_create_notes, name + assert_kind_of ::Grafeas::V1::BatchCreateNotesRequest, request + assert_equal "hello world", request["parent"] + assert_equal({}, request["notes"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_create_notes_client_stub do + # Create client + c = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.batch_create_notes({ parent: parent, notes: notes }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.batch_create_notes parent: parent, notes: notes do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.batch_create_notes ::Grafeas::V1::BatchCreateNotesRequest.new(parent: parent, notes: notes) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.batch_create_notes({ parent: parent, notes: notes }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.batch_create_notes(::Grafeas::V1::BatchCreateNotesRequest.new(parent: parent, notes: notes), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_create_notes_client_stub.call_rpc_count + end + end + + def test_update_note + # Create GRPC objects. + grpc_response = ::Grafeas::V1::Note.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + note = {} + update_mask = {} + + update_note_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_note, name + assert_kind_of ::Grafeas::V1::UpdateNoteRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Grafeas::V1::Note), request["note"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_note_client_stub do + # Create client + c = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_note({ name: name, note: note, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_note name: name, note: note, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_note ::Grafeas::V1::UpdateNoteRequest.new(name: name, note: note, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_note({ name: name, note: note, 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 + c.update_note(::Grafeas::V1::UpdateNoteRequest.new(name: name, note: note, 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_note_client_stub.call_rpc_count + end + end + + def test_list_note_occurrences + # Create GRPC objects. + grpc_response = ::Grafeas::V1::ListNoteOccurrencesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + + list_note_occurrences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_note_occurrences, name + assert_kind_of ::Grafeas::V1::ListNoteOccurrencesRequest, 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"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_note_occurrences_client_stub do + # Create client + c = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_note_occurrences({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_note_occurrences name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_note_occurrences ::Grafeas::V1::ListNoteOccurrencesRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_note_occurrences({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_note_occurrences(::Grafeas::V1::ListNoteOccurrencesRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_note_occurrences_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Grafeas::V1::Grafeas::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 ::Grafeas::V1::Grafeas::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 = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Grafeas::V1::Grafeas::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/grafeas-v1/test/helper.rb b/owl-bot-staging/grafeas-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" From 7513faf44b96e0f3bf8392900ffc237b004f2fdd Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 6 Aug 2026 21:11:09 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...oogle-shopping-merchant-data_sources-v1.rb | 2 +- .../shopping/merchant/data_sources/v1.rb | 2 +- .../data_sources/v1/data_sources_service.rb | 2 +- .../v1/data_sources_service/client.rb | 2 +- .../v1/data_sources_service/credentials.rb | 2 +- .../v1/data_sources_service/paths.rb | 2 +- .../v1/data_sources_service/rest.rb | 2 +- .../v1/data_sources_service/rest/client.rb | 2 +- .../data_sources_service/rest/service_stub.rb | 2 +- .../data_sources/v1/file_uploads_service.rb | 2 +- .../v1/file_uploads_service/client.rb | 2 +- .../v1/file_uploads_service/credentials.rb | 2 +- .../v1/file_uploads_service/paths.rb | 2 +- .../v1/file_uploads_service/rest.rb | 2 +- .../v1/file_uploads_service/rest/client.rb | 2 +- .../file_uploads_service/rest/service_stub.rb | 2 +- .../shopping/merchant/data_sources/v1/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../merchant/datasources/v1/datasources.rb | 2 +- .../datasources/v1/datasourcetypes.rb | 2 +- .../merchant/datasources/v1/fileinputs.rb | 2 +- .../merchant/datasources/v1/fileuploads.rb | 2 +- .../proto_docs/google/shopping/type/types.rb | 2 +- .../proto_docs/google/type/dayofweek.rb | 2 +- .../proto_docs/google/type/timeofday.rb | 2 +- .../snippets/Gemfile | 2 +- .../create_data_source.rb | 2 +- .../delete_data_source.rb | 2 +- .../data_sources_service/fetch_data_source.rb | 2 +- .../data_sources_service/get_data_source.rb | 2 +- .../data_sources_service/list_data_sources.rb | 2 +- .../update_data_source.rb | 2 +- .../file_uploads_service/get_file_upload.rb | 2 +- .../v1/data_sources_service_paths_test.rb | 2 +- .../v1/data_sources_service_rest_test.rb | 2 +- .../v1/data_sources_service_test.rb | 2 +- .../v1/file_uploads_service_paths_test.rb | 2 +- .../v1/file_uploads_service_rest_test.rb | 2 +- .../v1/file_uploads_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...e-shopping-merchant-data_sources-v1beta.rb | 2 +- .../shopping/merchant/data_sources/v1beta.rb | 2 +- .../v1beta/data_sources_service.rb | 2 +- .../v1beta/data_sources_service/client.rb | 2 +- .../data_sources_service/credentials.rb | 2 +- .../v1beta/data_sources_service/paths.rb | 2 +- .../v1beta/data_sources_service/rest.rb | 2 +- .../data_sources_service/rest/client.rb | 2 +- .../data_sources_service/rest/service_stub.rb | 2 +- .../v1beta/file_uploads_service.rb | 2 +- .../v1beta/file_uploads_service/client.rb | 2 +- .../file_uploads_service/credentials.rb | 2 +- .../v1beta/file_uploads_service/paths.rb | 2 +- .../v1beta/file_uploads_service/rest.rb | 2 +- .../file_uploads_service/rest/client.rb | 2 +- .../file_uploads_service/rest/service_stub.rb | 2 +- .../merchant/data_sources/v1beta/rest.rb | 2 +- .../v1beta/datasources_services_pb.rb | 2 +- .../v1beta/fileuploads_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../datasources/v1beta/datasources.rb | 2 +- .../datasources/v1beta/datasourcetypes.rb | 2 +- .../merchant/datasources/v1beta/fileinputs.rb | 2 +- .../datasources/v1beta/fileuploads.rb | 2 +- .../proto_docs/google/shopping/type/types.rb | 2 +- .../proto_docs/google/type/dayofweek.rb | 2 +- .../proto_docs/google/type/timeofday.rb | 2 +- .../snippets/Gemfile | 2 +- .../create_data_source.rb | 2 +- .../delete_data_source.rb | 2 +- .../data_sources_service/fetch_data_source.rb | 2 +- .../data_sources_service/get_data_source.rb | 2 +- .../data_sources_service/list_data_sources.rb | 2 +- .../update_data_source.rb | 2 +- .../file_uploads_service/get_file_upload.rb | 2 +- .../v1beta/data_sources_service_paths_test.rb | 2 +- .../v1beta/data_sources_service_rest_test.rb | 2 +- .../v1beta/data_sources_service_test.rb | 2 +- .../v1beta/file_uploads_service_paths_test.rb | 2 +- .../v1beta/file_uploads_service_rest_test.rb | 2 +- .../v1beta/file_uploads_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...google-shopping-merchant-inventories-v1.rb | 2 +- .../shopping/merchant/inventories/v1.rb | 2 +- .../inventories/v1/local_inventory_service.rb | 2 +- .../v1/local_inventory_service/client.rb | 2 +- .../v1/local_inventory_service/credentials.rb | 2 +- .../v1/local_inventory_service/paths.rb | 2 +- .../v1/local_inventory_service/rest.rb | 2 +- .../v1/local_inventory_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1/localinventory_services_pb.rb | 2 +- .../v1/regional_inventory_service.rb | 2 +- .../v1/regional_inventory_service/client.rb | 2 +- .../regional_inventory_service/credentials.rb | 2 +- .../v1/regional_inventory_service/paths.rb | 2 +- .../v1/regional_inventory_service/rest.rb | 2 +- .../regional_inventory_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1/regionalinventory_services_pb.rb | 2 +- .../shopping/merchant/inventories/v1/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../inventories/v1/inventories_common.rb | 2 +- .../merchant/inventories/v1/localinventory.rb | 2 +- .../inventories/v1/regionalinventory.rb | 2 +- .../proto_docs/google/shopping/type/types.rb | 2 +- .../proto_docs/google/type/interval.rb | 2 +- .../snippets/Gemfile | 2 +- .../delete_local_inventory.rb | 2 +- .../insert_local_inventory.rb | 2 +- .../list_local_inventories.rb | 2 +- .../delete_regional_inventory.rb | 2 +- .../insert_regional_inventory.rb | 2 +- .../list_regional_inventories.rb | 2 +- .../v1/local_inventory_service_paths_test.rb | 2 +- .../v1/local_inventory_service_rest_test.rb | 2 +- .../v1/local_inventory_service_test.rb | 2 +- .../regional_inventory_service_paths_test.rb | 2 +- .../regional_inventory_service_rest_test.rb | 2 +- .../v1/regional_inventory_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...le-shopping-merchant-inventories-v1beta.rb | 2 +- .../shopping/merchant/inventories/v1beta.rb | 2 +- .../v1beta/local_inventory_service.rb | 2 +- .../v1beta/local_inventory_service/client.rb | 2 +- .../local_inventory_service/credentials.rb | 2 +- .../v1beta/local_inventory_service/paths.rb | 2 +- .../v1beta/local_inventory_service/rest.rb | 2 +- .../local_inventory_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/localinventory_services_pb.rb | 2 +- .../v1beta/regional_inventory_service.rb | 2 +- .../regional_inventory_service/client.rb | 2 +- .../regional_inventory_service/credentials.rb | 2 +- .../regional_inventory_service/paths.rb | 2 +- .../v1beta/regional_inventory_service/rest.rb | 2 +- .../regional_inventory_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/regionalinventory_services_pb.rb | 2 +- .../merchant/inventories/v1beta/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../inventories/v1beta/localinventory.rb | 2 +- .../inventories/v1beta/regionalinventory.rb | 2 +- .../proto_docs/google/shopping/type/types.rb | 2 +- .../proto_docs/google/type/interval.rb | 2 +- .../snippets/Gemfile | 2 +- .../delete_local_inventory.rb | 2 +- .../insert_local_inventory.rb | 2 +- .../list_local_inventories.rb | 2 +- .../delete_regional_inventory.rb | 2 +- .../insert_regional_inventory.rb | 2 +- .../list_regional_inventories.rb | 2 +- .../local_inventory_service_paths_test.rb | 2 +- .../local_inventory_service_rest_test.rb | 2 +- .../v1beta/local_inventory_service_test.rb | 2 +- .../regional_inventory_service_paths_test.rb | 2 +- .../regional_inventory_service_rest_test.rb | 2 +- .../v1beta/regional_inventory_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-shopping-merchant-lfp-v1/.toys.rb | 2 +- google-shopping-merchant-lfp-v1/Rakefile | 2 +- .../lib/google-shopping-merchant-lfp-v1.rb | 2 +- .../lib/google/shopping/merchant/lfp/v1.rb | 2 +- .../merchant/lfp/v1/lfp_inventory_service.rb | 2 +- .../lfp/v1/lfp_inventory_service/client.rb | 2 +- .../v1/lfp_inventory_service/credentials.rb | 2 +- .../lfp/v1/lfp_inventory_service/paths.rb | 2 +- .../lfp/v1/lfp_inventory_service/rest.rb | 2 +- .../v1/lfp_inventory_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../lfp/v1/lfp_merchant_state_service.rb | 2 +- .../v1/lfp_merchant_state_service/client.rb | 2 +- .../lfp_merchant_state_service/credentials.rb | 2 +- .../v1/lfp_merchant_state_service/paths.rb | 2 +- .../lfp/v1/lfp_merchant_state_service/rest.rb | 2 +- .../lfp_merchant_state_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../merchant/lfp/v1/lfp_sale_service.rb | 2 +- .../lfp/v1/lfp_sale_service/client.rb | 2 +- .../lfp/v1/lfp_sale_service/credentials.rb | 2 +- .../merchant/lfp/v1/lfp_sale_service/paths.rb | 2 +- .../merchant/lfp/v1/lfp_sale_service/rest.rb | 2 +- .../lfp/v1/lfp_sale_service/rest/client.rb | 2 +- .../v1/lfp_sale_service/rest/service_stub.rb | 2 +- .../merchant/lfp/v1/lfp_store_service.rb | 2 +- .../lfp/v1/lfp_store_service/client.rb | 2 +- .../lfp/v1/lfp_store_service/credentials.rb | 2 +- .../lfp/v1/lfp_store_service/paths.rb | 2 +- .../merchant/lfp/v1/lfp_store_service/rest.rb | 2 +- .../lfp/v1/lfp_store_service/rest/client.rb | 2 +- .../v1/lfp_store_service/rest/service_stub.rb | 2 +- .../google/shopping/merchant/lfp/v1/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/field_info.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../shopping/merchant/lfp/v1/lfpinventory.rb | 2 +- .../merchant/lfp/v1/lfpmerchantstate.rb | 2 +- .../shopping/merchant/lfp/v1/lfpsale.rb | 2 +- .../shopping/merchant/lfp/v1/lfpstore.rb | 2 +- .../proto_docs/google/shopping/type/types.rb | 2 +- .../snippets/Gemfile | 2 +- .../insert_lfp_inventory.rb | 2 +- .../get_lfp_merchant_state.rb | 2 +- .../lfp_sale_service/insert_lfp_sale.rb | 2 +- .../lfp_store_service/delete_lfp_store.rb | 2 +- .../lfp_store_service/get_lfp_store.rb | 2 +- .../lfp_store_service/insert_lfp_store.rb | 2 +- .../lfp_store_service/list_lfp_stores.rb | 2 +- .../v1/lfp_inventory_service_paths_test.rb | 2 +- .../lfp/v1/lfp_inventory_service_rest_test.rb | 2 +- .../lfp/v1/lfp_inventory_service_test.rb | 2 +- .../lfp_merchant_state_service_paths_test.rb | 2 +- .../lfp_merchant_state_service_rest_test.rb | 2 +- .../lfp/v1/lfp_merchant_state_service_test.rb | 2 +- .../lfp/v1/lfp_sale_service_paths_test.rb | 2 +- .../lfp/v1/lfp_sale_service_rest_test.rb | 2 +- .../merchant/lfp/v1/lfp_sale_service_test.rb | 2 +- .../lfp/v1/lfp_store_service_paths_test.rb | 2 +- .../lfp/v1/lfp_store_service_rest_test.rb | 2 +- .../merchant/lfp/v1/lfp_store_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-shopping-merchant-lfp-v1beta/.toys.rb | 2 +- google-shopping-merchant-lfp-v1beta/Rakefile | 2 +- .../google-shopping-merchant-lfp-v1beta.rb | 2 +- .../google/shopping/merchant/lfp/v1beta.rb | 2 +- .../lfp/v1beta/lfp_inventory_service.rb | 2 +- .../v1beta/lfp_inventory_service/client.rb | 2 +- .../lfp_inventory_service/credentials.rb | 2 +- .../lfp/v1beta/lfp_inventory_service/paths.rb | 2 +- .../lfp/v1beta/lfp_inventory_service/rest.rb | 2 +- .../lfp_inventory_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../lfp/v1beta/lfp_merchant_state_service.rb | 2 +- .../lfp_merchant_state_service/client.rb | 2 +- .../lfp_merchant_state_service/credentials.rb | 2 +- .../lfp_merchant_state_service/paths.rb | 2 +- .../v1beta/lfp_merchant_state_service/rest.rb | 2 +- .../lfp_merchant_state_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../merchant/lfp/v1beta/lfp_sale_service.rb | 2 +- .../lfp/v1beta/lfp_sale_service/client.rb | 2 +- .../v1beta/lfp_sale_service/credentials.rb | 2 +- .../lfp/v1beta/lfp_sale_service/paths.rb | 2 +- .../lfp/v1beta/lfp_sale_service/rest.rb | 2 +- .../v1beta/lfp_sale_service/rest/client.rb | 2 +- .../lfp_sale_service/rest/service_stub.rb | 2 +- .../merchant/lfp/v1beta/lfp_store_service.rb | 2 +- .../lfp/v1beta/lfp_store_service/client.rb | 2 +- .../v1beta/lfp_store_service/credentials.rb | 2 +- .../lfp/v1beta/lfp_store_service/paths.rb | 2 +- .../lfp/v1beta/lfp_store_service/rest.rb | 2 +- .../v1beta/lfp_store_service/rest/client.rb | 2 +- .../lfp_store_service/rest/service_stub.rb | 2 +- .../lfp/v1beta/lfpinventory_services_pb.rb | 2 +- .../lfp/v1beta/lfpsale_services_pb.rb | 2 +- .../lfp/v1beta/lfpstore_services_pb.rb | 2 +- .../shopping/merchant/lfp/v1beta/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/field_info.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../merchant/lfp/v1beta/lfpinventory.rb | 2 +- .../merchant/lfp/v1beta/lfpmerchantstate.rb | 2 +- .../shopping/merchant/lfp/v1beta/lfpsale.rb | 2 +- .../shopping/merchant/lfp/v1beta/lfpstore.rb | 2 +- .../proto_docs/google/shopping/type/types.rb | 2 +- .../snippets/Gemfile | 2 +- .../insert_lfp_inventory.rb | 2 +- .../get_lfp_merchant_state.rb | 2 +- .../lfp_sale_service/insert_lfp_sale.rb | 2 +- .../lfp_store_service/delete_lfp_store.rb | 2 +- .../lfp_store_service/get_lfp_store.rb | 2 +- .../lfp_store_service/insert_lfp_store.rb | 2 +- .../lfp_store_service/list_lfp_stores.rb | 2 +- .../lfp_inventory_service_paths_test.rb | 2 +- .../v1beta/lfp_inventory_service_rest_test.rb | 2 +- .../lfp/v1beta/lfp_inventory_service_test.rb | 2 +- .../lfp_merchant_state_service_paths_test.rb | 2 +- .../lfp_merchant_state_service_rest_test.rb | 2 +- .../v1beta/lfp_merchant_state_service_test.rb | 2 +- .../lfp/v1beta/lfp_sale_service_paths_test.rb | 2 +- .../lfp/v1beta/lfp_sale_service_rest_test.rb | 2 +- .../lfp/v1beta/lfp_sale_service_test.rb | 2 +- .../v1beta/lfp_store_service_paths_test.rb | 2 +- .../lfp/v1beta/lfp_store_service_rest_test.rb | 2 +- .../lfp/v1beta/lfp_store_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-shopping-merchant-products-v1/.toys.rb | 2 +- google-shopping-merchant-products-v1/Rakefile | 2 +- .../google-shopping-merchant-products-v1.rb | 2 +- .../google/shopping/merchant/products/v1.rb | 2 +- .../products/v1/product_inputs_service.rb | 2 +- .../v1/product_inputs_service/client.rb | 2 +- .../v1/product_inputs_service/credentials.rb | 2 +- .../v1/product_inputs_service/paths.rb | 2 +- .../v1/product_inputs_service/rest.rb | 2 +- .../v1/product_inputs_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../products/v1/productinputs_services_pb.rb | 2 +- .../merchant/products/v1/products_service.rb | 2 +- .../products/v1/products_service/client.rb | 2 +- .../v1/products_service/credentials.rb | 2 +- .../products/v1/products_service/paths.rb | 2 +- .../products/v1/products_service/rest.rb | 2 +- .../v1/products_service/rest/client.rb | 2 +- .../v1/products_service/rest/service_stub.rb | 2 +- .../products/v1/products_services_pb.rb | 2 +- .../shopping/merchant/products/v1/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../merchant/products/v1/productinputs.rb | 2 +- .../shopping/merchant/products/v1/products.rb | 2 +- .../merchant/products/v1/products_common.rb | 2 +- .../proto_docs/google/shopping/type/types.rb | 2 +- .../proto_docs/google/type/interval.rb | 2 +- .../snippets/Gemfile | 2 +- .../delete_product_input.rb | 2 +- .../insert_product_input.rb | 2 +- .../update_product_input.rb | 2 +- .../snippets/products_service/get_product.rb | 2 +- .../products_service/list_products.rb | 2 +- .../v1/product_inputs_service_paths_test.rb | 2 +- .../v1/product_inputs_service_rest_test.rb | 2 +- .../v1/product_inputs_service_test.rb | 2 +- .../v1/products_service_paths_test.rb | 2 +- .../products/v1/products_service_rest_test.rb | 2 +- .../products/v1/products_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...oogle-shopping-merchant-products-v1beta.rb | 2 +- .../shopping/merchant/products/v1beta.rb | 2 +- .../products/v1beta/product_inputs_service.rb | 2 +- .../v1beta/product_inputs_service/client.rb | 2 +- .../product_inputs_service/credentials.rb | 2 +- .../v1beta/product_inputs_service/paths.rb | 2 +- .../v1beta/product_inputs_service/rest.rb | 2 +- .../product_inputs_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/productinputs_services_pb.rb | 2 +- .../products/v1beta/products_service.rb | 2 +- .../v1beta/products_service/client.rb | 2 +- .../v1beta/products_service/credentials.rb | 2 +- .../products/v1beta/products_service/paths.rb | 2 +- .../products/v1beta/products_service/rest.rb | 2 +- .../v1beta/products_service/rest/client.rb | 2 +- .../products_service/rest/service_stub.rb | 2 +- .../products/v1beta/products_services_pb.rb | 2 +- .../shopping/merchant/products/v1beta/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../merchant/products/v1beta/productinputs.rb | 2 +- .../merchant/products/v1beta/products.rb | 2 +- .../products/v1beta/products_common.rb | 2 +- .../proto_docs/google/shopping/type/types.rb | 2 +- .../proto_docs/google/type/interval.rb | 2 +- .../snippets/Gemfile | 2 +- .../delete_product_input.rb | 2 +- .../insert_product_input.rb | 2 +- .../update_product_input.rb | 2 +- .../snippets/products_service/get_product.rb | 2 +- .../products_service/list_products.rb | 2 +- .../product_inputs_service_paths_test.rb | 2 +- .../product_inputs_service_rest_test.rb | 2 +- .../v1beta/product_inputs_service_test.rb | 2 +- .../v1beta/products_service_paths_test.rb | 2 +- .../v1beta/products_service_rest_test.rb | 2 +- .../products/v1beta/products_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- .../google-shopping-merchant-promotions-v1.rb | 2 +- .../google/shopping/merchant/promotions/v1.rb | 2 +- .../promotions/v1/promotions_service.rb | 2 +- .../v1/promotions_service/client.rb | 2 +- .../v1/promotions_service/credentials.rb | 2 +- .../promotions/v1/promotions_service/paths.rb | 2 +- .../promotions/v1/promotions_service/rest.rb | 2 +- .../v1/promotions_service/rest/client.rb | 2 +- .../promotions_service/rest/service_stub.rb | 2 +- .../shopping/merchant/promotions/v1/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../merchant/promotions/v1/promotions.rb | 2 +- .../promotions/v1/promotions_common.rb | 2 +- .../proto_docs/google/shopping/type/types.rb | 2 +- .../proto_docs/google/type/interval.rb | 2 +- .../snippets/Gemfile | 2 +- .../promotions_service/get_promotion.rb | 2 +- .../promotions_service/insert_promotion.rb | 2 +- .../promotions_service/list_promotions.rb | 2 +- .../v1/promotions_service_paths_test.rb | 2 +- .../v1/promotions_service_rest_test.rb | 2 +- .../promotions/v1/promotions_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...gle-shopping-merchant-promotions-v1beta.rb | 2 +- .../shopping/merchant/promotions/v1beta.rb | 2 +- .../promotions/v1beta/promotions_service.rb | 2 +- .../v1beta/promotions_service/client.rb | 2 +- .../v1beta/promotions_service/credentials.rb | 2 +- .../v1beta/promotions_service/paths.rb | 2 +- .../v1beta/promotions_service/rest.rb | 2 +- .../v1beta/promotions_service/rest/client.rb | 2 +- .../promotions_service/rest/service_stub.rb | 2 +- .../v1beta/promotions_services_pb.rb | 2 +- .../merchant/promotions/v1beta/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../merchant/promotions/v1beta/promotions.rb | 2 +- .../promotions/v1beta/promotions_common.rb | 2 +- .../proto_docs/google/shopping/type/types.rb | 2 +- .../proto_docs/google/type/interval.rb | 2 +- .../snippets/Gemfile | 2 +- .../promotions_service/get_promotion.rb | 2 +- .../promotions_service/insert_promotion.rb | 2 +- .../promotions_service/list_promotions.rb | 2 +- .../v1beta/promotions_service_paths_test.rb | 2 +- .../v1beta/promotions_service_rest_test.rb | 2 +- .../v1beta/promotions_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-shopping-merchant-reports-v1/.toys.rb | 2 +- google-shopping-merchant-reports-v1/Rakefile | 2 +- .../google-shopping-merchant-reports-v1.rb | 2 +- .../google/shopping/merchant/reports/v1.rb | 2 +- .../merchant/reports/v1/report_service.rb | 2 +- .../reports/v1/report_service/client.rb | 2 +- .../reports/v1/report_service/credentials.rb | 2 +- .../reports/v1/report_service/rest.rb | 2 +- .../reports/v1/report_service/rest/client.rb | 2 +- .../v1/report_service/rest/service_stub.rb | 2 +- .../reports/v1/reports_services_pb.rb | 2 +- .../shopping/merchant/reports/v1/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../shopping/merchant/reports/v1/reports.rb | 2 +- .../proto_docs/google/shopping/type/types.rb | 2 +- .../proto_docs/google/type/date.rb | 2 +- .../snippets/Gemfile | 2 +- .../snippets/report_service/search.rb | 2 +- .../reports/v1/report_service_rest_test.rb | 2 +- .../reports/v1/report_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...google-shopping-merchant-reports-v1beta.rb | 2 +- .../shopping/merchant/reports/v1beta.rb | 2 +- .../merchant/reports/v1beta/report_service.rb | 2 +- .../reports/v1beta/report_service/client.rb | 2 +- .../v1beta/report_service/credentials.rb | 2 +- .../reports/v1beta/report_service/rest.rb | 2 +- .../v1beta/report_service/rest/client.rb | 2 +- .../report_service/rest/service_stub.rb | 2 +- .../reports/v1beta/reports_services_pb.rb | 2 +- .../shopping/merchant/reports/v1beta/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../merchant/reports/v1beta/reports.rb | 2 +- .../proto_docs/google/shopping/type/types.rb | 2 +- .../proto_docs/google/type/date.rb | 2 +- .../snippets/Gemfile | 2 +- .../snippets/report_service/search.rb | 2 +- .../v1beta/report_service_rest_test.rb | 2 +- .../reports/v1beta/report_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...google-shopping-merchant-reviews-v1beta.rb | 2 +- .../shopping/merchant/reviews/v1beta.rb | 2 +- .../v1beta/merchant_reviews_service.rb | 2 +- .../v1beta/merchant_reviews_service/client.rb | 2 +- .../merchant_reviews_service/credentials.rb | 2 +- .../v1beta/merchant_reviews_service/paths.rb | 2 +- .../v1beta/merchant_reviews_service/rest.rb | 2 +- .../merchant_reviews_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/merchantreviews_services_pb.rb | 2 +- .../reviews/v1beta/product_reviews_service.rb | 2 +- .../v1beta/product_reviews_service/client.rb | 2 +- .../product_reviews_service/credentials.rb | 2 +- .../v1beta/product_reviews_service/paths.rb | 2 +- .../v1beta/product_reviews_service/rest.rb | 2 +- .../product_reviews_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta/productreviews_services_pb.rb | 2 +- .../shopping/merchant/reviews/v1beta/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../reviews/v1beta/merchantreviews.rb | 2 +- .../reviews/v1beta/merchantreviews_common.rb | 2 +- .../merchant/reviews/v1beta/productreviews.rb | 2 +- .../reviews/v1beta/productreviews_common.rb | 2 +- .../proto_docs/google/shopping/type/types.rb | 2 +- .../snippets/Gemfile | 2 +- .../delete_merchant_review.rb | 2 +- .../get_merchant_review.rb | 2 +- .../insert_merchant_review.rb | 2 +- .../list_merchant_reviews.rb | 2 +- .../delete_product_review.rb | 2 +- .../get_product_review.rb | 2 +- .../insert_product_review.rb | 2 +- .../list_product_reviews.rb | 2 +- .../merchant_reviews_service_paths_test.rb | 2 +- .../merchant_reviews_service_rest_test.rb | 2 +- .../v1beta/merchant_reviews_service_test.rb | 2 +- .../product_reviews_service_paths_test.rb | 2 +- .../product_reviews_service_rest_test.rb | 2 +- .../v1beta/product_reviews_service_test.rb | 2 +- .../test/helper.rb | 2 +- grafeas-v1/.owlbot-manifest.json | 3 +- grafeas-v1/.toys.rb | 2 +- grafeas-v1/Rakefile | 2 +- grafeas-v1/lib/grafeas-v1.rb | 2 +- grafeas-v1/lib/grafeas/v1.rb | 2 +- grafeas-v1/lib/grafeas/v1/grafeas.rb | 2 +- grafeas-v1/lib/grafeas/v1/grafeas/client.rb | 2 +- grafeas-v1/lib/grafeas/v1/grafeas/paths.rb | 2 +- grafeas-v1/proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- grafeas-v1/proto_docs/google/api/resource.rb | 2 +- grafeas-v1/proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/struct.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- grafeas-v1/proto_docs/google/rpc/status.rb | 2 +- .../proto_docs/grafeas/v1/attestation.rb | 2 +- grafeas-v1/proto_docs/grafeas/v1/build.rb | 2 +- grafeas-v1/proto_docs/grafeas/v1/common.rb | 2 +- .../proto_docs/grafeas/v1/compliance.rb | 2 +- grafeas-v1/proto_docs/grafeas/v1/cvss.rb | 2 +- .../proto_docs/grafeas/v1/deployment.rb | 2 +- grafeas-v1/proto_docs/grafeas/v1/discovery.rb | 2 +- .../proto_docs/grafeas/v1/dsse_attestation.rb | 2 +- grafeas-v1/proto_docs/grafeas/v1/grafeas.rb | 2 +- grafeas-v1/proto_docs/grafeas/v1/image.rb | 2 +- .../grafeas/v1/intoto_provenance.rb | 2 +- .../proto_docs/grafeas/v1/intoto_statement.rb | 2 +- grafeas-v1/proto_docs/grafeas/v1/package.rb | 2 +- .../proto_docs/grafeas/v1/provenance.rb | 2 +- grafeas-v1/proto_docs/grafeas/v1/sbom.rb | 2 +- grafeas-v1/proto_docs/grafeas/v1/secret.rb | 2 +- grafeas-v1/proto_docs/grafeas/v1/severity.rb | 2 +- .../proto_docs/grafeas/v1/slsa_provenance.rb | 2 +- .../grafeas/v1/slsa_provenance_zero_two.rb | 2 +- grafeas-v1/proto_docs/grafeas/v1/upgrade.rb | 2 +- grafeas-v1/proto_docs/grafeas/v1/vex.rb | 2 +- .../proto_docs/grafeas/v1/vulnerability.rb | 2 +- grafeas-v1/snippets/Gemfile | 2 +- .../snippets/grafeas/batch_create_notes.rb | 2 +- .../grafeas/batch_create_occurrences.rb | 2 +- grafeas-v1/snippets/grafeas/create_note.rb | 2 +- .../snippets/grafeas/create_occurrence.rb | 2 +- grafeas-v1/snippets/grafeas/delete_note.rb | 2 +- .../snippets/grafeas/delete_occurrence.rb | 2 +- grafeas-v1/snippets/grafeas/get_note.rb | 2 +- grafeas-v1/snippets/grafeas/get_occurrence.rb | 2 +- .../snippets/grafeas/get_occurrence_note.rb | 2 +- .../snippets/grafeas/list_note_occurrences.rb | 2 +- grafeas-v1/snippets/grafeas/list_notes.rb | 2 +- .../snippets/grafeas/list_occurrences.rb | 2 +- grafeas-v1/snippets/grafeas/update_note.rb | 2 +- .../snippets/grafeas/update_occurrence.rb | 2 +- .../test/grafeas/v1/grafeas_paths_test.rb | 2 +- grafeas-v1/test/grafeas/v1/grafeas_test.rb | 2 +- grafeas-v1/test/helper.rb | 2 +- .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../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 | 986 ------ .../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 | 901 ------ .../data_sources_service/rest/service_stub.rb | 452 --- .../data_sources/v1/file_uploads_service.rb | 57 - .../v1/file_uploads_service/client.rb | 486 --- .../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 | 436 --- .../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 | 593 ---- .../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 | 128 - .../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 | 49 - .../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 | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../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 | 982 ------ .../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 | 897 ------ .../data_sources_service/rest/service_stub.rb | 452 --- .../v1beta/file_uploads_service.rb | 57 - .../v1beta/file_uploads_service/client.rb | 486 --- .../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 | 436 --- .../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 | 593 ---- .../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 | 128 - .../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 | 49 - .../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 | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../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 | 33 - .../inventories/v1/local_inventory_service.rb | 57 - .../v1/local_inventory_service/client.rb | 804 ----- .../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 | 740 ----- .../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 | 807 ----- .../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 | 743 ----- .../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 | 593 ---- .../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 | 128 - .../inventories/v1/inventories_common.rb | 275 -- .../merchant/inventories/v1/localinventory.rb | 258 -- .../inventories/v1/regionalinventory.rb | 262 -- .../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 | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../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 | 713 ----- .../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 | 649 ---- .../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 | 713 ----- .../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 | 649 ---- .../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 | 593 ---- .../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 | 128 - .../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 | 35 - .../.gitignore | 20 - .../.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 | 15 - .../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 | 490 --- .../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 | 440 --- .../rest/service_stub.rb | 145 - .../lfp/v1/lfp_merchant_state_service.rb | 62 - .../v1/lfp_merchant_state_service/client.rb | 490 --- .../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 | 440 --- .../rest/service_stub.rb | 144 - .../merchant/lfp/v1/lfp_sale_service.rb | 59 - .../lfp/v1/lfp_sale_service/client.rb | 488 --- .../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 | 438 --- .../v1/lfp_sale_service/rest/service_stub.rb | 145 - .../merchant/lfp/v1/lfp_store_service.rb | 59 - .../lfp/v1/lfp_store_service/client.rb | 790 ----- .../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 | 719 ----- .../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 | 593 ---- .../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 | 128 - .../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 | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../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 | 490 --- .../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 | 440 --- .../rest/service_stub.rb | 145 - .../lfp/v1beta/lfp_merchant_state_service.rb | 59 - .../lfp_merchant_state_service/client.rb | 486 --- .../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 | 436 --- .../rest/service_stub.rb | 144 - .../merchant/lfp/v1beta/lfp_sale_service.rb | 59 - .../lfp/v1beta/lfp_sale_service/client.rb | 488 --- .../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 | 438 --- .../lfp_sale_service/rest/service_stub.rb | 145 - .../merchant/lfp/v1beta/lfp_store_service.rb | 59 - .../lfp/v1beta/lfp_store_service/client.rb | 790 ----- .../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 | 719 ----- .../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 | 593 ---- .../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 | 128 - .../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 | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 -- .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 52 - ...ogle-shopping-merchant-products-v1.gemspec | 29 - .../google-shopping-merchant-products-v1.rb | 21 - .../google/shopping/merchant/products/v1.rb | 48 - .../products/v1/product_inputs_service.rb | 57 - .../v1/product_inputs_service/client.rb | 765 ----- .../v1/product_inputs_service/credentials.rb | 49 - .../v1/product_inputs_service/paths.rb | 66 - .../v1/product_inputs_service/rest.rb | 54 - .../v1/product_inputs_service/rest/client.rb | 701 ----- .../rest/service_stub.rb | 268 -- .../merchant/products/v1/productinputs_pb.rb | 35 - .../products/v1/productinputs_services_pb.rb | 71 - .../products/v1/products_common_pb.rb | 104 - .../merchant/products/v1/products_pb.rb | 33 - .../merchant/products/v1/products_service.rb | 57 - .../products/v1/products_service/client.rb | 636 ---- .../v1/products_service/credentials.rb | 49 - .../products/v1/products_service/paths.rb | 66 - .../products/v1/products_service/rest.rb | 54 - .../v1/products_service/rest/client.rb | 579 ---- .../v1/products_service/rest/service_stub.rb | 205 -- .../products/v1/products_services_pb.rb | 57 - .../shopping/merchant/products/v1/rest.rb | 40 - .../shopping/merchant/products/v1/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 ---- .../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 | 128 - .../merchant/products/v1/productinputs.rb | 297 -- .../shopping/merchant/products/v1/products.rb | 221 -- .../merchant/products/v1/products_common.rb | 2786 ----------------- .../proto_docs/google/shopping/type/types.rb | 248 -- .../proto_docs/google/type/interval.rb | 45 - .../snippets/Gemfile | 32 - .../delete_product_input.rb | 47 - .../insert_product_input.rb | 47 - .../update_product_input.rb | 47 - .../snippets/products_service/get_product.rb | 47 - .../products_service/list_products.rb | 51 - ..._google.shopping.merchant.products.v1.json | 215 -- .../v1/product_inputs_service_paths_test.rb | 67 - .../v1/product_inputs_service_rest_test.rb | 266 -- .../v1/product_inputs_service_test.rb | 288 -- .../v1/products_service_paths_test.rb | 67 - .../products/v1/products_service_rest_test.rb | 209 -- .../products/v1/products_service_test.rb | 229 -- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 -- .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 52 - ...-shopping-merchant-products-v1beta.gemspec | 29 - ...oogle-shopping-merchant-products-v1beta.rb | 21 - .../shopping/merchant/products/v1beta.rb | 48 - .../products/v1beta/product_inputs_service.rb | 58 - .../v1beta/product_inputs_service/client.rb | 733 ----- .../product_inputs_service/credentials.rb | 49 - .../v1beta/product_inputs_service/paths.rb | 66 - .../v1beta/product_inputs_service/rest.rb | 55 - .../product_inputs_service/rest/client.rb | 669 ---- .../rest/service_stub.rb | 268 -- .../products/v1beta/productinputs_pb.rb | 35 - .../v1beta/productinputs_services_pb.rb | 68 - .../products/v1beta/products_common_pb.rb | 54 - .../merchant/products/v1beta/products_pb.rb | 33 - .../products/v1beta/products_service.rb | 57 - .../v1beta/products_service/client.rb | 606 ---- .../v1beta/products_service/credentials.rb | 49 - .../products/v1beta/products_service/paths.rb | 66 - .../products/v1beta/products_service/rest.rb | 54 - .../v1beta/products_service/rest/client.rb | 549 ---- .../products_service/rest/service_stub.rb | 205 -- .../products/v1beta/products_services_pb.rb | 57 - .../shopping/merchant/products/v1beta/rest.rb | 40 - .../merchant/products/v1beta/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 ---- .../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 | 128 - .../merchant/products/v1beta/productinputs.rb | 213 -- .../merchant/products/v1beta/products.rb | 166 - .../products/v1beta/products_common.rb | 1029 ------ .../proto_docs/google/shopping/type/types.rb | 248 -- .../proto_docs/google/type/interval.rb | 45 - .../snippets/Gemfile | 32 - .../delete_product_input.rb | 47 - .../insert_product_input.rb | 47 - .../update_product_input.rb | 47 - .../snippets/products_service/get_product.rb | 47 - .../products_service/list_products.rb | 51 - ...gle.shopping.merchant.products.v1beta.json | 215 -- .../product_inputs_service_paths_test.rb | 67 - .../product_inputs_service_rest_test.rb | 266 -- .../v1beta/product_inputs_service_test.rb | 288 -- .../v1beta/products_service_paths_test.rb | 67 - .../v1beta/products_service_rest_test.rb | 209 -- .../products/v1beta/products_service_test.rb | 229 -- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 -- .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 33 - ...le-shopping-merchant-promotions-v1.gemspec | 29 - .../google-shopping-merchant-promotions-v1.rb | 21 - .../google/shopping/merchant/promotions/v1.rb | 47 - .../promotions/v1/promotions_common_pb.rb | 38 - .../merchant/promotions/v1/promotions_pb.rb | 34 - .../promotions/v1/promotions_service.rb | 57 - .../v1/promotions_service/client.rb | 703 ----- .../v1/promotions_service/credentials.rb | 49 - .../promotions/v1/promotions_service/paths.rb | 52 - .../promotions/v1/promotions_service/rest.rb | 54 - .../v1/promotions_service/rest/client.rb | 639 ---- .../promotions_service/rest/service_stub.rb | 267 -- .../promotions/v1/promotions_services_pb.rb | 60 - .../shopping/merchant/promotions/v1/rest.rb | 39 - .../merchant/promotions/v1/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 ---- .../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/timestamp.rb | 128 - .../merchant/promotions/v1/promotions.rb | 176 -- .../promotions/v1/promotions_common.rb | 446 --- .../proto_docs/google/shopping/type/types.rb | 248 -- .../proto_docs/google/type/interval.rb | 45 - .../snippets/Gemfile | 32 - .../promotions_service/get_promotion.rb | 47 - .../promotions_service/insert_promotion.rb | 47 - .../promotions_service/list_promotions.rb | 51 - ...oogle.shopping.merchant.promotions.v1.json | 135 - .../v1/promotions_service_paths_test.rb | 55 - .../v1/promotions_service_rest_test.rb | 265 -- .../promotions/v1/promotions_service_test.rb | 291 -- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 -- .../README.md | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 33 - ...hopping-merchant-promotions-v1beta.gemspec | 29 - ...gle-shopping-merchant-promotions-v1beta.rb | 21 - .../shopping/merchant/promotions/v1beta.rb | 47 - .../promotions/v1beta/promotions_common_pb.rb | 38 - .../promotions/v1beta/promotions_pb.rb | 34 - .../promotions/v1beta/promotions_service.rb | 57 - .../v1beta/promotions_service/client.rb | 692 ---- .../v1beta/promotions_service/credentials.rb | 49 - .../v1beta/promotions_service/paths.rb | 52 - .../v1beta/promotions_service/rest.rb | 54 - .../v1beta/promotions_service/rest/client.rb | 628 ---- .../promotions_service/rest/service_stub.rb | 267 -- .../v1beta/promotions_services_pb.rb | 60 - .../merchant/promotions/v1beta/rest.rb | 39 - .../merchant/promotions/v1beta/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 ---- .../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/timestamp.rb | 128 - .../merchant/promotions/v1beta/promotions.rb | 176 -- .../promotions/v1beta/promotions_common.rb | 445 --- .../proto_docs/google/shopping/type/types.rb | 248 -- .../proto_docs/google/type/interval.rb | 45 - .../snippets/Gemfile | 32 - .../promotions_service/get_promotion.rb | 47 - .../promotions_service/insert_promotion.rb | 47 - .../promotions_service/list_promotions.rb | 51 - ...e.shopping.merchant.promotions.v1beta.json | 135 - .../v1beta/promotions_service_paths_test.rb | 55 - .../v1beta/promotions_service_rest_test.rb | 265 -- .../v1beta/promotions_service_test.rb | 291 -- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 -- .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 23 - ...oogle-shopping-merchant-reports-v1.gemspec | 29 - .../google-shopping-merchant-reports-v1.rb | 21 - .../google/shopping/merchant/reports/v1.rb | 47 - .../merchant/reports/v1/report_service.rb | 57 - .../reports/v1/report_service/client.rb | 506 --- .../reports/v1/report_service/credentials.rb | 49 - .../reports/v1/report_service/rest.rb | 54 - .../reports/v1/report_service/rest/client.rb | 456 --- .../v1/report_service/rest/service_stub.rb | 145 - .../merchant/reports/v1/reports_pb.rb | 65 - .../reports/v1/reports_services_pb.rb | 50 - .../shopping/merchant/reports/v1/rest.rb | 39 - .../shopping/merchant/reports/v1/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 ---- .../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/timestamp.rb | 128 - .../shopping/merchant/reports/v1/reports.rb | 1382 -------- .../proto_docs/google/shopping/type/types.rb | 248 -- .../proto_docs/google/type/date.rb | 56 - .../snippets/Gemfile | 32 - .../snippets/report_service/search.rb | 51 - ...a_google.shopping.merchant.reports.v1.json | 55 - .../reports/v1/report_service_rest_test.rb | 156 - .../reports/v1/report_service_test.rb | 173 - .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 -- .../README.md | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 23 - ...e-shopping-merchant-reports-v1beta.gemspec | 29 - ...google-shopping-merchant-reports-v1beta.rb | 21 - .../shopping/merchant/reports/v1beta.rb | 47 - .../merchant/reports/v1beta/report_service.rb | 57 - .../reports/v1beta/report_service/client.rb | 505 --- .../v1beta/report_service/credentials.rb | 49 - .../reports/v1beta/report_service/rest.rb | 54 - .../v1beta/report_service/rest/client.rb | 455 --- .../report_service/rest/service_stub.rb | 145 - .../merchant/reports/v1beta/reports_pb.rb | 62 - .../reports/v1beta/reports_services_pb.rb | 50 - .../shopping/merchant/reports/v1beta/rest.rb | 39 - .../merchant/reports/v1beta/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 ---- .../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/timestamp.rb | 128 - .../merchant/reports/v1beta/reports.rb | 1291 -------- .../proto_docs/google/shopping/type/types.rb | 248 -- .../proto_docs/google/type/date.rb | 56 - .../snippets/Gemfile | 32 - .../snippets/report_service/search.rb | 51 - ...ogle.shopping.merchant.reports.v1beta.json | 55 - .../v1beta/report_service_rest_test.rb | 156 - .../reports/v1beta/report_service_test.rb | 173 - .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 -- .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 67 - ...e-shopping-merchant-reviews-v1beta.gemspec | 29 - ...google-shopping-merchant-reviews-v1beta.rb | 21 - .../shopping/merchant/reviews/v1beta.rb | 48 - .../v1beta/merchant_reviews_service.rb | 57 - .../v1beta/merchant_reviews_service/client.rb | 788 ----- .../merchant_reviews_service/credentials.rb | 49 - .../v1beta/merchant_reviews_service/paths.rb | 66 - .../v1beta/merchant_reviews_service/rest.rb | 54 - .../merchant_reviews_service/rest/client.rb | 717 ----- .../rest/service_stub.rb | 328 -- .../v1beta/merchantreviews_common_pb.rb | 32 - .../reviews/v1beta/merchantreviews_pb.rb | 36 - .../v1beta/merchantreviews_services_pb.rb | 54 - .../reviews/v1beta/product_reviews_service.rb | 57 - .../v1beta/product_reviews_service/client.rb | 783 ----- .../product_reviews_service/credentials.rb | 49 - .../v1beta/product_reviews_service/paths.rb | 66 - .../v1beta/product_reviews_service/rest.rb | 54 - .../product_reviews_service/rest/client.rb | 712 ----- .../rest/service_stub.rb | 328 -- .../v1beta/productreviews_common_pb.rb | 34 - .../reviews/v1beta/productreviews_pb.rb | 36 - .../v1beta/productreviews_services_pb.rb | 53 - .../shopping/merchant/reviews/v1beta/rest.rb | 40 - .../merchant/reviews/v1beta/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 ---- .../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 | 128 - .../reviews/v1beta/merchantreviews.rb | 142 - .../reviews/v1beta/merchantreviews_common.rb | 187 -- .../merchant/reviews/v1beta/productreviews.rb | 129 - .../reviews/v1beta/productreviews_common.rb | 273 -- .../proto_docs/google/shopping/type/types.rb | 248 -- .../snippets/Gemfile | 32 - .../delete_merchant_review.rb | 47 - .../get_merchant_review.rb | 47 - .../insert_merchant_review.rb | 47 - .../list_merchant_reviews.rb | 51 - .../delete_product_review.rb | 47 - .../get_product_review.rb | 47 - .../insert_product_review.rb | 47 - .../list_product_reviews.rb | 51 - ...ogle.shopping.merchant.reviews.v1beta.json | 335 -- .../merchant_reviews_service_paths_test.rb | 67 - .../merchant_reviews_service_rest_test.rb | 319 -- .../v1beta/merchant_reviews_service_test.rb | 349 --- .../product_reviews_service_paths_test.rb | 67 - .../product_reviews_service_rest_test.rb | 319 -- .../v1beta/product_reviews_service_test.rb | 349 --- .../test/helper.rb | 35 - owl-bot-staging/grafeas-v1/.gitignore | 20 - .../grafeas-v1/.repo-metadata.json | 16 - owl-bot-staging/grafeas-v1/.rubocop.yml | 33 - owl-bot-staging/grafeas-v1/.toys.rb | 28 - owl-bot-staging/grafeas-v1/.yardopts | 11 - owl-bot-staging/grafeas-v1/CHANGELOG.md | 2 - owl-bot-staging/grafeas-v1/Gemfile | 15 - owl-bot-staging/grafeas-v1/LICENSE.md | 201 -- owl-bot-staging/grafeas-v1/README.md | 142 - owl-bot-staging/grafeas-v1/Rakefile | 143 - .../grafeas-v1/gapic_metadata.json | 88 - owl-bot-staging/grafeas-v1/grafeas-v1.gemspec | 28 - owl-bot-staging/grafeas-v1/lib/grafeas-v1.rb | 21 - owl-bot-staging/grafeas-v1/lib/grafeas/v1.rb | 36 - .../lib/grafeas/v1/attestation_pb.rb | 22 - .../grafeas-v1/lib/grafeas/v1/build_pb.rb | 22 - .../grafeas-v1/lib/grafeas/v1/common_pb.rb | 26 - .../lib/grafeas/v1/compliance_pb.rb | 23 - .../grafeas-v1/lib/grafeas/v1/cvss_pb.rb | 34 - .../lib/grafeas/v1/deployment_pb.rb | 21 - .../grafeas-v1/lib/grafeas/v1/discovery_pb.rb | 31 - .../lib/grafeas/v1/dsse_attestation_pb.rb | 22 - .../grafeas-v1/lib/grafeas/v1/grafeas.rb | 57 - .../lib/grafeas/v1/grafeas/client.rb | 1810 ----------- .../lib/grafeas/v1/grafeas/paths.rb | 77 - .../grafeas-v1/lib/grafeas/v1/grafeas_pb.rb | 59 - .../lib/grafeas/v1/grafeas_services_pb.rb | 85 - .../grafeas-v1/lib/grafeas/v1/image_pb.rb | 20 - .../lib/grafeas/v1/intoto_provenance_pb.rb | 24 - .../lib/grafeas/v1/intoto_statement_pb.rb | 31 - .../grafeas-v1/lib/grafeas/v1/package_pb.rb | 26 - .../lib/grafeas/v1/provenance_pb.rb | 32 - .../grafeas-v1/lib/grafeas/v1/risk_pb.rb | 19 - .../grafeas-v1/lib/grafeas/v1/sbom_pb.rb | 23 - .../grafeas-v1/lib/grafeas/v1/secret_pb.rb | 27 - .../grafeas-v1/lib/grafeas/v1/severity_pb.rb | 17 - .../lib/grafeas/v1/slsa_provenance_pb.rb | 25 - .../grafeas/v1/slsa_provenance_zero_two_pb.rb | 26 - .../grafeas-v1/lib/grafeas/v1/upgrade_pb.rb | 25 - .../grafeas-v1/lib/grafeas/v1/version.rb | 24 - .../grafeas-v1/lib/grafeas/v1/vex_pb.rb | 27 - .../lib/grafeas/v1/vulnerability_pb.rb | 32 - .../grafeas-v1/proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 ---- .../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/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/grafeas/v1/attestation.rb | 98 - .../grafeas-v1/proto_docs/grafeas/v1/build.rb | 70 - .../proto_docs/grafeas/v1/common.rb | 243 -- .../proto_docs/grafeas/v1/compliance.rb | 107 - .../grafeas-v1/proto_docs/grafeas/v1/cvss.rb | 337 -- .../proto_docs/grafeas/v1/deployment.rb | 74 - .../proto_docs/grafeas/v1/discovery.rb | 195 -- .../proto_docs/grafeas/v1/dsse_attestation.rb | 59 - .../proto_docs/grafeas/v1/grafeas.rb | 510 --- .../grafeas-v1/proto_docs/grafeas/v1/image.rb | 95 - .../grafeas/v1/intoto_provenance.rb | 134 - .../proto_docs/grafeas/v1/intoto_statement.rb | 189 -- .../proto_docs/grafeas/v1/package.rb | 203 -- .../proto_docs/grafeas/v1/provenance.rb | 336 -- .../grafeas-v1/proto_docs/grafeas/v1/risk.rb | 57 - .../grafeas-v1/proto_docs/grafeas/v1/sbom.rb | 105 - .../proto_docs/grafeas/v1/secret.rb | 165 - .../proto_docs/grafeas/v1/severity.rb | 43 - .../proto_docs/grafeas/v1/slsa_provenance.rb | 152 - .../grafeas/v1/slsa_provenance_zero_two.rb | 131 - .../proto_docs/grafeas/v1/upgrade.rb | 148 - .../grafeas-v1/proto_docs/grafeas/v1/vex.rb | 237 -- .../proto_docs/grafeas/v1/vulnerability.rb | 323 -- owl-bot-staging/grafeas-v1/snippets/Gemfile | 32 - .../snippets/grafeas/batch_create_notes.rb | 47 - .../grafeas/batch_create_occurrences.rb | 47 - .../snippets/grafeas/create_note.rb | 47 - .../snippets/grafeas/create_occurrence.rb | 47 - .../snippets/grafeas/delete_note.rb | 47 - .../snippets/grafeas/delete_occurrence.rb | 47 - .../grafeas-v1/snippets/grafeas/get_note.rb | 47 - .../snippets/grafeas/get_occurrence.rb | 47 - .../snippets/grafeas/get_occurrence_note.rb | 47 - .../snippets/grafeas/list_note_occurrences.rb | 51 - .../grafeas-v1/snippets/grafeas/list_notes.rb | 51 - .../snippets/grafeas/list_occurrences.rb | 51 - .../snippets/grafeas/update_note.rb | 47 - .../snippets/grafeas/update_occurrence.rb | 47 - .../snippets/snippet_metadata_grafeas.v1.json | 575 ---- .../test/grafeas/v1/grafeas_paths_test.rb | 79 - .../test/grafeas/v1/grafeas_test.rb | 971 ------ owl-bot-staging/grafeas-v1/test/helper.rb | 35 - 1567 files changed, 770 insertions(+), 128346 deletions(-) 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-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-products-v1/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/google-shopping-merchant-products-v1.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google-shopping-merchant-products-v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/productinputs_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/productinputs_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_common_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/productinputs.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products_common.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/type/interval.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/delete_product_input.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/insert_product_input.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/update_product_input.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/snippets/products_service/get_product.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/snippets/products_service/list_products.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/snippets/snippet_metadata_google.shopping.merchant.products.v1.json delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/google-shopping-merchant-products-v1beta.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google-shopping-merchant-products-v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_common_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/productinputs.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products_common.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/type/interval.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/delete_product_input.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/insert_product_input.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/update_product_input.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/products_service/get_product.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/products_service/list_products.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/snippet_metadata_google.shopping.merchant.products.v1beta.json delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-products-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/google-shopping-merchant-promotions-v1.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google-shopping-merchant-promotions-v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_common_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions_common.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/type/interval.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/get_promotion.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/insert_promotion.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/list_promotions.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/snippet_metadata_google.shopping.merchant.promotions.v1.json delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/google-shopping-merchant-promotions-v1beta.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google-shopping-merchant-promotions-v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_common_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions_common.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/type/interval.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/get_promotion.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/insert_promotion.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/list_promotions.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/snippet_metadata_google.shopping.merchant.promotions.v1beta.json delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/google-shopping-merchant-reports-v1.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google-shopping-merchant-reports-v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/shopping/merchant/reports/v1/reports.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/type/date.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/snippets/report_service/search.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/snippets/snippet_metadata_google.shopping.merchant.reports.v1.json delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/google-shopping-merchant-reports-v1beta.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google-shopping-merchant-reports-v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/merchant/reports/v1beta/reports.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/type/date.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/report_service/search.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/snippet_metadata_google.shopping.merchant.reports.v1beta.json delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reports-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/google-shopping-merchant-reviews-v1beta.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google-shopping-merchant-reviews-v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_common_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_common_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews_common.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews_common.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/delete_merchant_review.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/get_merchant_review.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/insert_merchant_review.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/list_merchant_reviews.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/delete_product_review.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/get_product_review.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/insert_product_review.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/list_product_reviews.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/snippet_metadata_google.shopping.merchant.reviews.v1beta.json delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/grafeas-v1/.gitignore delete mode 100644 owl-bot-staging/grafeas-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/grafeas-v1/.rubocop.yml delete mode 100644 owl-bot-staging/grafeas-v1/.toys.rb delete mode 100644 owl-bot-staging/grafeas-v1/.yardopts delete mode 100644 owl-bot-staging/grafeas-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/grafeas-v1/Gemfile delete mode 100644 owl-bot-staging/grafeas-v1/LICENSE.md delete mode 100644 owl-bot-staging/grafeas-v1/README.md delete mode 100644 owl-bot-staging/grafeas-v1/Rakefile delete mode 100644 owl-bot-staging/grafeas-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/grafeas-v1/grafeas-v1.gemspec delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas-v1.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/attestation_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/build_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/common_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/compliance_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/cvss_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/deployment_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/discovery_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/dsse_attestation_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas/client.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas/paths.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas_services_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/image_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/intoto_provenance_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/intoto_statement_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/package_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/provenance_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/risk_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/sbom_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/secret_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/severity_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/slsa_provenance_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/slsa_provenance_zero_two_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/upgrade_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/version.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/vex_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/lib/grafeas/v1/vulnerability_pb.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/attestation.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/build.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/common.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/compliance.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/cvss.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/deployment.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/discovery.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/dsse_attestation.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/grafeas.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/image.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/intoto_provenance.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/intoto_statement.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/package.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/provenance.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/risk.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/sbom.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/secret.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/severity.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance_zero_two.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/upgrade.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/vex.rb delete mode 100644 owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/vulnerability.rb delete mode 100644 owl-bot-staging/grafeas-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/batch_create_notes.rb delete mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/batch_create_occurrences.rb delete mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/create_note.rb delete mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/create_occurrence.rb delete mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/delete_note.rb delete mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/delete_occurrence.rb delete mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/get_note.rb delete mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/get_occurrence.rb delete mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/get_occurrence_note.rb delete mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/list_note_occurrences.rb delete mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/list_notes.rb delete mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/list_occurrences.rb delete mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/update_note.rb delete mode 100644 owl-bot-staging/grafeas-v1/snippets/grafeas/update_occurrence.rb delete mode 100644 owl-bot-staging/grafeas-v1/snippets/snippet_metadata_grafeas.v1.json delete mode 100644 owl-bot-staging/grafeas-v1/test/grafeas/v1/grafeas_paths_test.rb delete mode 100644 owl-bot-staging/grafeas-v1/test/grafeas/v1/grafeas_test.rb delete mode 100644 owl-bot-staging/grafeas-v1/test/helper.rb diff --git a/google-shopping-merchant-data_sources-v1/.owlbot-manifest.json b/google-shopping-merchant-data_sources-v1/.owlbot-manifest.json index e124553fa6f6..ee2792a6daea 100644 --- a/google-shopping-merchant-data_sources-v1/.owlbot-manifest.json +++ b/google-shopping-merchant-data_sources-v1/.owlbot-manifest.json @@ -71,6 +71,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-merchant-data_sources-v1/.toys.rb b/google-shopping-merchant-data_sources-v1/.toys.rb index 9a210f1427c7..177e22456e8a 100644 --- a/google-shopping-merchant-data_sources-v1/.toys.rb +++ b/google-shopping-merchant-data_sources-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/Rakefile b/google-shopping-merchant-data_sources-v1/Rakefile index 2054378aebd3..b605e6ea9d30 100644 --- a/google-shopping-merchant-data_sources-v1/Rakefile +++ b/google-shopping-merchant-data_sources-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/lib/google-shopping-merchant-data_sources-v1.rb b/google-shopping-merchant-data_sources-v1/lib/google-shopping-merchant-data_sources-v1.rb index bb2b8e50726b..281c18ad0917 100644 --- a/google-shopping-merchant-data_sources-v1/lib/google-shopping-merchant-data_sources-v1.rb +++ b/google-shopping-merchant-data_sources-v1/lib/google-shopping-merchant-data_sources-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1.rb index 536037724b06..df3f2660862f 100644 --- a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1.rb +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service.rb index a3794aea06b4..0b8d9020a0ad 100644 --- a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service.rb +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/client.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/client.rb index a62e37c5752d..6275c96d4a65 100644 --- a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/client.rb +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/credentials.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/credentials.rb index f7a73203bbce..b9274d26a836 100644 --- a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/credentials.rb +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/paths.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/paths.rb index 7d5ea6704619..4e7d168d0d48 100644 --- a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/paths.rb +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest.rb index bb552bd0c6cf..1ecdae02e5ff 100644 --- a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest.rb +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/client.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/client.rb index 40c1fd9cf4db..c2f4d348be69 100644 --- a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/client.rb +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub.rb index a1002bce095a..e14b0ec46c4b 100644 --- a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub.rb +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service.rb index 481b718733f3..1928827ef5b7 100644 --- a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service.rb +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/client.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/client.rb index e5092c1a927c..3c182bcd3f5c 100644 --- a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/client.rb +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/credentials.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/credentials.rb index 22f673bf926d..8a7915807f54 100644 --- a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/credentials.rb +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/paths.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/paths.rb index 5e18275b519b..0b1160372bb5 100644 --- a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/paths.rb +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest.rb index 8067770cba7e..48ac5574f7f0 100644 --- a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest.rb +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client.rb index bebd151f7ef5..f57f18d6772a 100644 --- a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client.rb +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub.rb index 93ab8608f1a9..28ebd9dab420 100644 --- a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub.rb +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/rest.rb b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/rest.rb index 144a3d3d515f..c2d680dfac34 100644 --- a/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/rest.rb +++ b/google-shopping-merchant-data_sources-v1/lib/google/shopping/merchant/data_sources/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. 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 30c954fb0d5c..3ab0b096d445 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 @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/api/field_behavior.rb index fb9115c630af..582be187d115 100644 --- a/google-shopping-merchant-data_sources-v1/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/api/launch_stage.rb index b836bdb60b21..9392a413fb1b 100644 --- a/google-shopping-merchant-data_sources-v1/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/api/resource.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/api/resource.rb index 71b994c7ef20..25dec4847ac1 100644 --- a/google-shopping-merchant-data_sources-v1/proto_docs/google/api/resource.rb +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/duration.rb index 341efa296c29..ea59f1f91daf 100644 --- a/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/empty.rb index c2acab1235a9..83e4481834a6 100644 --- a/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/empty.rb +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/field_mask.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/field_mask.rb index ad3c3ad25f0f..7f3ffc78601a 100644 --- a/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/timestamp.rb index a005f395ccab..e58202461f88 100644 --- a/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) 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. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!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 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasources.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasources.rb index cec53633157c..dab10c2325dd 100644 --- a/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasources.rb +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasourcetypes.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasourcetypes.rb index e4b0080f4260..f3c8579d065b 100644 --- a/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasourcetypes.rb +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/datasourcetypes.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileinputs.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileinputs.rb index 98fb3995d85a..eda22f604341 100644 --- a/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileinputs.rb +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileinputs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileuploads.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileuploads.rb index 5af7b55a426e..1df1ee25c49a 100644 --- a/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileuploads.rb +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/merchant/datasources/v1/fileuploads.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/type/types.rb index d802772636bf..1a166e0ac98c 100644 --- a/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/type/types.rb +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/shopping/type/types.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/type/dayofweek.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/type/dayofweek.rb index c271eea096ba..973211b9ffe7 100644 --- a/google-shopping-merchant-data_sources-v1/proto_docs/google/type/dayofweek.rb +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/type/dayofweek.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/proto_docs/google/type/timeofday.rb b/google-shopping-merchant-data_sources-v1/proto_docs/google/type/timeofday.rb index 7398716a2aa5..ae79b2f8dceb 100644 --- a/google-shopping-merchant-data_sources-v1/proto_docs/google/type/timeofday.rb +++ b/google-shopping-merchant-data_sources-v1/proto_docs/google/type/timeofday.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/snippets/Gemfile b/google-shopping-merchant-data_sources-v1/snippets/Gemfile index 356df1bad1eb..eb731687c175 100644 --- a/google-shopping-merchant-data_sources-v1/snippets/Gemfile +++ b/google-shopping-merchant-data_sources-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/create_data_source.rb b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/create_data_source.rb index 626fd09c922c..cdd60ea95da4 100644 --- a/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/create_data_source.rb +++ b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/create_data_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/delete_data_source.rb b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/delete_data_source.rb index 933dd99c26df..4fde5b59b589 100644 --- a/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/delete_data_source.rb +++ b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/delete_data_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/fetch_data_source.rb b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/fetch_data_source.rb index 68061b159a5a..f518b7b9fecf 100644 --- a/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/fetch_data_source.rb +++ b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/fetch_data_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/get_data_source.rb b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/get_data_source.rb index 40f633f7a156..af4e36c718df 100644 --- a/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/get_data_source.rb +++ b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/get_data_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/list_data_sources.rb b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/list_data_sources.rb index 8bdd83644a94..c0d1b7947b3c 100644 --- a/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/list_data_sources.rb +++ b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/list_data_sources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/update_data_source.rb b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/update_data_source.rb index 8d80e5756f62..f35600e6bfe2 100644 --- a/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/update_data_source.rb +++ b/google-shopping-merchant-data_sources-v1/snippets/data_sources_service/update_data_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/snippets/file_uploads_service/get_file_upload.rb b/google-shopping-merchant-data_sources-v1/snippets/file_uploads_service/get_file_upload.rb index 29bbec6581cc..d1e5ca1b0acb 100644 --- a/google-shopping-merchant-data_sources-v1/snippets/file_uploads_service/get_file_upload.rb +++ b/google-shopping-merchant-data_sources-v1/snippets/file_uploads_service/get_file_upload.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_paths_test.rb b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_paths_test.rb index ea348a692e78..ab362a729dbe 100644 --- a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_paths_test.rb +++ b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_rest_test.rb b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_rest_test.rb index 5a794461595d..f63413fc66b8 100644 --- a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_rest_test.rb +++ b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb index ff20959733ec..0c5eb387baf5 100644 --- a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb +++ b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/data_sources_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_paths_test.rb b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_paths_test.rb index 91d3bbeb46cd..2168dbc883e7 100644 --- a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_paths_test.rb +++ b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_rest_test.rb b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_rest_test.rb index 50ba194e1936..b56ae4cdf218 100644 --- a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_rest_test.rb +++ b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb index 2925cc279da7..f7942f012f28 100644 --- a/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb +++ b/google-shopping-merchant-data_sources-v1/test/google/shopping/merchant/data_sources/v1/file_uploads_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1/test/helper.rb b/google-shopping-merchant-data_sources-v1/test/helper.rb index 60c50984be58..4fb6756ac7e2 100644 --- a/google-shopping-merchant-data_sources-v1/test/helper.rb +++ b/google-shopping-merchant-data_sources-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/.owlbot-manifest.json b/google-shopping-merchant-data_sources-v1beta/.owlbot-manifest.json index f430388a2ced..3ebd5d0c3219 100644 --- a/google-shopping-merchant-data_sources-v1beta/.owlbot-manifest.json +++ b/google-shopping-merchant-data_sources-v1beta/.owlbot-manifest.json @@ -71,6 +71,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-merchant-data_sources-v1beta/.toys.rb b/google-shopping-merchant-data_sources-v1beta/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-shopping-merchant-data_sources-v1beta/.toys.rb +++ b/google-shopping-merchant-data_sources-v1beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/Rakefile b/google-shopping-merchant-data_sources-v1beta/Rakefile index 81b251c7fdcd..cba1bb4b2fa3 100644 --- a/google-shopping-merchant-data_sources-v1beta/Rakefile +++ b/google-shopping-merchant-data_sources-v1beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/lib/google-shopping-merchant-data_sources-v1beta.rb b/google-shopping-merchant-data_sources-v1beta/lib/google-shopping-merchant-data_sources-v1beta.rb index e44caaee8095..a5a782e5cca9 100644 --- a/google-shopping-merchant-data_sources-v1beta/lib/google-shopping-merchant-data_sources-v1beta.rb +++ b/google-shopping-merchant-data_sources-v1beta/lib/google-shopping-merchant-data_sources-v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta.rb b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta.rb index 0dc88b2d43fa..1a4e6e79724c 100644 --- a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta.rb +++ b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service.rb b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service.rb index dc0aabe9fe1a..f9f3402a3882 100644 --- a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service.rb +++ b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/client.rb b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/client.rb index 365b36250843..cca4a0d03ce0 100644 --- a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/client.rb +++ b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/credentials.rb b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/credentials.rb index 146dc122091b..a3f80b7a6ecf 100644 --- a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/credentials.rb +++ b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/paths.rb b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/paths.rb index 317acb50cfbb..3b874f91b873 100644 --- a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/paths.rb +++ b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest.rb b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest.rb index 8fb50e3c392e..3178cf9ddfc2 100644 --- a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest.rb +++ b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/client.rb b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/client.rb index f81c4d6514b4..dc9007d70c1f 100644 --- a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/client.rb +++ b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/service_stub.rb b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/service_stub.rb index 4878a7351d73..6c4c211a3fc7 100644 --- a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/service_stub.rb +++ b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/data_sources_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service.rb b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service.rb index ca6aa117bdb0..a03d1d0e4565 100644 --- a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service.rb +++ b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/client.rb b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/client.rb index 06269bf13a8d..07e6bed8f7cc 100644 --- a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/client.rb +++ b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/credentials.rb b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/credentials.rb index 49c1a8e975a9..6cc6fed4a3f0 100644 --- a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/credentials.rb +++ b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/paths.rb b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/paths.rb index ebad940e0b7e..dff7d56d950f 100644 --- a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/paths.rb +++ b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest.rb b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest.rb index 5d5897f41825..c79feb1cc2e7 100644 --- a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest.rb +++ b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/client.rb b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/client.rb index cdf416bbc3c7..861986ade8b7 100644 --- a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/client.rb +++ b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/service_stub.rb b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/service_stub.rb index 9a6816177ebc..abad739c7f4e 100644 --- a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/service_stub.rb +++ b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/file_uploads_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/rest.rb b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/rest.rb index 73d6658d1b52..42367eda5bd5 100644 --- a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/rest.rb +++ b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/data_sources/v1beta/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasources_services_pb.rb b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasources_services_pb.rb index 718e43bf98b5..be87934ee446 100644 --- a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasources_services_pb.rb +++ b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/datasources_services_pb.rb @@ -1,7 +1,7 @@ # 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 2024 Google LLC +# 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. diff --git a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/fileuploads_services_pb.rb b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/fileuploads_services_pb.rb index 10acdf2550d9..9763cc7a9481 100644 --- a/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/fileuploads_services_pb.rb +++ b/google-shopping-merchant-data_sources-v1beta/lib/google/shopping/merchant/datasources/v1beta/fileuploads_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/datasources/v1beta/fileuploads.proto for package 'Google.Shopping.Merchant.DataSources.V1beta' # Original file comments: -# Copyright 2024 Google LLC +# 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. 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 c58739e32368..3ab0b096d445 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 @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/resource.rb b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/resource.rb +++ b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/empty.rb +++ b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/field_mask.rb b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/field_mask.rb index 8e7abcf8f052..7f3ffc78601a 100644 --- a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/field_mask.rb +++ b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) 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. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!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 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasources.rb b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasources.rb index bd2fc693fb9d..b08737c6e77f 100644 --- a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasources.rb +++ b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasourcetypes.rb b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasourcetypes.rb index 0ac48274972e..31429a27303e 100644 --- a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasourcetypes.rb +++ b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/datasourcetypes.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileinputs.rb b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileinputs.rb index a768f787c5cb..ed24e5e223d3 100644 --- a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileinputs.rb +++ b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileinputs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileuploads.rb b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileuploads.rb index 616d2b3c718c..c1ab990d6ff0 100644 --- a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileuploads.rb +++ b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/merchant/datasources/v1beta/fileuploads.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/type/types.rb index d802772636bf..1a166e0ac98c 100644 --- a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/type/types.rb +++ b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/shopping/type/types.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/dayofweek.rb b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/dayofweek.rb index 4fd080d9b331..973211b9ffe7 100644 --- a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/dayofweek.rb +++ b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/dayofweek.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/timeofday.rb b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/timeofday.rb index cb08ea9cd37f..ae79b2f8dceb 100644 --- a/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/timeofday.rb +++ b/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/timeofday.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/snippets/Gemfile b/google-shopping-merchant-data_sources-v1beta/snippets/Gemfile index b0b3c322b1ea..67b7de6a85fe 100644 --- a/google-shopping-merchant-data_sources-v1beta/snippets/Gemfile +++ b/google-shopping-merchant-data_sources-v1beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/create_data_source.rb b/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/create_data_source.rb index 28e343a00071..638728137703 100644 --- a/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/create_data_source.rb +++ b/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/create_data_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/delete_data_source.rb b/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/delete_data_source.rb index b479753e6e38..21641e2c7c19 100644 --- a/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/delete_data_source.rb +++ b/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/delete_data_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/fetch_data_source.rb b/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/fetch_data_source.rb index 17b5fcdcaeb7..5dca028ea8b3 100644 --- a/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/fetch_data_source.rb +++ b/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/fetch_data_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/get_data_source.rb b/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/get_data_source.rb index dfc92b12428d..0ce0193472fb 100644 --- a/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/get_data_source.rb +++ b/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/get_data_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/list_data_sources.rb b/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/list_data_sources.rb index 2b271d4d019f..ceaddc02229a 100644 --- a/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/list_data_sources.rb +++ b/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/list_data_sources.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/update_data_source.rb b/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/update_data_source.rb index 2a64358df56d..f98d619b67a0 100644 --- a/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/update_data_source.rb +++ b/google-shopping-merchant-data_sources-v1beta/snippets/data_sources_service/update_data_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/snippets/file_uploads_service/get_file_upload.rb b/google-shopping-merchant-data_sources-v1beta/snippets/file_uploads_service/get_file_upload.rb index b7f0e7d2da36..f56c3463591d 100644 --- a/google-shopping-merchant-data_sources-v1beta/snippets/file_uploads_service/get_file_upload.rb +++ b/google-shopping-merchant-data_sources-v1beta/snippets/file_uploads_service/get_file_upload.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_paths_test.rb b/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_paths_test.rb index 0f0b95b38be0..310fb0512324 100644 --- a/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_paths_test.rb +++ b/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_rest_test.rb b/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_rest_test.rb index bfa32ff9f1fa..a4bb34d4d813 100644 --- a/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_rest_test.rb +++ b/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_test.rb b/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_test.rb index 2864ab85b47e..ba292b33871d 100644 --- a/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_test.rb +++ b/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/data_sources_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_paths_test.rb b/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_paths_test.rb index 2b861d762348..f6cbfaf0fd2e 100644 --- a/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_paths_test.rb +++ b/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_rest_test.rb b/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_rest_test.rb index 8d081ddf5869..5273b1043174 100644 --- a/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_rest_test.rb +++ b/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_test.rb b/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_test.rb index b8f9b93c8185..e3eefb76a42c 100644 --- a/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_test.rb +++ b/google-shopping-merchant-data_sources-v1beta/test/google/shopping/merchant/data_sources/v1beta/file_uploads_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-data_sources-v1beta/test/helper.rb b/google-shopping-merchant-data_sources-v1beta/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-shopping-merchant-data_sources-v1beta/test/helper.rb +++ b/google-shopping-merchant-data_sources-v1beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/.owlbot-manifest.json b/google-shopping-merchant-inventories-v1/.owlbot-manifest.json index dbbe073cc24a..c7b3b5d97d0c 100644 --- a/google-shopping-merchant-inventories-v1/.owlbot-manifest.json +++ b/google-shopping-merchant-inventories-v1/.owlbot-manifest.json @@ -66,6 +66,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-merchant-inventories-v1/.toys.rb b/google-shopping-merchant-inventories-v1/.toys.rb index 9a210f1427c7..177e22456e8a 100644 --- a/google-shopping-merchant-inventories-v1/.toys.rb +++ b/google-shopping-merchant-inventories-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/Rakefile b/google-shopping-merchant-inventories-v1/Rakefile index 80e8ac9c684b..77497d596c9a 100644 --- a/google-shopping-merchant-inventories-v1/Rakefile +++ b/google-shopping-merchant-inventories-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/lib/google-shopping-merchant-inventories-v1.rb b/google-shopping-merchant-inventories-v1/lib/google-shopping-merchant-inventories-v1.rb index 033648f18f92..db313242d13f 100644 --- a/google-shopping-merchant-inventories-v1/lib/google-shopping-merchant-inventories-v1.rb +++ b/google-shopping-merchant-inventories-v1/lib/google-shopping-merchant-inventories-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1.rb index a8f350cfc54d..a5800c6000d3 100644 --- a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1.rb +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service.rb index 90376d2396ab..9da3c96daede 100644 --- a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service.rb +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/client.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/client.rb index 074b850f04ff..2645c7e4e8dd 100644 --- a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/client.rb +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/credentials.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/credentials.rb index fb528b14376f..c59df21e5b7f 100644 --- a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/credentials.rb +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.rb index 8f4a93ff3006..a321f9b2e7ad 100644 --- a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.rb +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest.rb index c176d043ad62..a6136640df65 100644 --- a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest.rb +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/client.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/client.rb index 2a68359c1677..e2aeba79f62e 100644 --- a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/client.rb +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub.rb index c36c4e33e726..f8eef4b1834e 100644 --- a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub.rb +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/localinventory_services_pb.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/localinventory_services_pb.rb index ed81f2e1a097..6d732fad12e0 100644 --- a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/localinventory_services_pb.rb +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/localinventory_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/inventories/v1/localinventory.proto for package 'Google.Shopping.Merchant.Inventories.V1' # Original file comments: -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service.rb index 0ac2d6c98bc7..bc2b1f078382 100644 --- a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service.rb +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/client.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/client.rb index f28eed035f51..179bc1298790 100644 --- a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/client.rb +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/credentials.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/credentials.rb index 49c2bba07f61..78c7f08de02e 100644 --- a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/credentials.rb +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/paths.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/paths.rb index 0fd793501e88..0c526721b67d 100644 --- a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/paths.rb +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest.rb index 6f43e460f2bc..d9bce6c3c4e3 100644 --- a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest.rb +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client.rb index 4eadf80f0a37..28aac8e58f05 100644 --- a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client.rb +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub.rb index 9b5166e0e48a..aee6dfec776f 100644 --- a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub.rb +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regional_inventory_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_services_pb.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_services_pb.rb index 603f08e381ba..a34fa6d2d41d 100644 --- a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_services_pb.rb +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/regionalinventory_services_pb.rb @@ -1,7 +1,7 @@ # 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 +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/rest.rb b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/rest.rb index 24f1d2ad1618..46780b0be3b6 100644 --- a/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/rest.rb +++ b/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. 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 30c954fb0d5c..3ab0b096d445 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 @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/api/field_behavior.rb index fb9115c630af..582be187d115 100644 --- a/google-shopping-merchant-inventories-v1/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/api/launch_stage.rb index b836bdb60b21..9392a413fb1b 100644 --- a/google-shopping-merchant-inventories-v1/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/proto_docs/google/api/resource.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/api/resource.rb index 71b994c7ef20..25dec4847ac1 100644 --- a/google-shopping-merchant-inventories-v1/proto_docs/google/api/resource.rb +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/duration.rb index 341efa296c29..ea59f1f91daf 100644 --- a/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/empty.rb index c2acab1235a9..83e4481834a6 100644 --- a/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/empty.rb +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/timestamp.rb index a005f395ccab..e58202461f88 100644 --- a/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) 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. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!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 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/inventories_common.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/inventories_common.rb index ef190c1d2f54..343776d38b25 100644 --- a/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/inventories_common.rb +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/inventories_common.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/localinventory.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/localinventory.rb index b3dec441d349..599f2ebc4939 100644 --- a/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/localinventory.rb +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/localinventory.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/regionalinventory.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/regionalinventory.rb index e4ecc42dfbeb..f81670c3624d 100644 --- a/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/regionalinventory.rb +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/regionalinventory.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/type/types.rb index d802772636bf..1a166e0ac98c 100644 --- a/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/type/types.rb +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/type/types.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/proto_docs/google/type/interval.rb b/google-shopping-merchant-inventories-v1/proto_docs/google/type/interval.rb index 1de1b841fd30..9350ca479005 100644 --- a/google-shopping-merchant-inventories-v1/proto_docs/google/type/interval.rb +++ b/google-shopping-merchant-inventories-v1/proto_docs/google/type/interval.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/snippets/Gemfile b/google-shopping-merchant-inventories-v1/snippets/Gemfile index b871dbd53b5b..f6752c07deb1 100644 --- a/google-shopping-merchant-inventories-v1/snippets/Gemfile +++ b/google-shopping-merchant-inventories-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/delete_local_inventory.rb b/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/delete_local_inventory.rb index 16a8a4ff0627..878f43c4da28 100644 --- a/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/delete_local_inventory.rb +++ b/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/delete_local_inventory.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/insert_local_inventory.rb b/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/insert_local_inventory.rb index 368823b350fb..0a741637b8cf 100644 --- a/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/insert_local_inventory.rb +++ b/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/insert_local_inventory.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/list_local_inventories.rb b/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/list_local_inventories.rb index 535cd2a12e12..fc17d965d45d 100644 --- a/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/list_local_inventories.rb +++ b/google-shopping-merchant-inventories-v1/snippets/local_inventory_service/list_local_inventories.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/delete_regional_inventory.rb b/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/delete_regional_inventory.rb index 47dba380df28..e985025813a1 100644 --- a/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/delete_regional_inventory.rb +++ b/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/delete_regional_inventory.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/insert_regional_inventory.rb b/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/insert_regional_inventory.rb index af22e485da89..7f1d60cb06a7 100644 --- a/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/insert_regional_inventory.rb +++ b/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/insert_regional_inventory.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/list_regional_inventories.rb b/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/list_regional_inventories.rb index edfc4375fad5..2837c821cbf9 100644 --- a/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/list_regional_inventories.rb +++ b/google-shopping-merchant-inventories-v1/snippets/regional_inventory_service/list_regional_inventories.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_paths_test.rb b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_paths_test.rb index a3419bb06f1b..b6f1437a06ed 100644 --- a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_paths_test.rb +++ b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_rest_test.rb b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_rest_test.rb index dcc951635ed1..cc3d665700a7 100644 --- a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_rest_test.rb +++ b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb index 92d230a751a7..2a97b2e734f2 100644 --- a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb +++ b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/local_inventory_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_paths_test.rb b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_paths_test.rb index 4e0838879fef..460a426e97e6 100644 --- a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_paths_test.rb +++ b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_rest_test.rb b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_rest_test.rb index b33b49be2755..956e9efb879b 100644 --- a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_rest_test.rb +++ b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb index a51746c3fd23..5ab3fae5d3ec 100644 --- a/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb +++ b/google-shopping-merchant-inventories-v1/test/google/shopping/merchant/inventories/v1/regional_inventory_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1/test/helper.rb b/google-shopping-merchant-inventories-v1/test/helper.rb index 60c50984be58..4fb6756ac7e2 100644 --- a/google-shopping-merchant-inventories-v1/test/helper.rb +++ b/google-shopping-merchant-inventories-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/.owlbot-manifest.json b/google-shopping-merchant-inventories-v1beta/.owlbot-manifest.json index af926feafe09..a56b04ba43b5 100644 --- a/google-shopping-merchant-inventories-v1beta/.owlbot-manifest.json +++ b/google-shopping-merchant-inventories-v1beta/.owlbot-manifest.json @@ -64,6 +64,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-merchant-inventories-v1beta/.toys.rb b/google-shopping-merchant-inventories-v1beta/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-shopping-merchant-inventories-v1beta/.toys.rb +++ b/google-shopping-merchant-inventories-v1beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/Rakefile b/google-shopping-merchant-inventories-v1beta/Rakefile index 02740f60a164..ff2d3cc4b129 100644 --- a/google-shopping-merchant-inventories-v1beta/Rakefile +++ b/google-shopping-merchant-inventories-v1beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/lib/google-shopping-merchant-inventories-v1beta.rb b/google-shopping-merchant-inventories-v1beta/lib/google-shopping-merchant-inventories-v1beta.rb index 8172201bf8cc..a4315e427d7b 100644 --- a/google-shopping-merchant-inventories-v1beta/lib/google-shopping-merchant-inventories-v1beta.rb +++ b/google-shopping-merchant-inventories-v1beta/lib/google-shopping-merchant-inventories-v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta.rb b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta.rb index f8052be62bb2..acf7855533df 100644 --- a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta.rb +++ b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb index d7a0be412b62..c7d1c0af2e04 100644 --- a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb +++ b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb index 5aed7a14cb46..2cb3128b8259 100644 --- a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb +++ b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials.rb b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials.rb index 762d4511ccf6..1f667b3a267c 100644 --- a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials.rb +++ b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.rb b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.rb index c11ae854ad4f..23b3173b789e 100644 --- a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.rb +++ b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest.rb b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest.rb index efc7f46d5ae0..c6f5cb4cb26f 100644 --- a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest.rb +++ b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb index b79d4d606ad6..6105a3089fc5 100644 --- a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb +++ b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb index a9e1e95157fa..3f797cae4f4b 100644 --- a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb +++ b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb index 951376689433..03e3fbf6b7eb 100644 --- a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb +++ b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/localinventory_services_pb.rb @@ -1,7 +1,7 @@ # 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 2023 Google LLC +# 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. diff --git a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service.rb b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service.rb index 20cb580d329c..60e52ac9c336 100644 --- a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service.rb +++ b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb index ff08a4b8b957..8af0976307d7 100644 --- a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb +++ b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials.rb b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials.rb index 7685f659cece..6b325f84dd88 100644 --- a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials.rb +++ b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.rb b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.rb index c7d486613651..7bf0b753a5f1 100644 --- a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.rb +++ b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest.rb b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest.rb index f662409c0e58..d5a20afca8a0 100644 --- a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest.rb +++ b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb index 9e3d6df85e59..9c96e6a4e3fb 100644 --- a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb +++ b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb index 97e3c543b781..937cc49a5f70 100644 --- a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb +++ b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb index ad7dffec10fc..5dc2aa0b399f 100644 --- a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb +++ b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regionalinventory_services_pb.rb @@ -1,7 +1,7 @@ # 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 2023 Google LLC +# 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. diff --git a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/rest.rb b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/rest.rb index b3f439d6095d..20bc16586f0d 100644 --- a/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/rest.rb +++ b/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. 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 f20af9485bd9..3ab0b096d445 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 @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/field_behavior.rb index 843c8e9deea2..582be187d115 100644 --- a/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/launch_stage.rb index 173c5c85f5dc..9392a413fb1b 100644 --- a/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/resource.rb b/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/resource.rb index aa7e4be53201..25dec4847ac1 100644 --- a/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/resource.rb +++ b/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/duration.rb index b4a53d0ac67f..ea59f1f91daf 100644 --- a/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/empty.rb index 4c0ad96e8eb9..83e4481834a6 100644 --- a/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/empty.rb +++ b/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/timestamp.rb index b7de80e5ed7f..e58202461f88 100644 --- a/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) 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. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!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 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.rb b/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.rb index 133333dba4a7..3b0e147672b0 100644 --- a/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.rb +++ b/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/localinventory.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb b/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb index 94445d22a19e..2805f45ead59 100644 --- a/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb +++ b/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/merchant/inventories/v1beta/regionalinventory.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/type/types.rb index c27d18e7be7a..1a166e0ac98c 100644 --- a/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/type/types.rb +++ b/google-shopping-merchant-inventories-v1beta/proto_docs/google/shopping/type/types.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/proto_docs/google/type/interval.rb b/google-shopping-merchant-inventories-v1beta/proto_docs/google/type/interval.rb index 0f9cd69920cf..9350ca479005 100644 --- a/google-shopping-merchant-inventories-v1beta/proto_docs/google/type/interval.rb +++ b/google-shopping-merchant-inventories-v1beta/proto_docs/google/type/interval.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/snippets/Gemfile b/google-shopping-merchant-inventories-v1beta/snippets/Gemfile index 632bb97c3946..9ce4a0148204 100644 --- a/google-shopping-merchant-inventories-v1beta/snippets/Gemfile +++ b/google-shopping-merchant-inventories-v1beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/delete_local_inventory.rb b/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/delete_local_inventory.rb index be17c49eb87b..e7b122806611 100644 --- a/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/delete_local_inventory.rb +++ b/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/delete_local_inventory.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/insert_local_inventory.rb b/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/insert_local_inventory.rb index 7776e1d7fbb8..3a5429e00076 100644 --- a/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/insert_local_inventory.rb +++ b/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/insert_local_inventory.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/list_local_inventories.rb b/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/list_local_inventories.rb index 31a24c20380a..9601f90a357d 100644 --- a/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/list_local_inventories.rb +++ b/google-shopping-merchant-inventories-v1beta/snippets/local_inventory_service/list_local_inventories.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/delete_regional_inventory.rb b/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/delete_regional_inventory.rb index 64fc39beb9eb..32b256d4226d 100644 --- a/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/delete_regional_inventory.rb +++ b/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/delete_regional_inventory.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/insert_regional_inventory.rb b/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/insert_regional_inventory.rb index a848c8fd7b78..4b16a1a36f11 100644 --- a/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/insert_regional_inventory.rb +++ b/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/insert_regional_inventory.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/list_regional_inventories.rb b/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/list_regional_inventories.rb index 8f8d88e1e246..3dee934a1f78 100644 --- a/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/list_regional_inventories.rb +++ b/google-shopping-merchant-inventories-v1beta/snippets/regional_inventory_service/list_regional_inventories.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_paths_test.rb b/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_paths_test.rb index 3bf1800dfe31..3f4c12db7010 100644 --- a/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_paths_test.rb +++ b/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_rest_test.rb b/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_rest_test.rb index 4c3dcbe286b9..fc75a2ff3e0a 100644 --- a/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_rest_test.rb +++ b/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb b/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb index 940f9e7c68a9..b3f2fee3ed76 100644 --- a/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb +++ b/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/local_inventory_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_paths_test.rb b/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_paths_test.rb index 92be44dde00b..61b5b82c9f55 100644 --- a/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_paths_test.rb +++ b/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_rest_test.rb b/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_rest_test.rb index 34cc417d974e..edc58c92909e 100644 --- a/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_rest_test.rb +++ b/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb b/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb index 2a9a1d7c9179..0551785ca15f 100644 --- a/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb +++ b/google-shopping-merchant-inventories-v1beta/test/google/shopping/merchant/inventories/v1beta/regional_inventory_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-inventories-v1beta/test/helper.rb b/google-shopping-merchant-inventories-v1beta/test/helper.rb index 7e4ec6975a18..4fb6756ac7e2 100644 --- a/google-shopping-merchant-inventories-v1beta/test/helper.rb +++ b/google-shopping-merchant-inventories-v1beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/.owlbot-manifest.json b/google-shopping-merchant-lfp-v1/.owlbot-manifest.json index a6100eee0a59..121ede4899ec 100644 --- a/google-shopping-merchant-lfp-v1/.owlbot-manifest.json +++ b/google-shopping-merchant-lfp-v1/.owlbot-manifest.json @@ -91,6 +91,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-merchant-lfp-v1/.toys.rb b/google-shopping-merchant-lfp-v1/.toys.rb index 9a210f1427c7..177e22456e8a 100644 --- a/google-shopping-merchant-lfp-v1/.toys.rb +++ b/google-shopping-merchant-lfp-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/Rakefile b/google-shopping-merchant-lfp-v1/Rakefile index f7ea29e49466..728de334377e 100644 --- a/google-shopping-merchant-lfp-v1/Rakefile +++ b/google-shopping-merchant-lfp-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google-shopping-merchant-lfp-v1.rb b/google-shopping-merchant-lfp-v1/lib/google-shopping-merchant-lfp-v1.rb index ce781507e10d..50973a650857 100644 --- a/google-shopping-merchant-lfp-v1/lib/google-shopping-merchant-lfp-v1.rb +++ b/google-shopping-merchant-lfp-v1/lib/google-shopping-merchant-lfp-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1.rb index 2eac20fcd376..110574e549d6 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service.rb index 0289abe90c55..fc006da4801b 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/client.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/client.rb index 9b65e3aecd9d..61ff156b018a 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/client.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials.rb index d2446d4ec1f8..49a7ffb7e0db 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/paths.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/paths.rb index 75ce32220995..b96335aebdf0 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/paths.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest.rb index a45e999e7460..0020d2acf6f6 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client.rb index 980681d42f3b..6e9ad4fb85f1 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub.rb index 55353cdffec8..659e524ce08f 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service.rb index 3befd9ad6c6b..d1805e8a2ee9 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client.rb index fb83e2f0d894..eef0c55ca85f 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials.rb index 003e265da7be..135a12914c76 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths.rb index f133a39f809b..c635fc723f12 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest.rb index b2fccd66dcc4..97650d8d3130 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client.rb index 9fd46ec302e6..482e0cbd2328 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub.rb index 8d88a1f89c7a..e5e64946788a 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_merchant_state_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service.rb index 0bd21509ff7b..799df55707ea 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/client.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/client.rb index a8188b505166..a8406a9dec29 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/client.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/credentials.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/credentials.rb index 96c8feed2552..0243ce4673d8 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/credentials.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/paths.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/paths.rb index 5429bb79d139..e561a91d26ac 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/paths.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest.rb index b5fb4867996c..f7a4aac73a76 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client.rb index 735ab0c2e866..71278670c277 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub.rb index 9161529eeb5a..4c4a42259017 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service.rb index 35964a9ea84a..65dc5989d237 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/client.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/client.rb index db45f4929077..1bad7568af34 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/client.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/credentials.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/credentials.rb index 5a71813691b9..50e7f7a7dd9c 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/credentials.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/paths.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/paths.rb index 8dd0bd421b6a..dba6371bbd99 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/paths.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest.rb index 714167cd83ba..c3fc803a7e1b 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/client.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/client.rb index 66df90891ac5..56eb0e4cde57 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/client.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub.rb index 6c90a90f7022..d91e92f8a337 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/rest.rb b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/rest.rb index 5fc66f98a23e..4d4fada1a79a 100644 --- a/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/rest.rb +++ b/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. 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 30c954fb0d5c..3ab0b096d445 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 @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_behavior.rb index fb9115c630af..582be187d115 100644 --- a/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_info.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_info.rb index cea53f02d1a8..0f5acf0a5538 100644 --- a/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_info.rb +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/api/field_info.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/api/launch_stage.rb index b836bdb60b21..9392a413fb1b 100644 --- a/google-shopping-merchant-lfp-v1/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/proto_docs/google/api/resource.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/api/resource.rb index 71b994c7ef20..25dec4847ac1 100644 --- a/google-shopping-merchant-lfp-v1/proto_docs/google/api/resource.rb +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/duration.rb index 341efa296c29..ea59f1f91daf 100644 --- a/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/empty.rb index c2acab1235a9..83e4481834a6 100644 --- a/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/empty.rb +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/timestamp.rb index a005f395ccab..e58202461f88 100644 --- a/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) 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. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!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 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpinventory.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpinventory.rb index 695d341f1847..be67ae3ae6fa 100644 --- a/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpinventory.rb +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpinventory.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpmerchantstate.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpmerchantstate.rb index e2dbacc31d34..6c0f10a465ea 100644 --- a/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpmerchantstate.rb +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpmerchantstate.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpsale.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpsale.rb index d952fef86734..464159590eeb 100644 --- a/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpsale.rb +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpsale.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpstore.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpstore.rb index ffee1a2da848..36f58df7e7ea 100644 --- a/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpstore.rb +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/merchant/lfp/v1/lfpstore.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/type/types.rb index d802772636bf..1a166e0ac98c 100644 --- a/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/type/types.rb +++ b/google-shopping-merchant-lfp-v1/proto_docs/google/shopping/type/types.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/snippets/Gemfile b/google-shopping-merchant-lfp-v1/snippets/Gemfile index 87ff36c75e02..1c952600471e 100644 --- a/google-shopping-merchant-lfp-v1/snippets/Gemfile +++ b/google-shopping-merchant-lfp-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/snippets/lfp_inventory_service/insert_lfp_inventory.rb b/google-shopping-merchant-lfp-v1/snippets/lfp_inventory_service/insert_lfp_inventory.rb index 658592db706b..c320eb8f15fb 100644 --- a/google-shopping-merchant-lfp-v1/snippets/lfp_inventory_service/insert_lfp_inventory.rb +++ b/google-shopping-merchant-lfp-v1/snippets/lfp_inventory_service/insert_lfp_inventory.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb b/google-shopping-merchant-lfp-v1/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb index 3de5185c5a19..a01a95ef97f2 100644 --- a/google-shopping-merchant-lfp-v1/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb +++ b/google-shopping-merchant-lfp-v1/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/snippets/lfp_sale_service/insert_lfp_sale.rb b/google-shopping-merchant-lfp-v1/snippets/lfp_sale_service/insert_lfp_sale.rb index f4898b6aff41..4735d2bea123 100644 --- a/google-shopping-merchant-lfp-v1/snippets/lfp_sale_service/insert_lfp_sale.rb +++ b/google-shopping-merchant-lfp-v1/snippets/lfp_sale_service/insert_lfp_sale.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/delete_lfp_store.rb b/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/delete_lfp_store.rb index ca30cdc09ad4..c8d8b6c98a3f 100644 --- a/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/delete_lfp_store.rb +++ b/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/delete_lfp_store.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/get_lfp_store.rb b/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/get_lfp_store.rb index 56f84cdc0853..3e9192af1e2c 100644 --- a/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/get_lfp_store.rb +++ b/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/get_lfp_store.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/insert_lfp_store.rb b/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/insert_lfp_store.rb index bbea2949bf3e..642f4eec0c49 100644 --- a/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/insert_lfp_store.rb +++ b/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/insert_lfp_store.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/list_lfp_stores.rb b/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/list_lfp_stores.rb index 4152c36158be..66b394a39c17 100644 --- a/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/list_lfp_stores.rb +++ b/google-shopping-merchant-lfp-v1/snippets/lfp_store_service/list_lfp_stores.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_paths_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_paths_test.rb index 1b912d453aef..0dad0d8a3cb9 100644 --- a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_paths_test.rb +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_rest_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_rest_test.rb index b828aa7d3b75..dcdf1cd1b083 100644 --- a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_rest_test.rb +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_test.rb index 62a44f2c2429..5c36ee191dfa 100644 --- a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_test.rb +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_inventory_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_paths_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_paths_test.rb index e628f7466ae1..b1c5286c6508 100644 --- a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_paths_test.rb +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_rest_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_rest_test.rb index 1f5da606cd67..36156e43d1db 100644 --- a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_rest_test.rb +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb index 1516701256ed..9d694596fd33 100644 --- a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_merchant_state_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_paths_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_paths_test.rb index e53832520a19..d336b9777d85 100644 --- a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_paths_test.rb +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_rest_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_rest_test.rb index 6bd96ebe3eb4..da5baa8e268a 100644 --- a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_rest_test.rb +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_test.rb index 321289919f19..2d324c4c2adf 100644 --- a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_test.rb +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_sale_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_paths_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_paths_test.rb index 29bcc6a3169d..c64ac3f0fb5e 100644 --- a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_paths_test.rb +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_rest_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_rest_test.rb index b029ef3118aa..6d6cbea7f0ba 100644 --- a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_rest_test.rb +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb index 66ac35017b7c..fa83999a569e 100644 --- a/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb +++ b/google-shopping-merchant-lfp-v1/test/google/shopping/merchant/lfp/v1/lfp_store_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1/test/helper.rb b/google-shopping-merchant-lfp-v1/test/helper.rb index 60c50984be58..4fb6756ac7e2 100644 --- a/google-shopping-merchant-lfp-v1/test/helper.rb +++ b/google-shopping-merchant-lfp-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/.owlbot-manifest.json b/google-shopping-merchant-lfp-v1beta/.owlbot-manifest.json index 6f452feb0250..ab3823c0b4b0 100644 --- a/google-shopping-merchant-lfp-v1beta/.owlbot-manifest.json +++ b/google-shopping-merchant-lfp-v1beta/.owlbot-manifest.json @@ -91,6 +91,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-merchant-lfp-v1beta/.toys.rb b/google-shopping-merchant-lfp-v1beta/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-shopping-merchant-lfp-v1beta/.toys.rb +++ b/google-shopping-merchant-lfp-v1beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/Rakefile b/google-shopping-merchant-lfp-v1beta/Rakefile index 566fa6b6b9b2..39e4090536e4 100644 --- a/google-shopping-merchant-lfp-v1beta/Rakefile +++ b/google-shopping-merchant-lfp-v1beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google-shopping-merchant-lfp-v1beta.rb b/google-shopping-merchant-lfp-v1beta/lib/google-shopping-merchant-lfp-v1beta.rb index 3f6901699442..a4339e958f48 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google-shopping-merchant-lfp-v1beta.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google-shopping-merchant-lfp-v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta.rb index ba12a0f77437..ba569d5a3db9 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service.rb index dd19348e914c..3f182bf2a7c8 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb index 3c3e8b9c756a..58a25ac8b760 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials.rb index c65dcf4dc629..34357f0b45db 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb index f76ace026e35..993a6aade7c4 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest.rb index 1bfbde4d0c29..8aa6339d4641 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb index 1e26a3a43f1b..695e9d0f9956 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.rb index 2215a51d520e..401e3ca45ed8 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service.rb index 892ca962f594..2eec26b012b3 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/client.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/client.rb index 0bfb1d74b0ed..63d2f1e2263d 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/client.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/credentials.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/credentials.rb index f8007b0b404b..38354370e578 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/credentials.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/paths.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/paths.rb index f59113dc6b4a..fdd1147f0404 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/paths.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest.rb index 374a99b10614..6ed162962590 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/client.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/client.rb index 4286a4e915cf..82c37093cb60 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/client.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/service_stub.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/service_stub.rb index c95009f7e50c..d4ec6c2865b7 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/service_stub.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service.rb index 1d564b85fdc3..ffff639bc32c 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb index 296c93042d5e..a78dda9291c3 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials.rb index 003e33388e6f..579c5651f2f7 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths.rb index 39dab5a49ede..76e2d821e236 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest.rb index a951dd3591ee..adb464ac4009 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb index aa3c331cf863..35f2538fb657 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.rb index 7b08988cc8b0..c1011e2ebc60 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service.rb index 4d063abe878c..e2807eaccfe0 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb index a06177b3f2de..5ada1ecaad0d 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials.rb index 537bef4e2fa4..e11ec1516c68 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/paths.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/paths.rb index eccaaaef2cbc..1d64fb821b2f 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/paths.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest.rb index 53a918964596..672832b066ec 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb index 5221da1915f7..801305157379 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb index 4a2efa0cc2e4..67b36688a24c 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb.rb index 8140d248b8ce..932c329a2f11 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpinventory_services_pb.rb @@ -1,7 +1,7 @@ # 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 2023 Google LLC +# 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. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_services_pb.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_services_pb.rb index b14032abc2ca..c567c9b70176 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_services_pb.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpsale_services_pb.rb @@ -1,7 +1,7 @@ # 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 2023 Google LLC +# 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. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_services_pb.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_services_pb.rb index c292700d21d4..c32b8a0cff48 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_services_pb.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfpstore_services_pb.rb @@ -1,7 +1,7 @@ # 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 2023 Google LLC +# 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. diff --git a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/rest.rb b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/rest.rb index eb3ead94b93d..ccb9d408d652 100644 --- a/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/rest.rb +++ b/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. 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 c58739e32368..3ab0b096d445 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 @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_info.rb b/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_info.rb index d558fed6cef1..0f5acf0a5538 100644 --- a/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_info.rb +++ b/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/field_info.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/resource.rb b/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/resource.rb +++ b/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/empty.rb +++ b/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) 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. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!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 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpinventory.rb b/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpinventory.rb index a6af22574258..19f58bda679a 100644 --- a/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpinventory.rb +++ b/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpinventory.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpmerchantstate.rb b/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpmerchantstate.rb index b39853a6e31c..714550db536e 100644 --- a/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpmerchantstate.rb +++ b/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpmerchantstate.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpsale.rb b/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpsale.rb index e6c00478c936..cdbbfd2aff70 100644 --- a/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpsale.rb +++ b/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpsale.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpstore.rb b/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpstore.rb index 927293d9510b..b107be282b52 100644 --- a/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpstore.rb +++ b/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/merchant/lfp/v1beta/lfpstore.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/type/types.rb index 3ca6b3cad91d..1a166e0ac98c 100644 --- a/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/type/types.rb +++ b/google-shopping-merchant-lfp-v1beta/proto_docs/google/shopping/type/types.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/snippets/Gemfile b/google-shopping-merchant-lfp-v1beta/snippets/Gemfile index 59691d8f906c..2ec19bba9dbc 100644 --- a/google-shopping-merchant-lfp-v1beta/snippets/Gemfile +++ b/google-shopping-merchant-lfp-v1beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/snippets/lfp_inventory_service/insert_lfp_inventory.rb b/google-shopping-merchant-lfp-v1beta/snippets/lfp_inventory_service/insert_lfp_inventory.rb index 46400ecc1e72..e2585705684c 100644 --- a/google-shopping-merchant-lfp-v1beta/snippets/lfp_inventory_service/insert_lfp_inventory.rb +++ b/google-shopping-merchant-lfp-v1beta/snippets/lfp_inventory_service/insert_lfp_inventory.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb b/google-shopping-merchant-lfp-v1beta/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb index 7094cd3da073..141678378df2 100644 --- a/google-shopping-merchant-lfp-v1beta/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb +++ b/google-shopping-merchant-lfp-v1beta/snippets/lfp_merchant_state_service/get_lfp_merchant_state.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/snippets/lfp_sale_service/insert_lfp_sale.rb b/google-shopping-merchant-lfp-v1beta/snippets/lfp_sale_service/insert_lfp_sale.rb index 3ba60858f37a..9ab7a5e2d19b 100644 --- a/google-shopping-merchant-lfp-v1beta/snippets/lfp_sale_service/insert_lfp_sale.rb +++ b/google-shopping-merchant-lfp-v1beta/snippets/lfp_sale_service/insert_lfp_sale.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/delete_lfp_store.rb b/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/delete_lfp_store.rb index cb33a80b368a..02f91277cd57 100644 --- a/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/delete_lfp_store.rb +++ b/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/delete_lfp_store.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/get_lfp_store.rb b/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/get_lfp_store.rb index f0397620d007..724ea5eb612a 100644 --- a/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/get_lfp_store.rb +++ b/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/get_lfp_store.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/insert_lfp_store.rb b/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/insert_lfp_store.rb index f5170c9aeb4f..1ba55bde4558 100644 --- a/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/insert_lfp_store.rb +++ b/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/insert_lfp_store.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/list_lfp_stores.rb b/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/list_lfp_stores.rb index 614c32536657..fedc94991d61 100644 --- a/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/list_lfp_stores.rb +++ b/google-shopping-merchant-lfp-v1beta/snippets/lfp_store_service/list_lfp_stores.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_paths_test.rb b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_paths_test.rb index 8982870a4176..da075914c662 100644 --- a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_paths_test.rb +++ b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_rest_test.rb b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_rest_test.rb index fdc2bbcd5e9c..1a89155b8838 100644 --- a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_rest_test.rb +++ b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb index 7c8ba3369dd5..e4619028814e 100644 --- a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb +++ b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_inventory_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_paths_test.rb b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_paths_test.rb index 0245605fbc69..57e0727dc345 100644 --- a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_paths_test.rb +++ b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_rest_test.rb b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_rest_test.rb index 5a7b074599ba..7120754f821d 100644 --- a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_rest_test.rb +++ b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_test.rb b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_test.rb index ce2c01dcb12d..5f3930141820 100644 --- a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_test.rb +++ b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_merchant_state_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_paths_test.rb b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_paths_test.rb index f87aad8c0e29..e070ba66a8f6 100644 --- a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_paths_test.rb +++ b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_rest_test.rb b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_rest_test.rb index 382720d5a59d..a13f00e79029 100644 --- a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_rest_test.rb +++ b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb index 5c7dba07fb0b..0f7ebded18a3 100644 --- a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb +++ b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_sale_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_paths_test.rb b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_paths_test.rb index bd97f94fec54..cd51f3f3b1b6 100644 --- a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_paths_test.rb +++ b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_rest_test.rb b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_rest_test.rb index 8cf4e34651e8..d68255231ead 100644 --- a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_rest_test.rb +++ b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb index b928949f0ee0..6d86669d5067 100644 --- a/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb +++ b/google-shopping-merchant-lfp-v1beta/test/google/shopping/merchant/lfp/v1beta/lfp_store_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-lfp-v1beta/test/helper.rb b/google-shopping-merchant-lfp-v1beta/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-shopping-merchant-lfp-v1beta/test/helper.rb +++ b/google-shopping-merchant-lfp-v1beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/.owlbot-manifest.json b/google-shopping-merchant-products-v1/.owlbot-manifest.json index b02e813bd877..e0d0545550f3 100644 --- a/google-shopping-merchant-products-v1/.owlbot-manifest.json +++ b/google-shopping-merchant-products-v1/.owlbot-manifest.json @@ -66,6 +66,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-merchant-products-v1/.toys.rb b/google-shopping-merchant-products-v1/.toys.rb index 9a210f1427c7..177e22456e8a 100644 --- a/google-shopping-merchant-products-v1/.toys.rb +++ b/google-shopping-merchant-products-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/Rakefile b/google-shopping-merchant-products-v1/Rakefile index 27f7a1ed0d49..4a3b723c7342 100644 --- a/google-shopping-merchant-products-v1/Rakefile +++ b/google-shopping-merchant-products-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/lib/google-shopping-merchant-products-v1.rb b/google-shopping-merchant-products-v1/lib/google-shopping-merchant-products-v1.rb index c0b65c435a5e..03a904782651 100644 --- a/google-shopping-merchant-products-v1/lib/google-shopping-merchant-products-v1.rb +++ b/google-shopping-merchant-products-v1/lib/google-shopping-merchant-products-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1.rb index 86b7ca5bc6b0..cbcaa48f9328 100644 --- a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1.rb +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service.rb index 83fca16e8a8d..35b9b48149cb 100644 --- a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service.rb +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/client.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/client.rb index d0c2177774a5..f801a523c825 100644 --- a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/client.rb +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/credentials.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/credentials.rb index 64f26287de14..2dab97788402 100644 --- a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/credentials.rb +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/paths.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/paths.rb index 8578ef15e26c..b4569174dc31 100644 --- a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/paths.rb +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest.rb index 708dd3f0d8ce..c06b76bc7cc0 100644 --- a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest.rb +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/client.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/client.rb index 43aac3221ca4..7c00d8232192 100644 --- a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/client.rb +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub.rb index 7abcce600808..0fe81f05e2e3 100644 --- a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub.rb +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/productinputs_services_pb.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/productinputs_services_pb.rb index 36047e8d5059..db44b2b83172 100644 --- a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/productinputs_services_pb.rb +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/productinputs_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/products/v1/productinputs.proto for package 'Google.Shopping.Merchant.Products.V1' # Original file comments: -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service.rb index 466073d80977..64476f45cd43 100644 --- a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service.rb +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/client.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/client.rb index 440b40bf73d2..b77959106caf 100644 --- a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/client.rb +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/credentials.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/credentials.rb index d9805cf55bf4..452534d75641 100644 --- a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/credentials.rb +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/paths.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/paths.rb index 227587be92ca..e94269725235 100644 --- a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/paths.rb +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest.rb index 5b635928b496..0a338c0d900e 100644 --- a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest.rb +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/client.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/client.rb index 1fe980ee0318..99fb8c0c1a03 100644 --- a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/client.rb +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/service_stub.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/service_stub.rb index 619edc9bdca9..31581fcf3077 100644 --- a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/service_stub.rb +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_services_pb.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_services_pb.rb index 003ea01a4f13..21a0bd234222 100644 --- a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_services_pb.rb +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/products/v1/products.proto for package 'Google.Shopping.Merchant.Products.V1' # Original file comments: -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/rest.rb b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/rest.rb index d52eb9db3502..35efbd477133 100644 --- a/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/rest.rb +++ b/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-products-v1/proto_docs/google/api/client.rb index 30c954fb0d5c..3ab0b096d445 100644 --- a/google-shopping-merchant-products-v1/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-products-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-products-v1/proto_docs/google/api/field_behavior.rb index fb9115c630af..582be187d115 100644 --- a/google-shopping-merchant-products-v1/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-merchant-products-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-products-v1/proto_docs/google/api/launch_stage.rb index b836bdb60b21..9392a413fb1b 100644 --- a/google-shopping-merchant-products-v1/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-merchant-products-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/proto_docs/google/api/resource.rb b/google-shopping-merchant-products-v1/proto_docs/google/api/resource.rb index 71b994c7ef20..25dec4847ac1 100644 --- a/google-shopping-merchant-products-v1/proto_docs/google/api/resource.rb +++ b/google-shopping-merchant-products-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-products-v1/proto_docs/google/protobuf/duration.rb index 341efa296c29..ea59f1f91daf 100644 --- a/google-shopping-merchant-products-v1/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-merchant-products-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-products-v1/proto_docs/google/protobuf/empty.rb index c2acab1235a9..83e4481834a6 100644 --- a/google-shopping-merchant-products-v1/proto_docs/google/protobuf/empty.rb +++ b/google-shopping-merchant-products-v1/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/proto_docs/google/protobuf/field_mask.rb b/google-shopping-merchant-products-v1/proto_docs/google/protobuf/field_mask.rb index ad3c3ad25f0f..7f3ffc78601a 100644 --- a/google-shopping-merchant-products-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-shopping-merchant-products-v1/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-products-v1/proto_docs/google/protobuf/timestamp.rb index a005f395ccab..e58202461f88 100644 --- a/google-shopping-merchant-products-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-merchant-products-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) 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. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!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 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/productinputs.rb b/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/productinputs.rb index 6fbcd242ce62..852b9c4e5e01 100644 --- a/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/productinputs.rb +++ b/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/productinputs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products.rb b/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products.rb index 99d1bc7979f3..d83cd354ded6 100644 --- a/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products.rb +++ b/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products_common.rb b/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products_common.rb index 1d9c58813866..f2889cd30f1b 100644 --- a/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products_common.rb +++ b/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products_common.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-products-v1/proto_docs/google/shopping/type/types.rb index d802772636bf..1a166e0ac98c 100644 --- a/google-shopping-merchant-products-v1/proto_docs/google/shopping/type/types.rb +++ b/google-shopping-merchant-products-v1/proto_docs/google/shopping/type/types.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/proto_docs/google/type/interval.rb b/google-shopping-merchant-products-v1/proto_docs/google/type/interval.rb index 1de1b841fd30..9350ca479005 100644 --- a/google-shopping-merchant-products-v1/proto_docs/google/type/interval.rb +++ b/google-shopping-merchant-products-v1/proto_docs/google/type/interval.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/snippets/Gemfile b/google-shopping-merchant-products-v1/snippets/Gemfile index a26cd0262526..476b0913359f 100644 --- a/google-shopping-merchant-products-v1/snippets/Gemfile +++ b/google-shopping-merchant-products-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/snippets/product_inputs_service/delete_product_input.rb b/google-shopping-merchant-products-v1/snippets/product_inputs_service/delete_product_input.rb index c6549f27042e..fed58bf376e9 100644 --- a/google-shopping-merchant-products-v1/snippets/product_inputs_service/delete_product_input.rb +++ b/google-shopping-merchant-products-v1/snippets/product_inputs_service/delete_product_input.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/snippets/product_inputs_service/insert_product_input.rb b/google-shopping-merchant-products-v1/snippets/product_inputs_service/insert_product_input.rb index 9d02c70d5d28..93a4a28126da 100644 --- a/google-shopping-merchant-products-v1/snippets/product_inputs_service/insert_product_input.rb +++ b/google-shopping-merchant-products-v1/snippets/product_inputs_service/insert_product_input.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/snippets/product_inputs_service/update_product_input.rb b/google-shopping-merchant-products-v1/snippets/product_inputs_service/update_product_input.rb index fb43f144c6ec..03fa844cc1bb 100644 --- a/google-shopping-merchant-products-v1/snippets/product_inputs_service/update_product_input.rb +++ b/google-shopping-merchant-products-v1/snippets/product_inputs_service/update_product_input.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/snippets/products_service/get_product.rb b/google-shopping-merchant-products-v1/snippets/products_service/get_product.rb index 1837087a0b6a..c3ee6d98c313 100644 --- a/google-shopping-merchant-products-v1/snippets/products_service/get_product.rb +++ b/google-shopping-merchant-products-v1/snippets/products_service/get_product.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/snippets/products_service/list_products.rb b/google-shopping-merchant-products-v1/snippets/products_service/list_products.rb index 7d1c214d9304..8c761094470d 100644 --- a/google-shopping-merchant-products-v1/snippets/products_service/list_products.rb +++ b/google-shopping-merchant-products-v1/snippets/products_service/list_products.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_paths_test.rb b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_paths_test.rb index 08569a6317e8..129ddf43af5d 100644 --- a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_paths_test.rb +++ b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_rest_test.rb b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_rest_test.rb index 8e33e308fffc..4fb0bfefbe32 100644 --- a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_rest_test.rb +++ b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_test.rb b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_test.rb index 39262d0f6c8f..64c3eaa96159 100644 --- a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_test.rb +++ b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_paths_test.rb b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_paths_test.rb index 2a297d86802a..7699b26cd912 100644 --- a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_paths_test.rb +++ b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_rest_test.rb b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_rest_test.rb index a18dd81a7a7a..f65e8189f567 100644 --- a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_rest_test.rb +++ b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_test.rb b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_test.rb index 8e976efa5a60..f01d9b28135c 100644 --- a/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_test.rb +++ b/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1/test/helper.rb b/google-shopping-merchant-products-v1/test/helper.rb index 60c50984be58..4fb6756ac7e2 100644 --- a/google-shopping-merchant-products-v1/test/helper.rb +++ b/google-shopping-merchant-products-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/.owlbot-manifest.json b/google-shopping-merchant-products-v1beta/.owlbot-manifest.json index 4c2b1c5ce3f6..1a8f4d3b56aa 100644 --- a/google-shopping-merchant-products-v1beta/.owlbot-manifest.json +++ b/google-shopping-merchant-products-v1beta/.owlbot-manifest.json @@ -66,6 +66,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-merchant-products-v1beta/.toys.rb b/google-shopping-merchant-products-v1beta/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-shopping-merchant-products-v1beta/.toys.rb +++ b/google-shopping-merchant-products-v1beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/Rakefile b/google-shopping-merchant-products-v1beta/Rakefile index 3b2fd0419d64..10cb6d8b95a9 100644 --- a/google-shopping-merchant-products-v1beta/Rakefile +++ b/google-shopping-merchant-products-v1beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/lib/google-shopping-merchant-products-v1beta.rb b/google-shopping-merchant-products-v1beta/lib/google-shopping-merchant-products-v1beta.rb index abda9a44fdb4..7d527ddd9822 100644 --- a/google-shopping-merchant-products-v1beta/lib/google-shopping-merchant-products-v1beta.rb +++ b/google-shopping-merchant-products-v1beta/lib/google-shopping-merchant-products-v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta.rb index 49afe8d8c9f4..e683bb4e583d 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service.rb index 68a5e1d98d77..0ddfb756c73a 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/client.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/client.rb index 699390976e8b..165f4881a6dd 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/client.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/credentials.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/credentials.rb index 8bad4432d9c0..718d7d4e3f00 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/credentials.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/paths.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/paths.rb index 5aa2842b8d6f..4a11a773de08 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/paths.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest.rb index f414f0da4fd3..672cd8c37902 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/client.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/client.rb index 50c7b76a1f67..d718e5bfd70b 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/client.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/service_stub.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/service_stub.rb index 46eea64281b7..dc90849ebd50 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/service_stub.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_services_pb.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_services_pb.rb index 7e8ffb5e5c7d..847efb1541c4 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_services_pb.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/products/v1beta/productinputs.proto for package 'google.shopping.merchant.products.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# 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. diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service.rb index 77dca66cf937..87f9782eaeef 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/client.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/client.rb index 961c6b11baa3..9d628e10b9b8 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/client.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/credentials.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/credentials.rb index af0813e91115..faeb5001f556 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/credentials.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/paths.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/paths.rb index facdbcd17435..4926d100d288 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/paths.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest.rb index fdc9b715833d..f97202d7f457 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/client.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/client.rb index 0871912f335e..4f0b4b39a4f2 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/client.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/service_stub.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/service_stub.rb index 04739f5908c8..5aba9aaa6400 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/service_stub.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_services_pb.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_services_pb.rb index bcfcf9cc4788..0d596b062d0b 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_services_pb.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/products/v1beta/products.proto for package 'google.shopping.merchant.products.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# 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. diff --git a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/rest.rb b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/rest.rb index 655a63559974..f6dac740f63e 100644 --- a/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/rest.rb +++ b/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/proto_docs/google/api/client.rb b/google-shopping-merchant-products-v1beta/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-shopping-merchant-products-v1beta/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-products-v1beta/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-products-v1beta/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-shopping-merchant-products-v1beta/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-merchant-products-v1beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-products-v1beta/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-shopping-merchant-products-v1beta/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-merchant-products-v1beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/proto_docs/google/api/resource.rb b/google-shopping-merchant-products-v1beta/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-shopping-merchant-products-v1beta/proto_docs/google/api/resource.rb +++ b/google-shopping-merchant-products-v1beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/empty.rb +++ b/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/field_mask.rb b/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/field_mask.rb index ad3c3ad25f0f..7f3ffc78601a 100644 --- a/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/field_mask.rb +++ b/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) 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. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!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 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/productinputs.rb b/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/productinputs.rb index 702ae44564ea..8890f7c8a515 100644 --- a/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/productinputs.rb +++ b/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/productinputs.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products.rb b/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products.rb index d3ca422c8207..b4d830bc43e7 100644 --- a/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products.rb +++ b/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products_common.rb b/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products_common.rb index 262a75f654dc..3328f31f3069 100644 --- a/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products_common.rb +++ b/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products_common.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/type/types.rb index 3ca6b3cad91d..1a166e0ac98c 100644 --- a/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/type/types.rb +++ b/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/type/types.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/proto_docs/google/type/interval.rb b/google-shopping-merchant-products-v1beta/proto_docs/google/type/interval.rb index ba88575c495d..9350ca479005 100644 --- a/google-shopping-merchant-products-v1beta/proto_docs/google/type/interval.rb +++ b/google-shopping-merchant-products-v1beta/proto_docs/google/type/interval.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/snippets/Gemfile b/google-shopping-merchant-products-v1beta/snippets/Gemfile index 6000b2e11c62..be3d65c4c73d 100644 --- a/google-shopping-merchant-products-v1beta/snippets/Gemfile +++ b/google-shopping-merchant-products-v1beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/delete_product_input.rb b/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/delete_product_input.rb index 3018f5a6d16e..4680cd8ecdd3 100644 --- a/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/delete_product_input.rb +++ b/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/delete_product_input.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/insert_product_input.rb b/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/insert_product_input.rb index 2373f385a2c7..c4d92ec01316 100644 --- a/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/insert_product_input.rb +++ b/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/insert_product_input.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/update_product_input.rb b/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/update_product_input.rb index 7f16a4271716..3e96af7855cb 100644 --- a/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/update_product_input.rb +++ b/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/update_product_input.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/snippets/products_service/get_product.rb b/google-shopping-merchant-products-v1beta/snippets/products_service/get_product.rb index 072d700d7787..0e9287abfa14 100644 --- a/google-shopping-merchant-products-v1beta/snippets/products_service/get_product.rb +++ b/google-shopping-merchant-products-v1beta/snippets/products_service/get_product.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/snippets/products_service/list_products.rb b/google-shopping-merchant-products-v1beta/snippets/products_service/list_products.rb index 44f8f4ab3b5e..14ee55d1e87e 100644 --- a/google-shopping-merchant-products-v1beta/snippets/products_service/list_products.rb +++ b/google-shopping-merchant-products-v1beta/snippets/products_service/list_products.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_paths_test.rb b/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_paths_test.rb index 6d7e3db4fbc9..af09f148b6e3 100644 --- a/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_paths_test.rb +++ b/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_rest_test.rb b/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_rest_test.rb index 99c46cf668d4..ff1f33b0759b 100644 --- a/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_rest_test.rb +++ b/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_test.rb b/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_test.rb index 51f024bec7f4..2d9d0fa554f2 100644 --- a/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_test.rb +++ b/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_paths_test.rb b/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_paths_test.rb index ba11078369a4..d31f0e886202 100644 --- a/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_paths_test.rb +++ b/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_rest_test.rb b/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_rest_test.rb index 562ab0386e5a..32479d72f2ef 100644 --- a/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_rest_test.rb +++ b/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_test.rb b/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_test.rb index 4f95d634d9c2..5b33d88e7918 100644 --- a/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_test.rb +++ b/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-products-v1beta/test/helper.rb b/google-shopping-merchant-products-v1beta/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-shopping-merchant-products-v1beta/test/helper.rb +++ b/google-shopping-merchant-products-v1beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/.owlbot-manifest.json b/google-shopping-merchant-promotions-v1/.owlbot-manifest.json index 4e8cdea1bd1c..4f73c3821386 100644 --- a/google-shopping-merchant-promotions-v1/.owlbot-manifest.json +++ b/google-shopping-merchant-promotions-v1/.owlbot-manifest.json @@ -49,6 +49,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-merchant-promotions-v1/.toys.rb b/google-shopping-merchant-promotions-v1/.toys.rb index 9a210f1427c7..177e22456e8a 100644 --- a/google-shopping-merchant-promotions-v1/.toys.rb +++ b/google-shopping-merchant-promotions-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/Rakefile b/google-shopping-merchant-promotions-v1/Rakefile index b09874dc29fb..d98f692bf19e 100644 --- a/google-shopping-merchant-promotions-v1/Rakefile +++ b/google-shopping-merchant-promotions-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/lib/google-shopping-merchant-promotions-v1.rb b/google-shopping-merchant-promotions-v1/lib/google-shopping-merchant-promotions-v1.rb index 61e45c3b1a94..7520fa752e8c 100644 --- a/google-shopping-merchant-promotions-v1/lib/google-shopping-merchant-promotions-v1.rb +++ b/google-shopping-merchant-promotions-v1/lib/google-shopping-merchant-promotions-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1.rb index 9d796242bfc9..f3a70c6d9348 100644 --- a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1.rb +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service.rb index c156a1de1a94..19dae04d8d12 100644 --- a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service.rb +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/client.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/client.rb index 5a9b333a7ccb..5a1247691c4c 100644 --- a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/client.rb +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/credentials.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/credentials.rb index 85d174c3ebf1..581e95d2481a 100644 --- a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/credentials.rb +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/paths.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/paths.rb index aa61830b2295..5872c917bb52 100644 --- a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/paths.rb +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest.rb index 01f9f743295b..e3a39d2bf44d 100644 --- a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest.rb +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/client.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/client.rb index 0c16fd35c5f2..a09a9749a05e 100644 --- a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/client.rb +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/service_stub.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/service_stub.rb index c01adffdb20a..269bd4f2e60c 100644 --- a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/service_stub.rb +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/rest.rb b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/rest.rb index 4890984b3dc7..56dbf26b54f7 100644 --- a/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/rest.rb +++ b/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-promotions-v1/proto_docs/google/api/client.rb index 30c954fb0d5c..3ab0b096d445 100644 --- a/google-shopping-merchant-promotions-v1/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-promotions-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-promotions-v1/proto_docs/google/api/field_behavior.rb index fb9115c630af..582be187d115 100644 --- a/google-shopping-merchant-promotions-v1/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-merchant-promotions-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-promotions-v1/proto_docs/google/api/launch_stage.rb index b836bdb60b21..9392a413fb1b 100644 --- a/google-shopping-merchant-promotions-v1/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-merchant-promotions-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/proto_docs/google/api/resource.rb b/google-shopping-merchant-promotions-v1/proto_docs/google/api/resource.rb index 71b994c7ef20..25dec4847ac1 100644 --- a/google-shopping-merchant-promotions-v1/proto_docs/google/api/resource.rb +++ b/google-shopping-merchant-promotions-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/duration.rb index 341efa296c29..ea59f1f91daf 100644 --- a/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/timestamp.rb index a005f395ccab..e58202461f88 100644 --- a/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) 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. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!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 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions.rb b/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions.rb index e3eed7518497..feb8f7c2dc11 100644 --- a/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions.rb +++ b/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions_common.rb b/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions_common.rb index 8a3be1a8f574..eecbe0f7dc25 100644 --- a/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions_common.rb +++ b/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions_common.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/type/types.rb index d802772636bf..1a166e0ac98c 100644 --- a/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/type/types.rb +++ b/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/type/types.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/proto_docs/google/type/interval.rb b/google-shopping-merchant-promotions-v1/proto_docs/google/type/interval.rb index 1de1b841fd30..9350ca479005 100644 --- a/google-shopping-merchant-promotions-v1/proto_docs/google/type/interval.rb +++ b/google-shopping-merchant-promotions-v1/proto_docs/google/type/interval.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/snippets/Gemfile b/google-shopping-merchant-promotions-v1/snippets/Gemfile index 8c6e64adc783..17fb138bc4f5 100644 --- a/google-shopping-merchant-promotions-v1/snippets/Gemfile +++ b/google-shopping-merchant-promotions-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/snippets/promotions_service/get_promotion.rb b/google-shopping-merchant-promotions-v1/snippets/promotions_service/get_promotion.rb index 06bf905924e3..b1c409c4e3f9 100644 --- a/google-shopping-merchant-promotions-v1/snippets/promotions_service/get_promotion.rb +++ b/google-shopping-merchant-promotions-v1/snippets/promotions_service/get_promotion.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/snippets/promotions_service/insert_promotion.rb b/google-shopping-merchant-promotions-v1/snippets/promotions_service/insert_promotion.rb index 3bff4aa70bf9..542d86aa9afd 100644 --- a/google-shopping-merchant-promotions-v1/snippets/promotions_service/insert_promotion.rb +++ b/google-shopping-merchant-promotions-v1/snippets/promotions_service/insert_promotion.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/snippets/promotions_service/list_promotions.rb b/google-shopping-merchant-promotions-v1/snippets/promotions_service/list_promotions.rb index b8d4843cdcc2..4a4bfe6a3cc5 100644 --- a/google-shopping-merchant-promotions-v1/snippets/promotions_service/list_promotions.rb +++ b/google-shopping-merchant-promotions-v1/snippets/promotions_service/list_promotions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_paths_test.rb b/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_paths_test.rb index 66d279c73850..a6226b082804 100644 --- a/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_paths_test.rb +++ b/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_rest_test.rb b/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_rest_test.rb index b795c54e06f4..873f2adddb0c 100644 --- a/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_rest_test.rb +++ b/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_test.rb b/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_test.rb index f4b97c63b30f..448c5a90531c 100644 --- a/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_test.rb +++ b/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1/test/helper.rb b/google-shopping-merchant-promotions-v1/test/helper.rb index 60c50984be58..4fb6756ac7e2 100644 --- a/google-shopping-merchant-promotions-v1/test/helper.rb +++ b/google-shopping-merchant-promotions-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/.owlbot-manifest.json b/google-shopping-merchant-promotions-v1beta/.owlbot-manifest.json index 8e2ec3e27dff..a6e124541a3d 100644 --- a/google-shopping-merchant-promotions-v1beta/.owlbot-manifest.json +++ b/google-shopping-merchant-promotions-v1beta/.owlbot-manifest.json @@ -49,6 +49,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-merchant-promotions-v1beta/.toys.rb b/google-shopping-merchant-promotions-v1beta/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-shopping-merchant-promotions-v1beta/.toys.rb +++ b/google-shopping-merchant-promotions-v1beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/Rakefile b/google-shopping-merchant-promotions-v1beta/Rakefile index eb2fe8f26960..e317bc9466c7 100644 --- a/google-shopping-merchant-promotions-v1beta/Rakefile +++ b/google-shopping-merchant-promotions-v1beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/lib/google-shopping-merchant-promotions-v1beta.rb b/google-shopping-merchant-promotions-v1beta/lib/google-shopping-merchant-promotions-v1beta.rb index 740109104aa0..c10f79fc005e 100644 --- a/google-shopping-merchant-promotions-v1beta/lib/google-shopping-merchant-promotions-v1beta.rb +++ b/google-shopping-merchant-promotions-v1beta/lib/google-shopping-merchant-promotions-v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta.rb b/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta.rb index 47131d212a31..dfaeefd3dd24 100644 --- a/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta.rb +++ b/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service.rb b/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service.rb index 9a5fd53d2d12..5228821b12f3 100644 --- a/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service.rb +++ b/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/client.rb b/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/client.rb index 47a23734e0a0..f1d506169661 100644 --- a/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/client.rb +++ b/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/credentials.rb b/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/credentials.rb index 8e50532ece8a..eebde160342e 100644 --- a/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/credentials.rb +++ b/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/paths.rb b/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/paths.rb index ab48d5af5169..19c1177beb9f 100644 --- a/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/paths.rb +++ b/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest.rb b/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest.rb index 8e8d8edf7031..3877791112d1 100644 --- a/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest.rb +++ b/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/client.rb b/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/client.rb index 4c6484f3d27f..ae1bd17618d9 100644 --- a/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/client.rb +++ b/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/service_stub.rb b/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/service_stub.rb index 5192cb0b1268..8219c8fdf658 100644 --- a/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/service_stub.rb +++ b/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_services_pb.rb b/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_services_pb.rb index 26ed8c356a6d..5065716b05be 100644 --- a/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_services_pb.rb +++ b/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/promotions/v1beta/promotions.proto for package 'google.shopping.merchant.promotions.v1beta' # Original file comments: -# Copyright 2024 Google LLC +# 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. diff --git a/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/rest.rb b/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/rest.rb index 118a2b0f157b..ddbc997c4bc8 100644 --- a/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/rest.rb +++ b/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/client.rb b/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/resource.rb b/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/resource.rb +++ b/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-promotions-v1beta/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-shopping-merchant-promotions-v1beta/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-merchant-promotions-v1beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-promotions-v1beta/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-shopping-merchant-promotions-v1beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-merchant-promotions-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) 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. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!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 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions.rb b/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions.rb index 9621f662161c..5589a80a6d2c 100644 --- a/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions.rb +++ b/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions_common.rb b/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions_common.rb index 3e0fe09d37ba..1020dd50edbd 100644 --- a/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions_common.rb +++ b/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions_common.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/type/types.rb index 3ca6b3cad91d..1a166e0ac98c 100644 --- a/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/type/types.rb +++ b/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/type/types.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/proto_docs/google/type/interval.rb b/google-shopping-merchant-promotions-v1beta/proto_docs/google/type/interval.rb index ba88575c495d..9350ca479005 100644 --- a/google-shopping-merchant-promotions-v1beta/proto_docs/google/type/interval.rb +++ b/google-shopping-merchant-promotions-v1beta/proto_docs/google/type/interval.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/snippets/Gemfile b/google-shopping-merchant-promotions-v1beta/snippets/Gemfile index e4292cdc50d4..1271b862a659 100644 --- a/google-shopping-merchant-promotions-v1beta/snippets/Gemfile +++ b/google-shopping-merchant-promotions-v1beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/get_promotion.rb b/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/get_promotion.rb index 951e406a5139..6e9b8d3455d4 100644 --- a/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/get_promotion.rb +++ b/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/get_promotion.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/insert_promotion.rb b/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/insert_promotion.rb index deec7e6f2d21..43f6e2c19e06 100644 --- a/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/insert_promotion.rb +++ b/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/insert_promotion.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/list_promotions.rb b/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/list_promotions.rb index 9f0e22d2a817..4688318ef057 100644 --- a/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/list_promotions.rb +++ b/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/list_promotions.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_paths_test.rb b/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_paths_test.rb index 1d50e128df17..bbc7ea1a187e 100644 --- a/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_paths_test.rb +++ b/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_rest_test.rb b/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_rest_test.rb index fd2c3683e011..498d485cd41a 100644 --- a/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_rest_test.rb +++ b/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_test.rb b/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_test.rb index 0a487b5d6c64..a2e706899842 100644 --- a/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_test.rb +++ b/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-promotions-v1beta/test/helper.rb b/google-shopping-merchant-promotions-v1beta/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-shopping-merchant-promotions-v1beta/test/helper.rb +++ b/google-shopping-merchant-promotions-v1beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/.owlbot-manifest.json b/google-shopping-merchant-reports-v1/.owlbot-manifest.json index 8d66dedfb01d..504a8967708d 100644 --- a/google-shopping-merchant-reports-v1/.owlbot-manifest.json +++ b/google-shopping-merchant-reports-v1/.owlbot-manifest.json @@ -43,6 +43,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-merchant-reports-v1/.toys.rb b/google-shopping-merchant-reports-v1/.toys.rb index 9a210f1427c7..177e22456e8a 100644 --- a/google-shopping-merchant-reports-v1/.toys.rb +++ b/google-shopping-merchant-reports-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/Rakefile b/google-shopping-merchant-reports-v1/Rakefile index d70463f645c3..6d4b8859d747 100644 --- a/google-shopping-merchant-reports-v1/Rakefile +++ b/google-shopping-merchant-reports-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/lib/google-shopping-merchant-reports-v1.rb b/google-shopping-merchant-reports-v1/lib/google-shopping-merchant-reports-v1.rb index f4d340b5c4d4..519b57180416 100644 --- a/google-shopping-merchant-reports-v1/lib/google-shopping-merchant-reports-v1.rb +++ b/google-shopping-merchant-reports-v1/lib/google-shopping-merchant-reports-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1.rb index f68956aa290f..588dc6fa4ee3 100644 --- a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1.rb +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service.rb index a844a34ef579..88e9aced79fd 100644 --- a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service.rb +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/client.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/client.rb index c99526ed3748..ef9288f54a3b 100644 --- a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/client.rb +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/credentials.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/credentials.rb index ad267483c398..f1e78db705c2 100644 --- a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/credentials.rb +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest.rb index 633c7aa46095..f84d95a0f9f3 100644 --- a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest.rb +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/client.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/client.rb index fda7581a6081..05047b77bb2f 100644 --- a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/client.rb +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/service_stub.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/service_stub.rb index 774675d5616e..e78b6989589a 100644 --- a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/service_stub.rb +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_services_pb.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_services_pb.rb index c00c192cbb54..fd4268bd9362 100644 --- a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_services_pb.rb +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/reports/v1/reports.proto for package 'Google.Shopping.Merchant.Reports.V1' # Original file comments: -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/rest.rb b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/rest.rb index a00d66112047..2a235a918302 100644 --- a/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/rest.rb +++ b/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-reports-v1/proto_docs/google/api/client.rb index 30c954fb0d5c..3ab0b096d445 100644 --- a/google-shopping-merchant-reports-v1/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-reports-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-reports-v1/proto_docs/google/api/field_behavior.rb index fb9115c630af..582be187d115 100644 --- a/google-shopping-merchant-reports-v1/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-merchant-reports-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-reports-v1/proto_docs/google/api/launch_stage.rb index b836bdb60b21..9392a413fb1b 100644 --- a/google-shopping-merchant-reports-v1/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-merchant-reports-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/proto_docs/google/api/resource.rb b/google-shopping-merchant-reports-v1/proto_docs/google/api/resource.rb index 71b994c7ef20..25dec4847ac1 100644 --- a/google-shopping-merchant-reports-v1/proto_docs/google/api/resource.rb +++ b/google-shopping-merchant-reports-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/duration.rb index 341efa296c29..ea59f1f91daf 100644 --- a/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/timestamp.rb index a005f395ccab..e58202461f88 100644 --- a/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) 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. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!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 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-merchant-reports-v1/proto_docs/google/shopping/merchant/reports/v1/reports.rb b/google-shopping-merchant-reports-v1/proto_docs/google/shopping/merchant/reports/v1/reports.rb index fcae89688507..aed6f4bb1da6 100644 --- a/google-shopping-merchant-reports-v1/proto_docs/google/shopping/merchant/reports/v1/reports.rb +++ b/google-shopping-merchant-reports-v1/proto_docs/google/shopping/merchant/reports/v1/reports.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-reports-v1/proto_docs/google/shopping/type/types.rb index d802772636bf..1a166e0ac98c 100644 --- a/google-shopping-merchant-reports-v1/proto_docs/google/shopping/type/types.rb +++ b/google-shopping-merchant-reports-v1/proto_docs/google/shopping/type/types.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/proto_docs/google/type/date.rb b/google-shopping-merchant-reports-v1/proto_docs/google/type/date.rb index 3c5295270b8b..a52275cebf89 100644 --- a/google-shopping-merchant-reports-v1/proto_docs/google/type/date.rb +++ b/google-shopping-merchant-reports-v1/proto_docs/google/type/date.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/snippets/Gemfile b/google-shopping-merchant-reports-v1/snippets/Gemfile index e4774bac377a..6c1738151dcf 100644 --- a/google-shopping-merchant-reports-v1/snippets/Gemfile +++ b/google-shopping-merchant-reports-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/snippets/report_service/search.rb b/google-shopping-merchant-reports-v1/snippets/report_service/search.rb index d4a1de602870..8ef0dd60d2ee 100644 --- a/google-shopping-merchant-reports-v1/snippets/report_service/search.rb +++ b/google-shopping-merchant-reports-v1/snippets/report_service/search.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_rest_test.rb b/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_rest_test.rb index d7596ef24e68..a19467753f43 100644 --- a/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_rest_test.rb +++ b/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_test.rb b/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_test.rb index 1b14eb1e8691..7f5c30b2cc09 100644 --- a/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_test.rb +++ b/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1/test/helper.rb b/google-shopping-merchant-reports-v1/test/helper.rb index 60c50984be58..4fb6756ac7e2 100644 --- a/google-shopping-merchant-reports-v1/test/helper.rb +++ b/google-shopping-merchant-reports-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/.owlbot-manifest.json b/google-shopping-merchant-reports-v1beta/.owlbot-manifest.json index 01d03cb337c7..6e65e646febc 100644 --- a/google-shopping-merchant-reports-v1beta/.owlbot-manifest.json +++ b/google-shopping-merchant-reports-v1beta/.owlbot-manifest.json @@ -43,6 +43,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-merchant-reports-v1beta/.toys.rb b/google-shopping-merchant-reports-v1beta/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-shopping-merchant-reports-v1beta/.toys.rb +++ b/google-shopping-merchant-reports-v1beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/Rakefile b/google-shopping-merchant-reports-v1beta/Rakefile index 882da6e0e31b..82433d3dd4c3 100644 --- a/google-shopping-merchant-reports-v1beta/Rakefile +++ b/google-shopping-merchant-reports-v1beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/lib/google-shopping-merchant-reports-v1beta.rb b/google-shopping-merchant-reports-v1beta/lib/google-shopping-merchant-reports-v1beta.rb index a38fe756755e..48b97fd3f8a8 100644 --- a/google-shopping-merchant-reports-v1beta/lib/google-shopping-merchant-reports-v1beta.rb +++ b/google-shopping-merchant-reports-v1beta/lib/google-shopping-merchant-reports-v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta.rb b/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta.rb index 33c6d7a64b55..8f2e15f900dd 100644 --- a/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta.rb +++ b/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service.rb b/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service.rb index 4a29a7ef8ebd..86b087e5ecff 100644 --- a/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service.rb +++ b/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/client.rb b/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/client.rb index 5b916fd791e1..10901e1cdd1f 100644 --- a/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/client.rb +++ b/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/credentials.rb b/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/credentials.rb index ffe845b6ae3c..c11c7a9481d1 100644 --- a/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/credentials.rb +++ b/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest.rb b/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest.rb index 4dcaecb51bdd..94cbe550a4c6 100644 --- a/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest.rb +++ b/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/client.rb b/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/client.rb index 2575c24ff748..3740e0847bdd 100644 --- a/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/client.rb +++ b/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/service_stub.rb b/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/service_stub.rb index 7955b8b6d3ab..319484db68ad 100644 --- a/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/service_stub.rb +++ b/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_services_pb.rb b/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_services_pb.rb index 6d9239c9d014..bfe851e2efdf 100644 --- a/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_services_pb.rb +++ b/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/reports/v1beta/reports.proto for package 'google.shopping.merchant.reports.v1beta' # Original file comments: -# Copyright 2023 Google LLC +# 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. diff --git a/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/rest.rb b/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/rest.rb index 19790785793e..85baeb6c6a29 100644 --- a/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/rest.rb +++ b/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/proto_docs/google/api/client.rb b/google-shopping-merchant-reports-v1beta/proto_docs/google/api/client.rb index f20af9485bd9..3ab0b096d445 100644 --- a/google-shopping-merchant-reports-v1beta/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-reports-v1beta/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-reports-v1beta/proto_docs/google/api/field_behavior.rb index 843c8e9deea2..582be187d115 100644 --- a/google-shopping-merchant-reports-v1beta/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-merchant-reports-v1beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-reports-v1beta/proto_docs/google/api/launch_stage.rb index 173c5c85f5dc..9392a413fb1b 100644 --- a/google-shopping-merchant-reports-v1beta/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-merchant-reports-v1beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/proto_docs/google/api/resource.rb b/google-shopping-merchant-reports-v1beta/proto_docs/google/api/resource.rb index aa7e4be53201..25dec4847ac1 100644 --- a/google-shopping-merchant-reports-v1beta/proto_docs/google/api/resource.rb +++ b/google-shopping-merchant-reports-v1beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-reports-v1beta/proto_docs/google/protobuf/duration.rb index b4a53d0ac67f..ea59f1f91daf 100644 --- a/google-shopping-merchant-reports-v1beta/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-merchant-reports-v1beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-reports-v1beta/proto_docs/google/protobuf/timestamp.rb index b7de80e5ed7f..e58202461f88 100644 --- a/google-shopping-merchant-reports-v1beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-merchant-reports-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) 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. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!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 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/merchant/reports/v1beta/reports.rb b/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/merchant/reports/v1beta/reports.rb index faa863f16f97..3ab2c2d9864c 100644 --- a/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/merchant/reports/v1beta/reports.rb +++ b/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/merchant/reports/v1beta/reports.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/type/types.rb index c27d18e7be7a..1a166e0ac98c 100644 --- a/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/type/types.rb +++ b/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/type/types.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/proto_docs/google/type/date.rb b/google-shopping-merchant-reports-v1beta/proto_docs/google/type/date.rb index 9478ba127d58..a52275cebf89 100644 --- a/google-shopping-merchant-reports-v1beta/proto_docs/google/type/date.rb +++ b/google-shopping-merchant-reports-v1beta/proto_docs/google/type/date.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/snippets/Gemfile b/google-shopping-merchant-reports-v1beta/snippets/Gemfile index dd5fbbb0dd3c..0ebf60951004 100644 --- a/google-shopping-merchant-reports-v1beta/snippets/Gemfile +++ b/google-shopping-merchant-reports-v1beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/snippets/report_service/search.rb b/google-shopping-merchant-reports-v1beta/snippets/report_service/search.rb index 02de78354707..1615fd5bbdd2 100644 --- a/google-shopping-merchant-reports-v1beta/snippets/report_service/search.rb +++ b/google-shopping-merchant-reports-v1beta/snippets/report_service/search.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_rest_test.rb b/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_rest_test.rb index a6ad421c7532..ff77f66f0d41 100644 --- a/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_rest_test.rb +++ b/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_test.rb b/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_test.rb index 9b689abdeb99..7f566f792f0c 100644 --- a/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_test.rb +++ b/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reports-v1beta/test/helper.rb b/google-shopping-merchant-reports-v1beta/test/helper.rb index 7e4ec6975a18..4fb6756ac7e2 100644 --- a/google-shopping-merchant-reports-v1beta/test/helper.rb +++ b/google-shopping-merchant-reports-v1beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/.owlbot-manifest.json b/google-shopping-merchant-reviews-v1beta/.owlbot-manifest.json index 04779ffc21a8..b69b24239ba6 100644 --- a/google-shopping-merchant-reviews-v1beta/.owlbot-manifest.json +++ b/google-shopping-merchant-reviews-v1beta/.owlbot-manifest.json @@ -69,6 +69,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-shopping-merchant-reviews-v1beta/.toys.rb b/google-shopping-merchant-reviews-v1beta/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-shopping-merchant-reviews-v1beta/.toys.rb +++ b/google-shopping-merchant-reviews-v1beta/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/Rakefile b/google-shopping-merchant-reviews-v1beta/Rakefile index 1464e8c331d0..5c1b99f6600f 100644 --- a/google-shopping-merchant-reviews-v1beta/Rakefile +++ b/google-shopping-merchant-reviews-v1beta/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/lib/google-shopping-merchant-reviews-v1beta.rb b/google-shopping-merchant-reviews-v1beta/lib/google-shopping-merchant-reviews-v1beta.rb index 53ad5edb3390..ca8a9748a650 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google-shopping-merchant-reviews-v1beta.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google-shopping-merchant-reviews-v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta.rb index 8213d6f83674..38eb44df819d 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service.rb index 996cdefd9f92..efe1e7c73e64 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/client.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/client.rb index 78d9a291a151..379d7601a5f2 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/client.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/credentials.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/credentials.rb index 7f7608871576..c277eb07bc1a 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/credentials.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/paths.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/paths.rb index c23e294bfee1..c9dd533a8f41 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/paths.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest.rb index 46af6497ddd2..baa41dc04a30 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/client.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/client.rb index 322971742069..342d19d3e30b 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/client.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/service_stub.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/service_stub.rb index 4450a888752d..deaba97f1960 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/service_stub.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_services_pb.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_services_pb.rb index 3bad11cd6c47..30579619d852 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_services_pb.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/reviews/v1beta/merchantreviews.proto for package 'Google.Shopping.Merchant.Reviews.V1beta' # Original file comments: -# Copyright 2024 Google LLC +# 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. diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service.rb index 8f5977c0e9a6..6f1a62d59ed3 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/client.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/client.rb index 2bcc7f74b4cd..ad77c4e2b829 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/client.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/credentials.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/credentials.rb index b4b947b54ccd..231c7c4249c4 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/credentials.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/paths.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/paths.rb index 4297a91a4b9a..98e8ac0fe1e8 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/paths.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest.rb index bf2d69cecd30..a767cf6fe81a 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/client.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/client.rb index cab2d5e104e0..17e4811cb802 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/client.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/service_stub.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/service_stub.rb index 6108cd76b8c3..ded40943cc71 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/service_stub.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_services_pb.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_services_pb.rb index 275cf3928766..3e404da80652 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_services_pb.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/shopping/merchant/reviews/v1beta/productreviews.proto for package 'Google.Shopping.Merchant.Reviews.V1beta' # Original file comments: -# Copyright 2024 Google LLC +# 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. diff --git a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/rest.rb b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/rest.rb index 52cd29517762..142e981525a3 100644 --- a/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/rest.rb +++ b/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/client.rb b/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/field_behavior.rb b/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/field_behavior.rb +++ b/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/launch_stage.rb b/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/launch_stage.rb +++ b/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/resource.rb b/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/resource.rb +++ b/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/duration.rb b/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/duration.rb +++ b/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/empty.rb b/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/empty.rb +++ b/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/timestamp.rb b/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/timestamp.rb +++ b/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) 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. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!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 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.rb b/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.rb index afef23b6d2db..c4751d5e0cfc 100644 --- a/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.rb +++ b/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews_common.rb b/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews_common.rb index 3424e3f87b74..00152a39458c 100644 --- a/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews_common.rb +++ b/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews_common.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews.rb b/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews.rb index 64fd36ae9416..6305806f1589 100644 --- a/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews.rb +++ b/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews_common.rb b/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews_common.rb index c9ed13111b1d..c3f0ca94ed2b 100644 --- a/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews_common.rb +++ b/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews_common.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/type/types.rb b/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/type/types.rb index 3ca6b3cad91d..1a166e0ac98c 100644 --- a/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/type/types.rb +++ b/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/type/types.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/snippets/Gemfile b/google-shopping-merchant-reviews-v1beta/snippets/Gemfile index b39026dc41cb..fc9a55054e31 100644 --- a/google-shopping-merchant-reviews-v1beta/snippets/Gemfile +++ b/google-shopping-merchant-reviews-v1beta/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/delete_merchant_review.rb b/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/delete_merchant_review.rb index 810e18cabb88..3bf6ab341e33 100644 --- a/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/delete_merchant_review.rb +++ b/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/delete_merchant_review.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/get_merchant_review.rb b/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/get_merchant_review.rb index 163f967a77ee..e74ae7f73e5b 100644 --- a/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/get_merchant_review.rb +++ b/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/get_merchant_review.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/insert_merchant_review.rb b/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/insert_merchant_review.rb index c007373f322b..a4ad91b0aa98 100644 --- a/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/insert_merchant_review.rb +++ b/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/insert_merchant_review.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/list_merchant_reviews.rb b/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/list_merchant_reviews.rb index 2010d5651359..a98cc375b132 100644 --- a/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/list_merchant_reviews.rb +++ b/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/list_merchant_reviews.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/delete_product_review.rb b/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/delete_product_review.rb index 7463f3f6fe0b..b2e342fe1042 100644 --- a/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/delete_product_review.rb +++ b/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/delete_product_review.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/get_product_review.rb b/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/get_product_review.rb index 1be4116a81b1..eee1f0dc0863 100644 --- a/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/get_product_review.rb +++ b/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/get_product_review.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/insert_product_review.rb b/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/insert_product_review.rb index 511c7f93f3fd..db93ef590cb8 100644 --- a/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/insert_product_review.rb +++ b/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/insert_product_review.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/list_product_reviews.rb b/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/list_product_reviews.rb index 7d9859c1df7a..012d4654ccef 100644 --- a/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/list_product_reviews.rb +++ b/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/list_product_reviews.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_paths_test.rb b/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_paths_test.rb index 0b8d057cd929..ef0cd2bf6ea2 100644 --- a/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_paths_test.rb +++ b/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_rest_test.rb b/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_rest_test.rb index d1d466d61190..abe209026df2 100644 --- a/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_rest_test.rb +++ b/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_test.rb b/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_test.rb index d8f4fd8f3920..70570a7e94fc 100644 --- a/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_test.rb +++ b/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_paths_test.rb b/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_paths_test.rb index d38009b0b7fa..d08895891421 100644 --- a/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_paths_test.rb +++ b/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_rest_test.rb b/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_rest_test.rb index 774fcc4cd8bd..773800b1cdd9 100644 --- a/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_rest_test.rb +++ b/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_rest_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_test.rb b/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_test.rb index ef6c25bea062..4ff70edccf39 100644 --- a/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_test.rb +++ b/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-shopping-merchant-reviews-v1beta/test/helper.rb b/google-shopping-merchant-reviews-v1beta/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-shopping-merchant-reviews-v1beta/test/helper.rb +++ b/google-shopping-merchant-reviews-v1beta/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/.owlbot-manifest.json b/grafeas-v1/.owlbot-manifest.json index a100c1ea0817..6d1d3bdf28c1 100644 --- a/grafeas-v1/.owlbot-manifest.json +++ b/grafeas-v1/.owlbot-manifest.json @@ -98,6 +98,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/grafeas-v1/.toys.rb b/grafeas-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/grafeas-v1/.toys.rb +++ b/grafeas-v1/.toys.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/Rakefile b/grafeas-v1/Rakefile index 56fd99aa7d48..98a03bfd1e86 100644 --- a/grafeas-v1/Rakefile +++ b/grafeas-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/lib/grafeas-v1.rb b/grafeas-v1/lib/grafeas-v1.rb index f04515d3b569..05b00fa8d69e 100644 --- a/grafeas-v1/lib/grafeas-v1.rb +++ b/grafeas-v1/lib/grafeas-v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/lib/grafeas/v1.rb b/grafeas-v1/lib/grafeas/v1.rb index 4a7ff529889d..0449a2645755 100644 --- a/grafeas-v1/lib/grafeas/v1.rb +++ b/grafeas-v1/lib/grafeas/v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/lib/grafeas/v1/grafeas.rb b/grafeas-v1/lib/grafeas/v1/grafeas.rb index d332bb177f5d..9210c381b5f8 100644 --- a/grafeas-v1/lib/grafeas/v1/grafeas.rb +++ b/grafeas-v1/lib/grafeas/v1/grafeas.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/lib/grafeas/v1/grafeas/client.rb b/grafeas-v1/lib/grafeas/v1/grafeas/client.rb index 8ac48aba348b..013d9a50b78d 100644 --- a/grafeas-v1/lib/grafeas/v1/grafeas/client.rb +++ b/grafeas-v1/lib/grafeas/v1/grafeas/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/lib/grafeas/v1/grafeas/paths.rb b/grafeas-v1/lib/grafeas/v1/grafeas/paths.rb index 55abfbf5ab3c..60475490d391 100644 --- a/grafeas-v1/lib/grafeas/v1/grafeas/paths.rb +++ b/grafeas-v1/lib/grafeas/v1/grafeas/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/google/api/client.rb b/grafeas-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/grafeas-v1/proto_docs/google/api/client.rb +++ b/grafeas-v1/proto_docs/google/api/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/google/api/field_behavior.rb b/grafeas-v1/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/grafeas-v1/proto_docs/google/api/field_behavior.rb +++ b/grafeas-v1/proto_docs/google/api/field_behavior.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/google/api/launch_stage.rb b/grafeas-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/grafeas-v1/proto_docs/google/api/launch_stage.rb +++ b/grafeas-v1/proto_docs/google/api/launch_stage.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/google/api/resource.rb b/grafeas-v1/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/grafeas-v1/proto_docs/google/api/resource.rb +++ b/grafeas-v1/proto_docs/google/api/resource.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/google/protobuf/any.rb b/grafeas-v1/proto_docs/google/protobuf/any.rb index 9e50df6c6015..58691995f02e 100644 --- a/grafeas-v1/proto_docs/google/protobuf/any.rb +++ b/grafeas-v1/proto_docs/google/protobuf/any.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/google/protobuf/duration.rb b/grafeas-v1/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/grafeas-v1/proto_docs/google/protobuf/duration.rb +++ b/grafeas-v1/proto_docs/google/protobuf/duration.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/google/protobuf/empty.rb b/grafeas-v1/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/grafeas-v1/proto_docs/google/protobuf/empty.rb +++ b/grafeas-v1/proto_docs/google/protobuf/empty.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/google/protobuf/field_mask.rb b/grafeas-v1/proto_docs/google/protobuf/field_mask.rb index ebb9a5299d1c..7f3ffc78601a 100644 --- a/grafeas-v1/proto_docs/google/protobuf/field_mask.rb +++ b/grafeas-v1/proto_docs/google/protobuf/field_mask.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/google/protobuf/struct.rb b/grafeas-v1/proto_docs/google/protobuf/struct.rb index 8728b4a20517..39e1aca868d2 100644 --- a/grafeas-v1/proto_docs/google/protobuf/struct.rb +++ b/grafeas-v1/proto_docs/google/protobuf/struct.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/google/protobuf/timestamp.rb b/grafeas-v1/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/grafeas-v1/proto_docs/google/protobuf/timestamp.rb +++ b/grafeas-v1/proto_docs/google/protobuf/timestamp.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -110,14 +110,15 @@ module Protobuf # ) 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. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!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 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/grafeas-v1/proto_docs/google/rpc/status.rb b/grafeas-v1/proto_docs/google/rpc/status.rb index 05ce4dd53aa6..c1a1c07eb2db 100644 --- a/grafeas-v1/proto_docs/google/rpc/status.rb +++ b/grafeas-v1/proto_docs/google/rpc/status.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/attestation.rb b/grafeas-v1/proto_docs/grafeas/v1/attestation.rb index 96cae5d264e9..23895f01f033 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/attestation.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/attestation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/build.rb b/grafeas-v1/proto_docs/grafeas/v1/build.rb index 8cc2a7953d65..e82c88d57153 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/build.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/build.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/common.rb b/grafeas-v1/proto_docs/grafeas/v1/common.rb index 2ec97feacaa1..eabafd087790 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/common.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/common.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/compliance.rb b/grafeas-v1/proto_docs/grafeas/v1/compliance.rb index b4fc9be748c4..9c5f6037ecd1 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/compliance.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/compliance.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/cvss.rb b/grafeas-v1/proto_docs/grafeas/v1/cvss.rb index f93cee42d339..b78b9235d922 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/cvss.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/cvss.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/deployment.rb b/grafeas-v1/proto_docs/grafeas/v1/deployment.rb index 210b5caafcd5..0ac1498fd779 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/deployment.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/deployment.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/discovery.rb b/grafeas-v1/proto_docs/grafeas/v1/discovery.rb index 27c6ff4d67cc..afc178d1339c 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/discovery.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/discovery.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/dsse_attestation.rb b/grafeas-v1/proto_docs/grafeas/v1/dsse_attestation.rb index 56bb609f236b..322be7281007 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/dsse_attestation.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/dsse_attestation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/grafeas.rb b/grafeas-v1/proto_docs/grafeas/v1/grafeas.rb index f5dbd001a5be..e9e28629e628 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/grafeas.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/grafeas.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/image.rb b/grafeas-v1/proto_docs/grafeas/v1/image.rb index 1514859357f3..546d369f44fc 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/image.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/image.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/intoto_provenance.rb b/grafeas-v1/proto_docs/grafeas/v1/intoto_provenance.rb index 3636aab494d2..c808aee223da 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/intoto_provenance.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/intoto_provenance.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/intoto_statement.rb b/grafeas-v1/proto_docs/grafeas/v1/intoto_statement.rb index 42bfa8370588..290e99770158 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/intoto_statement.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/intoto_statement.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/package.rb b/grafeas-v1/proto_docs/grafeas/v1/package.rb index a70c528371e5..1b795022499a 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/package.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/package.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/provenance.rb b/grafeas-v1/proto_docs/grafeas/v1/provenance.rb index f2ba8ff02bd3..a7454aeaabbf 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/provenance.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/provenance.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/sbom.rb b/grafeas-v1/proto_docs/grafeas/v1/sbom.rb index 2a572cb03f1a..c058bcfa65f6 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/sbom.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/sbom.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2024 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/secret.rb b/grafeas-v1/proto_docs/grafeas/v1/secret.rb index cc13a8f134dd..19111283e758 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/secret.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/secret.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/severity.rb b/grafeas-v1/proto_docs/grafeas/v1/severity.rb index c429c7ad8352..49d42db38b43 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/severity.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/severity.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance.rb b/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance.rb index bb277a2229f8..de245b5e9238 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance_zero_two.rb b/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance_zero_two.rb index 78a6cc2fd48a..8cbf519a6aea 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance_zero_two.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance_zero_two.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/upgrade.rb b/grafeas-v1/proto_docs/grafeas/v1/upgrade.rb index de940f4616da..d5353ac7f060 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/upgrade.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/upgrade.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/vex.rb b/grafeas-v1/proto_docs/grafeas/v1/vex.rb index e0a5080f5389..d0cf29a1341c 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/vex.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/vex.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/proto_docs/grafeas/v1/vulnerability.rb b/grafeas-v1/proto_docs/grafeas/v1/vulnerability.rb index 1779f59c9f30..1c116d3d5f83 100644 --- a/grafeas-v1/proto_docs/grafeas/v1/vulnerability.rb +++ b/grafeas-v1/proto_docs/grafeas/v1/vulnerability.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/snippets/Gemfile b/grafeas-v1/snippets/Gemfile index 30cc273217d7..549551d9d158 100755 --- a/grafeas-v1/snippets/Gemfile +++ b/grafeas-v1/snippets/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/snippets/grafeas/batch_create_notes.rb b/grafeas-v1/snippets/grafeas/batch_create_notes.rb index cc3249012389..3dca19f5e30c 100755 --- a/grafeas-v1/snippets/grafeas/batch_create_notes.rb +++ b/grafeas-v1/snippets/grafeas/batch_create_notes.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/snippets/grafeas/batch_create_occurrences.rb b/grafeas-v1/snippets/grafeas/batch_create_occurrences.rb index 8b7508e8ab12..7fb0e10e68bd 100755 --- a/grafeas-v1/snippets/grafeas/batch_create_occurrences.rb +++ b/grafeas-v1/snippets/grafeas/batch_create_occurrences.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/snippets/grafeas/create_note.rb b/grafeas-v1/snippets/grafeas/create_note.rb index 5b982f5cc850..78afb9c5c326 100755 --- a/grafeas-v1/snippets/grafeas/create_note.rb +++ b/grafeas-v1/snippets/grafeas/create_note.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/snippets/grafeas/create_occurrence.rb b/grafeas-v1/snippets/grafeas/create_occurrence.rb index 52d7b5725011..f096444c8a9a 100755 --- a/grafeas-v1/snippets/grafeas/create_occurrence.rb +++ b/grafeas-v1/snippets/grafeas/create_occurrence.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/snippets/grafeas/delete_note.rb b/grafeas-v1/snippets/grafeas/delete_note.rb index 82f573bd2345..130f3650ad78 100755 --- a/grafeas-v1/snippets/grafeas/delete_note.rb +++ b/grafeas-v1/snippets/grafeas/delete_note.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/snippets/grafeas/delete_occurrence.rb b/grafeas-v1/snippets/grafeas/delete_occurrence.rb index 16dc38e413db..345a7bafaffb 100755 --- a/grafeas-v1/snippets/grafeas/delete_occurrence.rb +++ b/grafeas-v1/snippets/grafeas/delete_occurrence.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/snippets/grafeas/get_note.rb b/grafeas-v1/snippets/grafeas/get_note.rb index 286da5800d71..fb90bd7d7bf7 100755 --- a/grafeas-v1/snippets/grafeas/get_note.rb +++ b/grafeas-v1/snippets/grafeas/get_note.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/snippets/grafeas/get_occurrence.rb b/grafeas-v1/snippets/grafeas/get_occurrence.rb index f875db300ffb..34efaee3033e 100755 --- a/grafeas-v1/snippets/grafeas/get_occurrence.rb +++ b/grafeas-v1/snippets/grafeas/get_occurrence.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/snippets/grafeas/get_occurrence_note.rb b/grafeas-v1/snippets/grafeas/get_occurrence_note.rb index 3ce397e33f3b..eb5c20b49106 100755 --- a/grafeas-v1/snippets/grafeas/get_occurrence_note.rb +++ b/grafeas-v1/snippets/grafeas/get_occurrence_note.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/snippets/grafeas/list_note_occurrences.rb b/grafeas-v1/snippets/grafeas/list_note_occurrences.rb index 115ba9fd2da2..176aadb8a24c 100755 --- a/grafeas-v1/snippets/grafeas/list_note_occurrences.rb +++ b/grafeas-v1/snippets/grafeas/list_note_occurrences.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/snippets/grafeas/list_notes.rb b/grafeas-v1/snippets/grafeas/list_notes.rb index 0bc3748ac1b3..75a6d5fed888 100755 --- a/grafeas-v1/snippets/grafeas/list_notes.rb +++ b/grafeas-v1/snippets/grafeas/list_notes.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/snippets/grafeas/list_occurrences.rb b/grafeas-v1/snippets/grafeas/list_occurrences.rb index e2ee63ce1ab9..e23051faf761 100755 --- a/grafeas-v1/snippets/grafeas/list_occurrences.rb +++ b/grafeas-v1/snippets/grafeas/list_occurrences.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/snippets/grafeas/update_note.rb b/grafeas-v1/snippets/grafeas/update_note.rb index 032eacce27b7..7744b6a35993 100755 --- a/grafeas-v1/snippets/grafeas/update_note.rb +++ b/grafeas-v1/snippets/grafeas/update_note.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/snippets/grafeas/update_occurrence.rb b/grafeas-v1/snippets/grafeas/update_occurrence.rb index 4f2cdd081bbe..8f2301dba810 100755 --- a/grafeas-v1/snippets/grafeas/update_occurrence.rb +++ b/grafeas-v1/snippets/grafeas/update_occurrence.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/test/grafeas/v1/grafeas_paths_test.rb b/grafeas-v1/test/grafeas/v1/grafeas_paths_test.rb index 8792a0bbefcd..c1ca7ff02579 100644 --- a/grafeas-v1/test/grafeas/v1/grafeas_paths_test.rb +++ b/grafeas-v1/test/grafeas/v1/grafeas_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/test/grafeas/v1/grafeas_test.rb b/grafeas-v1/test/grafeas/v1/grafeas_test.rb index 5a1c3894f4a7..507c27f7fff2 100644 --- a/grafeas-v1/test/grafeas/v1/grafeas_test.rb +++ b/grafeas-v1/test/grafeas/v1/grafeas_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/grafeas-v1/test/helper.rb b/grafeas-v1/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/grafeas-v1/test/helper.rb +++ b/grafeas-v1/test/helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2020 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. 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 a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/Gemfile +++ /dev/null @@ -1,15 +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-reporters", "~> 1.8.0", require: false -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 4f1beddc2e88..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.2+. - -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 afc3e460298b..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.3" - 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 6275c96d4a65..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,986 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 c2f4d348be69..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,901 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 3c182bcd3f5c..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,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/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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 f57f18d6772a..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,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/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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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. - # - # Note: This field should not be used in most cases. - 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. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # 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 e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 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 ae79b2f8dceb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/proto_docs/google/type/timeofday.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 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 a day in 24 hour format. Must be greater than or equal to 0 and - # typically must be less than or equal 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 an hour. Must be greater than or equal to 0 and less than or - # equal to 59. - # @!attribute [rw] seconds - # @return [::Integer] - # Seconds of a minute. Must be greater than or equal to 0 and typically must - # be less than or equal 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 greater than or equal to 0 - # and less than or equal 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 f63413fc66b8..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 - c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_data_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_data_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_data_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_data_source({ parent: parent, data_source: data_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_data_source parent: parent, data_source: data_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_data_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_data_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.delete_data_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.fetch_data_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.fetch_data_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.fetch_data_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 0c5eb387baf5..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 - c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_data_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_data_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_data_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_data_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::DataSources::V1::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.fetch_data_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.fetch_data_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 b56ae4cdf218..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 - c = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_file_upload({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_file_upload name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_file_upload({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 f7942f012f28..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 - c = ::Google::Shopping::Merchant::DataSources::V1::FileUploadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_file_upload({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_file_upload name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -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 a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/Gemfile +++ /dev/null @@ -1,15 +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-reporters", "~> 1.8.0", require: false -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 b47788b8a8b9..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.2+. - -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 3f660cf7f2be..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.3" - 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 cca4a0d03ce0..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,982 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 dc9007d70c1f..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,897 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 07e6bed8f7cc..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,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/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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 861986ade8b7..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,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/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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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. - # - # Note: This field should not be used in most cases. - 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. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # 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 e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 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 ae79b2f8dceb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/proto_docs/google/type/timeofday.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 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 a day in 24 hour format. Must be greater than or equal to 0 and - # typically must be less than or equal 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 an hour. Must be greater than or equal to 0 and less than or - # equal to 59. - # @!attribute [rw] seconds - # @return [::Integer] - # Seconds of a minute. Must be greater than or equal to 0 and typically must - # be less than or equal 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 greater than or equal to 0 - # and less than or equal 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 a4bb34d4d813..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 - c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_data_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_data_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_data_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_data_source({ parent: parent, data_source: data_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_data_source parent: parent, data_source: data_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_data_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_data_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.delete_data_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.fetch_data_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.fetch_data_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.fetch_data_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 ba292b33871d..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 - c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_data_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_data_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_data_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_data_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::DataSources::V1beta::DataSourcesService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.fetch_data_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.fetch_data_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 5273b1043174..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 - c = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_file_upload({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_file_upload name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_file_upload({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 e3eefb76a42c..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 - c = ::Google::Shopping::Merchant::DataSources::V1beta::FileUploadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_file_upload({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_file_upload name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-data_sources-v1beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -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 a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -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 cc4c090bfc0b..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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/Gemfile +++ /dev/null @@ -1,15 +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-reporters", "~> 1.8.0", require: false -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 3c27ce22a6a6..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.2+. - -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 e8466125c2b6..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.3" - 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 4cd9f78efc30..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/inventories_common_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/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\"\xbb\n\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\x12&\n\x14local_shipping_label\x18\t \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12_\n\x10loyalty_programs\x18\n \x03(\x0b\x32@.google.shopping.merchant.inventories.v1.InventoryLoyaltyProgramB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\x0b \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\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_locationB\x17\n\x15_local_shipping_label\"\xd2\x03\n\x17InventoryLoyaltyProgram\x12\x1a\n\rprogram_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ntier_label\x18\x02 \x01(\tH\x01\x88\x01\x01\x12/\n\x05price\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x02\x88\x01\x01\x12\x41\n\x17\x63\x61shback_for_future_use\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x03\x88\x01\x01\x12\x1b\n\x0eloyalty_points\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12\x43\n\x1fmember_price_effective_interval\x18\x06 \x01(\x0b\x32\x15.google.type.IntervalH\x05\x88\x01\x01\x12\x1b\n\x0eshipping_label\x18\x07 \x01(\tH\x06\x88\x01\x01\x42\x10\n\x0e_program_labelB\r\n\x0b_tier_labelB\x08\n\x06_priceB\x1a\n\x18_cashback_for_future_useB\x11\n\x0f_loyalty_pointsB\"\n _member_price_effective_intervalB\x11\n\x0f_shipping_label\"\x89\x04\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\x12_\n\x10loyalty_programs\x18\x05 \x03(\x0b\x32@.google.shopping.merchant.inventories.v1.InventoryLoyaltyProgramB\x03\xe0\x41\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 - InventoryLoyaltyProgram = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.inventories.v1.InventoryLoyaltyProgram").msgclass - 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 2645c7e4e8dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/lib/google/shopping/merchant/inventories/v1/local_inventory_service/client.rb +++ /dev/null @@ -1,804 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url - # encoded string (RFC 4648 Section 5). The decoded string must result - # in the `content_language~feed_label~offer_id` structure. This encoding - # MUST be used if any part of the product identifier (like `offer_id`) - # contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123`, the - # `{product}` segment must be the unpadded base64url encoding of this - # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - # @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}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url - # encoded string (RFC 4648 Section 5). The decoded string must result - # in the `content_language~feed_label~offer_id` structure. This encoding - # MUST be used if any part of the product identifier (like `offer_id`) - # contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123`, the - # `{product}` segment must be the unpadded base64url encoding of this - # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - # @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}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url - # encoded string (RFC 4648 Section 5). The decoded string must result - # in the `content_language~feed_label~offer_id` structure. This encoding - # MUST be used if any part of the product identifier (like `offer_id`) - # contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123` for - # `store_code` "store123", the `{product}` segment must be the - # unpadded base64url encoding of this string, which is - # `ZW5-VVN-c2t1LzEyMw`. The full resource name for the local - # inventory would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw/localInventories/store123`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 e2aeba79f62e..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,740 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url - # encoded string (RFC 4648 Section 5). The decoded string must result - # in the `content_language~feed_label~offer_id` structure. This encoding - # MUST be used if any part of the product identifier (like `offer_id`) - # contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123`, the - # `{product}` segment must be the unpadded base64url encoding of this - # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - # @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}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url - # encoded string (RFC 4648 Section 5). The decoded string must result - # in the `content_language~feed_label~offer_id` structure. This encoding - # MUST be used if any part of the product identifier (like `offer_id`) - # contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123`, the - # `{product}` segment must be the unpadded base64url encoding of this - # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - # @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}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url - # encoded string (RFC 4648 Section 5). The decoded string must result - # in the `content_language~feed_label~offer_id` structure. This encoding - # MUST be used if any part of the product identifier (like `offer_id`) - # contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123` for - # `store_code` "store123", the `{product}` segment must be the - # unpadded base64url encoding of this string, which is - # `ZW5-VVN-c2t1LzEyMw`. The full resource name for the local - # inventory would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw/localInventories/store123`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 2c1b21fb1f82..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}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an - # **unpadded base64url** encoded string (RFC 4648 Section 5). The - # decoded string - # must result in the `content_language~feed_label~offer_id` structure. - # This encoding MUST be used if any part of the product identifier (like - # `offer_id`) contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123`, the - # `{product}` segment must be the unpadded base64url encoding of this - # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - # @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}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an - # **unpadded base64url** encoded string (RFC 4648 Section 5). The - # decoded string - # must result in the `content_language~feed_label~offer_id` structure. - # This encoding MUST be used if any part of the product identifier (like - # `offer_id`) contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123` for - # `region` "region123", the `{product}` segment must be the - # unpadded base64url encoding of this string, which is - # `ZW5-VVN-c2t1LzEyMw`. The full resource name for the regional - # inventory would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw/regionalInventories/region123`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 28aac8e58f05..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,743 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an - # **unpadded base64url** encoded string (RFC 4648 Section 5). The - # decoded string - # must result in the `content_language~feed_label~offer_id` structure. - # This encoding MUST be used if any part of the product identifier (like - # `offer_id`) contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123`, the - # `{product}` segment must be the unpadded base64url encoding of this - # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - # @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}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an - # **unpadded base64url** encoded string (RFC 4648 Section 5). The - # decoded string - # must result in the `content_language~feed_label~offer_id` structure. - # This encoding MUST be used if any part of the product identifier (like - # `offer_id`) contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123`, the - # `{product}` segment must be the unpadded base64url encoding of this - # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - # @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}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an - # **unpadded base64url** encoded string (RFC 4648 Section 5). The - # decoded string - # must result in the `content_language~feed_label~offer_id` structure. - # This encoding MUST be used if any part of the product identifier (like - # `offer_id`) contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123` for - # `region` "region123", the `{product}` segment must be the - # unpadded base64url encoding of this string, which is - # `ZW5-VVN-c2t1LzEyMw`. The full resource name for the regional - # inventory would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw/regionalInventories/region123`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 7e02d841d316..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\"\xdf\x02\n\x11RegionalInventory\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12 \n\x13\x62\x61se64_encoded_name\x18\n \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 a34fa6d2d41d..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 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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. - # - # Note: This field should not be used in most cases. - 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. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # 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 e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 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 343776d38b25..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/inventories_common.rb +++ /dev/null @@ -1,275 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # @!attribute [rw] local_shipping_label - # @return [::String] - # Optional. Specifies a label associated with the shipping for the - # `LocalInventory` resource. Can be used to group local shipping services to - # this particular inventory item. For accepted field format, see the [Local - # delivery](https://support.google.com/merchants/answer/14819809#localdelivery) - # @!attribute [rw] loyalty_programs - # @return [::Array<::Google::Shopping::Merchant::Inventories::V1::InventoryLoyaltyProgram>] - # Optional. An optional list of loyalty programs containing applicable - # loyalty member prices for this product at this store. - # - # This field is used to show store-specific member prices on Local - # Inventory Ads (LIA). - # - # To use this, the loyalty program must be configured in Google Merchant - # Center. The benefits provided must match the merchant's website and be - # clear to members. This is only applicable for merchants in supported - # countries. - # - # See [Loyalty program](https://support.google.com/merchants/answer/12922446) - # for details on supported countries and loyalty program configuration. - # For local inventory specific details, see the [Local inventory data - # specification](https://support.google.com/merchants/answer/3061342). - # @!attribute [rw] custom_attributes - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Optional. A list of custom (merchant-provided) attributes. It can also be - # used for submitting any attribute of the data specification in its generic - # form (for example, `{ "name": "size type", "value": "regular" }`). This is - # useful for submitting attributes not explicitly exposed by the API. Maximum - # allowed number of characters for each custom attribute is 10240 (represents - # sum of characters for name and value). Maximum 2500 custom attributes can - # be set, with total size of 102.4kB. Underscores in custom - # attribute names are replaced by spaces upon insertion. - 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 - - # A message that represents loyalty program. - # @!attribute [rw] program_label - # @return [::String] - # The label of the loyalty program. This is an internal label that uniquely - # identifies the relationship between a business entity and a loyalty - # program entity. The label must be provided if there are multiple loyalty - # programs available for the merchant, so that the system can associate - # the assets below (for example, price and points) with the correct business. - # The corresponding program must be linked to the Merchant Center account. - # @!attribute [rw] tier_label - # @return [::String] - # The label of the tier within the loyalty program. - # Must match one of the labels within the program. - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # The price for members of the given tier, that is, the instant discount - # price. Must be smaller or equal to the regular price. - # @!attribute [rw] cashback_for_future_use - # @return [::Google::Shopping::Type::Price] - # The cashback that can be used for future purchases. - # @!attribute [rw] loyalty_points - # @return [::Integer] - # The amount of loyalty points earned on a purchase. - # @!attribute [rw] member_price_effective_interval - # @return [::Google::Type::Interval] - # A date range during which the item is eligible for member price. If not - # specified, the member price is always applicable. The date range is - # represented by a pair of ISO 8601 dates separated by a space, - # comma, or slash. - # @!attribute [rw] shipping_label - # @return [::String] - # The label of the shipping benefit. If the field has value, this offer has - # loyalty shipping benefit. If the field value isn't provided, the item is - # not eligible for loyalty shipping for the given loyalty tier. - class InventoryLoyaltyProgram - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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. - # @!attribute [rw] loyalty_programs - # @return [::Array<::Google::Shopping::Merchant::Inventories::V1::InventoryLoyaltyProgram>] - # Optional. An optional list of loyalty programs containing applicable - # loyalty member prices for this product in this region. - # - # This field is used to show region-specific member prices on Product - # Listing Ads (PLA). - # - # To use this, the loyalty program must be configured in Google Merchant - # Center, and the merchant must be using the Regional Availability and - # Pricing (RAAP) feature. The benefits provided must match the merchant's - # website and be clear to members. This is only applicable for merchants in - # supported countries. - # - # See [Loyalty program](https://support.google.com/merchants/answer/12922446) - # for details on supported countries and loyalty program configuration. - # Also see [Regional availability and - # pricing](https://support.google.com/merchants/answer/14644124) and [How to - # set up regional member - # pricing](https://support.google.com/merchants/answer/16388178) for more - # information. - 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 599f2ebc4939..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/localinventory.rb +++ /dev/null @@ -1,258 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url - # encoded string (RFC 4648 Section 5). The decoded string must result - # in the `content_language~feed_label~offer_id` structure. This encoding - # MUST be used if any part of the product identifier (like `offer_id`) - # contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123` for - # `store_code` "store123", the `{product}` segment must be the - # base64url encoding of this string, which is `ZW5-VVN-c2t1LzEyMw`. - # The full resource name for the local inventory would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw/localInventories/store123`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - # @!attribute [r] base64_encoded_name - # @return [::String] - # Output only. The unpadded base64url encoded name of the `LocalInventory` - # resource. Format: - # `accounts/{account}/products/{product}/localInventories/{store_code}` - # where the `{product}` segment is the unpadded base64url encoded value of - # the identifier of the form `content_language~feed_label~offer_id`. Example: - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw/localInventories/store123` for - # the decoded product ID `en~US~sku/123` and `store_code` "store123". - # Can be used directly as input to the API methods that require the local - # product identifier within the local inventory name to be encoded if it - # contains special characters, for example - # [`GetLocalInventory`](https://developers.google.com/merchant/api/reference/rest/inventories_v1/accounts.products.localInventories/get). - # @!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}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url - # encoded string (RFC 4648 Section 5). The decoded string must result - # in the `content_language~feed_label~offer_id` structure. This encoding - # MUST be used if any part of the product identifier (like `offer_id`) - # contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123`, the - # `{product}` segment must be the unpadded base64url encoding of this - # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - # @!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}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url - # encoded string (RFC 4648 Section 5). The decoded string must result - # in the `content_language~feed_label~offer_id` structure. This encoding - # MUST be used if any part of the product identifier (like `offer_id`) - # contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123`, the - # `{product}` segment must be the unpadded base64url encoding of this - # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - # @!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}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url - # encoded string (RFC 4648 Section 5). The decoded string must result - # in the `content_language~feed_label~offer_id` structure. This encoding - # MUST be used if any part of the product identifier (like `offer_id`) - # contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123` for - # `store_code` "store123", the `{product}` segment must be the - # unpadded base64url encoding of this string, which is - # `ZW5-VVN-c2t1LzEyMw`. The full resource name for the local - # inventory would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw/localInventories/store123`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - 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 f81670c3624d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/proto_docs/google/shopping/merchant/inventories/v1/regionalinventory.rb +++ /dev/null @@ -1,262 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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: - # `accounts/{account}/products/{product}/regionalInventories/{region}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an - # **unpadded base64url** encoded string (RFC 4648 Section 5). The - # decoded string - # must result in the `content_language~feed_label~offer_id` structure. - # This encoding MUST be used if any part of the product identifier - # (like `offer_id`) contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123` for - # `region` "region123", the `{product}` segment must be the - # unpadded base64url encoding of this string, which is - # `ZW5-VVN-c2t1LzEyMw`. The full resource name for the regional - # inventory would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw/regionalInventories/region123`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - # @!attribute [r] base64_encoded_name - # @return [::String] - # Output only. The unpadded base64url encoded name of the `RegionalInventory` - # resource. Format: - # `accounts/{account}/products/{product}/regionalInventories/{region}` - # where the `{product}` segment is the unpadded base64url encoded value of - # the identifier of the form `content_language~feed_label~offer_id`. Example: - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw/regionalInventories/region123` - # for the decoded product ID `en~US~sku/123` and `region` "region123". - # Can be used directly as input to the API methods that require the product - # identifier within the regional inventory name to be encoded if it contains - # special characters, for example - # [`GetRegionalInventory`](https://developers.google.com/merchant/api/reference/rest/inventories_v1/accounts.products.regionalInventories/get). - # @!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}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an - # **unpadded base64url** encoded string (RFC 4648 Section 5). The - # decoded string - # must result in the `content_language~feed_label~offer_id` structure. - # This encoding MUST be used if any part of the product identifier (like - # `offer_id`) contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123`, the - # `{product}` segment must be the unpadded base64url encoding of this - # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - # @!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}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an - # **unpadded base64url** encoded string (RFC 4648 Section 5). The - # decoded string - # must result in the `content_language~feed_label~offer_id` structure. - # This encoding MUST be used if any part of the product identifier (like - # `offer_id`) contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123`, the - # `{product}` segment must be the unpadded base64url encoding of this - # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - # @!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}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an - # **unpadded base64url** encoded string (RFC 4648 Section 5). The - # decoded string - # must result in the `content_language~feed_label~offer_id` structure. - # This encoding MUST be used if any part of the product identifier (like - # `offer_id`) contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123` for - # `region` "region123", the `{product}` segment must be the - # unpadded base64url encoding of this string, which is - # `ZW5-VVN-c2t1LzEyMw`. The full resource name for the regional - # inventory would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw/regionalInventories/region123`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - 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 cc3d665700a7..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 - c = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.insert_local_inventory({ parent: parent, local_inventory: local_inventory }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.insert_local_inventory parent: parent, local_inventory: local_inventory do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_local_inventory({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_local_inventory name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.delete_local_inventory({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 2a97b2e734f2..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 - c = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Inventories::V1::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_local_inventory({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_local_inventory name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 956e9efb879b..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 - c = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.insert_regional_inventory parent: parent, regional_inventory: regional_inventory do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_regional_inventory({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_regional_inventory name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.delete_regional_inventory({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 5ab3fae5d3ec..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 - c = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Inventories::V1::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_regional_inventory({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_regional_inventory name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -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 a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/Gemfile +++ /dev/null @@ -1,15 +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-reporters", "~> 1.8.0", require: false -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 8a2908d49ce2..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.2+. - -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 b37d62068b1a..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.3" - 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 2cb3128b8259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/local_inventory_service/client.rb +++ /dev/null @@ -1,713 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 6105a3089fc5..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,649 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 8af0976307d7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/lib/google/shopping/merchant/inventories/v1beta/regional_inventory_service/client.rb +++ /dev/null @@ -1,713 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 9c96e6a4e3fb..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,649 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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. - # - # Note: This field should not be used in most cases. - 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. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # 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 e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 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 fc75a2ff3e0a..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 - c = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.insert_local_inventory({ parent: parent, local_inventory: local_inventory }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.insert_local_inventory parent: parent, local_inventory: local_inventory do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_local_inventory({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_local_inventory name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.delete_local_inventory({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 b3f2fee3ed76..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 - c = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Inventories::V1beta::LocalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_local_inventory({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_local_inventory name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 edc58c92909e..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 - c = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.insert_regional_inventory({ parent: parent, regional_inventory: regional_inventory }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.insert_regional_inventory parent: parent, regional_inventory: regional_inventory do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_regional_inventory({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_regional_inventory name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.delete_regional_inventory({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 0551785ca15f..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 - c = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Inventories::V1beta::RegionalInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_regional_inventory({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_regional_inventory name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-inventories-v1beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -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 a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/Gemfile +++ /dev/null @@ -1,15 +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-reporters", "~> 1.8.0", require: false -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 0e55a1b6603e..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.2+. - -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 f388fc0cac34..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.3" - 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 61ff156b018a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_inventory_service/client.rb +++ /dev/null @@ -1,490 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 6e9ad4fb85f1..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,440 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 eef0c55ca85f..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,490 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 482e0cbd2328..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,440 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 a8406a9dec29..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_sale_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/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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 71278670c277..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,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/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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 1bad7568af34..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/lib/google/shopping/merchant/lfp/v1/lfp_store_service/client.rb +++ /dev/null @@ -1,790 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 56eb0e4cde57..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,719 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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. - # - # Note: This field should not be used in most cases. - 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. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # 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 e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 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 dcdf1cd1b083..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 - c = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.insert_lfp_inventory parent: parent, lfp_inventory: lfp_inventory do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 5c36ee191dfa..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 - c = ::Google::Shopping::Merchant::Lfp::V1::LfpInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 36156e43d1db..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 - c = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_lfp_merchant_state({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_lfp_merchant_state name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_lfp_merchant_state({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 9d694596fd33..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 - c = ::Google::Shopping::Merchant::Lfp::V1::LfpMerchantStateService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_lfp_merchant_state({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_lfp_merchant_state name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 da5baa8e268a..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 - c = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.insert_lfp_sale parent: parent, lfp_sale: lfp_sale do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 2d324c4c2adf..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 - c = ::Google::Shopping::Merchant::Lfp::V1::LfpSaleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 6d6cbea7f0ba..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 - c = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_lfp_store({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_lfp_store name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_lfp_store({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.insert_lfp_store({ parent: parent, lfp_store: lfp_store }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.insert_lfp_store parent: parent, lfp_store: lfp_store do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_lfp_store({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_lfp_store name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.delete_lfp_store({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 fa83999a569e..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 - c = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_lfp_store({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_lfp_store name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_lfp_store({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_lfp_store name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Lfp::V1::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -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 a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -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 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/Gemfile +++ /dev/null @@ -1,15 +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-reporters", "~> 1.8.0", require: false -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 36ee1b680f35..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.2+. - -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 8322180154fd..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.3" - 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 58a25ac8b760..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_inventory_service/client.rb +++ /dev/null @@ -1,490 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 695e9d0f9956..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,440 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 63d2f1e2263d..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,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/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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 82c37093cb60..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,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/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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 a78dda9291c3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_sale_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/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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 35f2538fb657..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,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/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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 5ada1ecaad0d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/lib/google/shopping/merchant/lfp/v1beta/lfp_store_service/client.rb +++ /dev/null @@ -1,790 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 801305157379..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,719 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `: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 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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. - # - # Note: This field should not be used in most cases. - 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. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # 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 e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 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 1a89155b8838..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 - c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.insert_lfp_inventory({ parent: parent, lfp_inventory: lfp_inventory }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.insert_lfp_inventory parent: parent, lfp_inventory: lfp_inventory do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 e4619028814e..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 - c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpInventoryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 7120754f821d..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 - c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_lfp_merchant_state({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_lfp_merchant_state name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_lfp_merchant_state({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 5f3930141820..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 - c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpMerchantStateService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_lfp_merchant_state({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_lfp_merchant_state name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 a13f00e79029..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 - c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.insert_lfp_sale({ parent: parent, lfp_sale: lfp_sale }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.insert_lfp_sale parent: parent, lfp_sale: lfp_sale do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 0f7ebded18a3..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 - c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpSaleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 d68255231ead..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 - c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_lfp_store({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_lfp_store name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.get_lfp_store({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.insert_lfp_store({ parent: parent, lfp_store: lfp_store }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.insert_lfp_store parent: parent, lfp_store: lfp_store do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_lfp_store({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_lfp_store name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.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 - c.delete_lfp_store({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.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 - c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 6d86669d5067..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 - c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_lfp_store({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_lfp_store name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_lfp_store({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_lfp_store name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.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 - c.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 - c.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 - c = ::Google::Shopping::Merchant::Lfp::V1beta::LfpStoreService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.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 - c.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 - c.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 - c.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 - c.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 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-lfp-v1beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -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-products-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-products-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -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-products-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-products-v1/.repo-metadata.json deleted file mode 100644 index bc63d9fc9827..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1", - "distribution_name": "google-shopping-merchant-products-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-products-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-products 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-products-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-products-v1/.rubocop.yml deleted file mode 100644 index 91f3efe88e94..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-products-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-products-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-products-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-products-v1/.yardopts deleted file mode 100644 index dc7bbc10ae29..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-products-v1/AUTHENTICATION.md deleted file mode 100644 index 48d9c7121a41..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-products-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-products-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/products/v1" - -client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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/products/v1" - -::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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-products-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/products/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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-products-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-products-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-products-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/Gemfile +++ /dev/null @@ -1,15 +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-reporters", "~> 1.8.0", require: false -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-products-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-products-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1/README.md b/owl-bot-staging/google-shopping-merchant-products-v1/README.md deleted file mode 100644 index 75c9d80e5ef9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products](https://rubygems.org/gems/google-shopping-merchant-products). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-products-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/products/v1" - -client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new -request = ::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new # (request fields as keyword arguments...) -response = client.insert_product_input request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-products-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/products/v1" -require "logger" - -client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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.2+. - -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-products`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-products-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-products`. -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-products-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-products-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-products-v1/Rakefile deleted file mode 100644 index 4a3b723c7342..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-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/products/v1/product_inputs_service/credentials" - ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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-products-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-products-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-products-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-products-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-products-v1" - header "google-shopping-merchant-products-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-products-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-products-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-products-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-products-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-products-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-products-v1/gapic_metadata.json deleted file mode 100644 index 9fedefc193f1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/gapic_metadata.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.products.v1", - "libraryPackage": "::Google::Shopping::Merchant::Products::V1", - "services": { - "ProductInputsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client", - "rpcs": { - "InsertProductInput": { - "methods": [ - "insert_product_input" - ] - }, - "UpdateProductInput": { - "methods": [ - "update_product_input" - ] - }, - "DeleteProductInput": { - "methods": [ - "delete_product_input" - ] - } - } - } - } - }, - "ProductsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Products::V1::ProductsService::Client", - "rpcs": { - "GetProduct": { - "methods": [ - "get_product" - ] - }, - "ListProducts": { - "methods": [ - "list_products" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/google-shopping-merchant-products-v1.gemspec b/owl-bot-staging/google-shopping-merchant-products-v1/google-shopping-merchant-products-v1.gemspec deleted file mode 100644 index f60dc255c79c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/google-shopping-merchant-products-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/products/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-products-v1" - gem.version = Google::Shopping::Merchant::Products::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-products-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-products 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.3" - 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-products-v1/lib/google-shopping-merchant-products-v1.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google-shopping-merchant-products-v1.rb deleted file mode 100644 index 03a904782651..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google-shopping-merchant-products-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/products/v1" diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1.rb deleted file mode 100644 index cbcaa48f9328..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/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/products/v1/product_inputs_service" -require "google/shopping/merchant/products/v1/products_service" -require "google/shopping/merchant/products/v1/version" - -module Google - module Shopping - module Merchant - module Products - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/products/v1" - # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/products/v1" - # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/shopping/merchant/products/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service.rb deleted file mode 100644 index 35b9b48149cb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_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/products/v1/version" - -require "google/shopping/merchant/products/v1/product_inputs_service/credentials" -require "google/shopping/merchant/products/v1/product_inputs_service/paths" -require "google/shopping/merchant/products/v1/product_inputs_service/client" -require "google/shopping/merchant/products/v1/product_inputs_service/rest" - -module Google - module Shopping - module Merchant - module Products - module V1 - ## - # Service to use ProductInput resource. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/products/v1/product_inputs_service" - # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/products/v1/product_inputs_service/rest" - # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new - # - module ProductInputsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "product_inputs_service", "helpers.rb" -require "google/shopping/merchant/products/v1/product_inputs_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/client.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/client.rb deleted file mode 100644 index f801a523c825..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/client.rb +++ /dev/null @@ -1,765 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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/products/v1/productinputs_pb" - -module Google - module Shopping - module Merchant - module Products - module V1 - module ProductInputsService - ## - # Client for the ProductInputsService service. - # - # Service to use ProductInput resource. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :product_inputs_service_stub - - ## - # Configure the ProductInputsService Client class. - # - # See {::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ProductInputsService clients - # ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.configure do |config| - # config.timeout = 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", "Products", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.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 ProductInputsService Client instance. - # - # The configuration is set to the derived mode, meaning that values 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::Products::V1::ProductInputsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @product_inputs_service_stub.universe_domain - end - - ## - # Create a new ProductInputsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ProductInputsService 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/products/v1/productinputs_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 - - @product_inputs_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @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 - @product_inputs_service_stub.logger - end - - # Service calls - - ## - # [Uploads a product input to your Merchant Center - # account](/merchant/api/guides/products/add-manage#add_a_product). You - # must have a products [data - # source](/merchant/api/guides/data-sources/api-sources#create-primary-data-source) - # to be able to insert a product. The unique identifier of the data source is - # passed as a query parameter in the request URL. - # - # If a product input with the same contentLanguage, offerId, and dataSource - # already exists, then the product input inserted by this method replaces - # that entry. - # - # After inserting, updating, or deleting a product input, it may take several - # minutes before the processed product can be retrieved. - # - # @overload insert_product_input(request, options = nil) - # Pass arguments to `insert_product_input` via a request object, either of type - # {::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_product_input(parent: nil, product_input: nil, data_source: nil) - # Pass arguments to `insert_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 product will be inserted. - # Format: `accounts/{account}` - # @param product_input [::Google::Shopping::Merchant::Products::V1::ProductInput, ::Hash] - # Required. The product input to insert. - # @param data_source [::String] - # Required. The primary or supplemental product data source name. If the - # product already exists and data source provided is different, then the - # product will be moved to a new data source. For more information, see - # [Create a primary data - # source](/merchant/api/guides/data-sources/api-sources#create-primary-data-source). - # - # Only API data sources are supported. - # - # Format: `accounts/{account}/dataSources/{datasource}`. For example, - # `accounts/123456/dataSources/104628`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Products::V1::ProductInput] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/products/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new - # - # # Call the insert_product_input method. - # result = client.insert_product_input request - # - # # The returned object is of type Google::Shopping::Merchant::Products::V1::ProductInput. - # p result - # - def insert_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest - - # Converts hash and nil to 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_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::Merchant::Products::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_product_input.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_inputs_service_stub.call_rpc :insert_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 product input in your Merchant Center account. - # The name of the product input to update is taken from the `name` field - # within the `ProductInput` resource. - # - # After inserting, updating, or deleting a product input, it may take several - # minutes before the processed product can be retrieved. - # - # @overload update_product_input(request, options = nil) - # Pass arguments to `update_product_input` via a request object, either of type - # {::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_product_input(product_input: nil, update_mask: nil, data_source: nil) - # Pass arguments to `update_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 product_input [::Google::Shopping::Merchant::Products::V1::ProductInput, ::Hash] - # Required. The product input resource to update. Information you submit will - # be applied to the processed product as well. The `name` field within this - # resource identifies the product input to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of 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 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 product replacement is not supported. - # @param data_source [::String] - # Required. The primary or supplemental product data source where - # `data_source` name identifies the product input to be updated. - # - # Only API data sources are supported. - # - # Format: `accounts/{account}/dataSources/{datasource}`. For example, - # `accounts/123456/dataSources/104628`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Products::V1::ProductInput] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/products/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new - # - # # Call the update_product_input method. - # result = client.update_product_input request - # - # # The returned object is of type Google::Shopping::Merchant::Products::V1::ProductInput. - # p result - # - def update_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_product_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::Merchant::Products::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.product_input&.name - header_params["product_input.name"] = request.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_product_input.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_inputs_service_stub.call_rpc :update_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 product input from your Merchant Center account. - # - # After inserting, updating, or deleting a product input, it may take several - # minutes before the processed product can be retrieved. - # - # @overload delete_product_input(request, options = nil) - # Pass arguments to `delete_product_input` via a request object, either of type - # {::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_product_input(name: nil, data_source: nil) - # Pass arguments to `delete_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 product input to delete. - # Format: `accounts/{account}/productInputs/{productInput}` - # - # The \\{productInput} segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the \\{productInput} segment in the URL is automatically - # detected by the server, supporting two options: - # - # 1. **Encoded Format**: The `{productInput}` segment is an unpadded - # base64url - # encoded string (RFC 4648 Section 5). The decoded string must result - # in the `content_language~feed_label~offer_id` structure. This encoding - # MUST be used if any part of the product identifier (like `offer_id`) - # contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123`, the - # `{productInput}` segment must be the unpadded base64url encoding of - # this string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw`. - # - # 2. **Plain Format**: The `{productInput}` segment is the tilde-separated - # string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{productInput}` segment is used - # to differentiate between the two formats. - # @param data_source [::String] - # Required. The primary or supplemental data source from which the product - # input should be deleted. Format: - # `accounts/{account}/dataSources/{datasource}`. For example, - # `accounts/123456/dataSources/104628`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::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/products/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new - # - # # Call the delete_product_input method. - # result = client.delete_product_input request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_product_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::Merchant::Products::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_product_input.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_inputs_service_stub.call_rpc :delete_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 ProductInputsService API. - # - # This class represents the configuration for ProductInputsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_product_input to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_product_input.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_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::Merchant::Products::V1::ProductInputsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ProductInputsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `insert_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_product_input - ## - # RPC-specific configuration for `update_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :update_product_input - ## - # RPC-specific configuration for `delete_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_product_input - - # @private - def initialize parent_rpcs = nil - insert_product_input_config = parent_rpcs.insert_product_input if parent_rpcs.respond_to? :insert_product_input - @insert_product_input = ::Gapic::Config::Method.new insert_product_input_config - update_product_input_config = parent_rpcs.update_product_input if parent_rpcs.respond_to? :update_product_input - @update_product_input = ::Gapic::Config::Method.new update_product_input_config - delete_product_input_config = parent_rpcs.delete_product_input if parent_rpcs.respond_to? :delete_product_input - @delete_product_input = ::Gapic::Config::Method.new delete_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-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/credentials.rb deleted file mode 100644 index 2dab97788402..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_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 Products - module V1 - module ProductInputsService - # Credentials for the ProductInputsService 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-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/paths.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/paths.rb deleted file mode 100644 index b4569174dc31..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_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 Products - module V1 - module ProductInputsService - # Path helper methods for the ProductInputsService 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 ProductInput resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/productInputs/{productinput}` - # - # @param account [String] - # @param productinput [String] - # - # @return [::String] - def product_input_path account:, productinput: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/productInputs/#{productinput}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest.rb deleted file mode 100644 index c06b76bc7cc0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_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/products/v1/version" - -require "google/shopping/merchant/products/v1/product_inputs_service/credentials" -require "google/shopping/merchant/products/v1/product_inputs_service/paths" -require "google/shopping/merchant/products/v1/product_inputs_service/rest/client" - -module Google - module Shopping - module Merchant - module Products - module V1 - ## - # Service to use ProductInput resource. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/products/v1/product_inputs_service/rest" - # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new - # - module ProductInputsService - # 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/products/v1/product_inputs_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/client.rb deleted file mode 100644 index 7c00d8232192..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/client.rb +++ /dev/null @@ -1,701 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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/products/v1/productinputs_pb" -require "google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Products - module V1 - module ProductInputsService - module Rest - ## - # REST client for the ProductInputsService service. - # - # Service to use ProductInput resource. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :product_inputs_service_stub - - ## - # Configure the ProductInputsService Client class. - # - # See {::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ProductInputsService clients - # ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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", "Products", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.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 ProductInputsService Client instance. - # - # The configuration is set to the derived mode, meaning that values 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::Products::V1::ProductInputsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @product_inputs_service_stub.universe_domain - end - - ## - # Create a new ProductInputsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ProductInputsService 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 - - @product_inputs_service_stub = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @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 - @product_inputs_service_stub.logger - end - - # Service calls - - ## - # [Uploads a product input to your Merchant Center - # account](/merchant/api/guides/products/add-manage#add_a_product). You - # must have a products [data - # source](/merchant/api/guides/data-sources/api-sources#create-primary-data-source) - # to be able to insert a product. The unique identifier of the data source is - # passed as a query parameter in the request URL. - # - # If a product input with the same contentLanguage, offerId, and dataSource - # already exists, then the product input inserted by this method replaces - # that entry. - # - # After inserting, updating, or deleting a product input, it may take several - # minutes before the processed product can be retrieved. - # - # @overload insert_product_input(request, options = nil) - # Pass arguments to `insert_product_input` via a request object, either of type - # {::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_product_input(parent: nil, product_input: nil, data_source: nil) - # Pass arguments to `insert_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 product will be inserted. - # Format: `accounts/{account}` - # @param product_input [::Google::Shopping::Merchant::Products::V1::ProductInput, ::Hash] - # Required. The product input to insert. - # @param data_source [::String] - # Required. The primary or supplemental product data source name. If the - # product already exists and data source provided is different, then the - # product will be moved to a new data source. For more information, see - # [Create a primary data - # source](/merchant/api/guides/data-sources/api-sources#create-primary-data-source). - # - # Only API data sources are supported. - # - # Format: `accounts/{account}/dataSources/{datasource}`. For example, - # `accounts/123456/dataSources/104628`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Products::V1::ProductInput] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/products/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new - # - # # Call the insert_product_input method. - # result = client.insert_product_input request - # - # # The returned object is of type Google::Shopping::Merchant::Products::V1::ProductInput. - # p result - # - def insert_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest - - # Converts hash and nil to an 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_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::Merchant::Products::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_product_input.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_inputs_service_stub.insert_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 product input in your Merchant Center account. - # The name of the product input to update is taken from the `name` field - # within the `ProductInput` resource. - # - # After inserting, updating, or deleting a product input, it may take several - # minutes before the processed product can be retrieved. - # - # @overload update_product_input(request, options = nil) - # Pass arguments to `update_product_input` via a request object, either of type - # {::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_product_input(product_input: nil, update_mask: nil, data_source: nil) - # Pass arguments to `update_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 product_input [::Google::Shopping::Merchant::Products::V1::ProductInput, ::Hash] - # Required. The product input resource to update. Information you submit will - # be applied to the processed product as well. The `name` field within this - # resource identifies the product input to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of 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 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 product replacement is not supported. - # @param data_source [::String] - # Required. The primary or supplemental product data source where - # `data_source` name identifies the product input to be updated. - # - # Only API data sources are supported. - # - # Format: `accounts/{account}/dataSources/{datasource}`. For example, - # `accounts/123456/dataSources/104628`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Products::V1::ProductInput] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/products/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new - # - # # Call the update_product_input method. - # result = client.update_product_input request - # - # # The returned object is of type Google::Shopping::Merchant::Products::V1::ProductInput. - # p result - # - def update_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_product_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::Merchant::Products::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_product_input.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_inputs_service_stub.update_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 product input from your Merchant Center account. - # - # After inserting, updating, or deleting a product input, it may take several - # minutes before the processed product can be retrieved. - # - # @overload delete_product_input(request, options = nil) - # Pass arguments to `delete_product_input` via a request object, either of type - # {::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_product_input(name: nil, data_source: nil) - # Pass arguments to `delete_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 product input to delete. - # Format: `accounts/{account}/productInputs/{productInput}` - # - # The \\{productInput} segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the \\{productInput} segment in the URL is automatically - # detected by the server, supporting two options: - # - # 1. **Encoded Format**: The `{productInput}` segment is an unpadded - # base64url - # encoded string (RFC 4648 Section 5). The decoded string must result - # in the `content_language~feed_label~offer_id` structure. This encoding - # MUST be used if any part of the product identifier (like `offer_id`) - # contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123`, the - # `{productInput}` segment must be the unpadded base64url encoding of - # this string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw`. - # - # 2. **Plain Format**: The `{productInput}` segment is the tilde-separated - # string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{productInput}` segment is used - # to differentiate between the two formats. - # @param data_source [::String] - # Required. The primary or supplemental data source from which the product - # input should be deleted. Format: - # `accounts/{account}/dataSources/{datasource}`. For example, - # `accounts/123456/dataSources/104628`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @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/products/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new - # - # # Call the delete_product_input method. - # result = client.delete_product_input request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_product_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::Merchant::Products::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_product_input.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_inputs_service_stub.delete_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 ProductInputsService REST API. - # - # This class represents the configuration for ProductInputsService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_product_input to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_product_input.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the ProductInputsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `insert_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_product_input - ## - # RPC-specific configuration for `update_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :update_product_input - ## - # RPC-specific configuration for `delete_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_product_input - - # @private - def initialize parent_rpcs = nil - insert_product_input_config = parent_rpcs.insert_product_input if parent_rpcs.respond_to? :insert_product_input - @insert_product_input = ::Gapic::Config::Method.new insert_product_input_config - update_product_input_config = parent_rpcs.update_product_input if parent_rpcs.respond_to? :update_product_input - @update_product_input = ::Gapic::Config::Method.new update_product_input_config - delete_product_input_config = parent_rpcs.delete_product_input if parent_rpcs.respond_to? :delete_product_input - @delete_product_input = ::Gapic::Config::Method.new delete_product_input_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-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub.rb deleted file mode 100644 index 0fe81f05e2e3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/rest/service_stub.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 "google/shopping/merchant/products/v1/productinputs_pb" - -module Google - module Shopping - module Merchant - module Products - module V1 - module ProductInputsService - module Rest - ## - # REST service stub for the ProductInputsService 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_product_input REST call - # - # @param request_pb [::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Products::V1::ProductInput] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] - # A result object deserialized from the server's reply - def insert_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_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_product_input", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Products::V1::ProductInput.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_product_input REST call - # - # @param request_pb [::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Products::V1::ProductInput] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] - # A result object deserialized from the server's reply - def update_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_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_product_input", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Products::V1::ProductInput.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_product_input REST call - # - # @param request_pb [::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_product_input request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_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_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_product_input REST call - # - # @param request_pb [::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest] - # 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_product_input_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/products/v1/{parent}/productInputs:insert", - body: "product_input", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_product_input REST call - # - # @param request_pb [::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_product_input_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/products/v1/{product_input.name}", - body: "product_input", - matches: [ - ["product_input.name", %r{^accounts/[^/]+/productInputs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_product_input REST call - # - # @param request_pb [::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_product_input_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/products/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/productInputs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/productinputs_pb.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/productinputs_pb.rb deleted file mode 100644 index e6c050a93886..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/productinputs_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/products/v1/productinputs.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/products/v1/products_common_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n8google/shopping/merchant/products/v1/productinputs.proto\x12$google.shopping.merchant.products.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/products/v1/products_common.proto\x1a google/shopping/type/types.proto\"\xc6\x04\n\x0cProductInput\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12 \n\x13\x62\x61se64_encoded_name\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07product\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16\x62\x61se64_encoded_product\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0clegacy_local\x18\n \x01(\x08\x42\x03\xe0\x41\x05\x12\x18\n\x08offer_id\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\x12\x1a\n\nfeed_label\x18\x06 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12#\n\x0eversion_number\x18\x07 \x01(\x03\x42\x06\xe0\x41\x01\xe0\x41\x05H\x00\x88\x01\x01\x12X\n\x12product_attributes\x18\x0b \x01(\x0b\x32\x37.google.shopping.merchant.products.v1.ProductAttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\t \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01:z\xea\x41w\n\'merchantapi.googleapis.com/ProductInput\x12/accounts/{account}/productInputs/{productinput}*\rproductInputs2\x0cproductInputB\x11\n\x0f_version_number\"\xc1\x01\n\x19InsertProductInputRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"merchantapi.googleapis.com/Product\x12N\n\rproduct_input\x18\x02 \x01(\x0b\x32\x32.google.shopping.merchant.products.v1.ProductInputB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xbb\x01\n\x19UpdateProductInputRequest\x12N\n\rproduct_input\x18\x01 \x01(\x0b\x32\x32.google.shopping.merchant.products.v1.ProductInputB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"t\n\x19\x44\x65leteProductInputRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'merchantapi.googleapis.com/ProductInput\x12\x18\n\x0b\x64\x61ta_source\x18\x02 \x01(\tB\x03\xe0\x41\x02\x32\xe5\x05\n\x14ProductInputsService\x12\xd7\x01\n\x12InsertProductInput\x12?.google.shopping.merchant.products.v1.InsertProductInputRequest\x1a\x32.google.shopping.merchant.products.v1.ProductInput\"L\x82\xd3\xe4\x93\x02\x46\"5/products/v1/{parent=accounts/*}/productInputs:insert:\rproduct_input\x12\xfa\x01\n\x12UpdateProductInput\x12?.google.shopping.merchant.products.v1.UpdateProductInputRequest\x1a\x32.google.shopping.merchant.products.v1.ProductInput\"o\xda\x41\x19product_input,update_mask\x82\xd3\xe4\x93\x02M2 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12L\n\x0fproduct_details\x18? \x03(\x0b\x32\x33.google.shopping.merchant.products.v1.ProductDetail\x12\x1a\n\x12product_highlights\x18@ \x03(\t\x12\x1b\n\x0e\x64isplay_ads_id\x18\x41 \x01(\tH\"\x88\x01\x01\x12\x1f\n\x17\x64isplay_ads_similar_ids\x18\x42 \x03(\t\x12\x1e\n\x11\x64isplay_ads_title\x18\x43 \x01(\tH#\x88\x01\x01\x12\x1d\n\x10\x64isplay_ads_link\x18\x44 \x01(\tH$\x88\x01\x01\x12\x1e\n\x11\x64isplay_ads_value\x18\x45 \x01(\x01H%\x88\x01\x01\x12\x15\n\rpromotion_ids\x18\x46 \x03(\t\x12N\n\rpickup_method\x18P \x01(\x0e\x32\x32.google.shopping.merchant.products.v1.PickupMethodH&\x88\x01\x01\x12H\n\npickup_sla\x18Q \x01(\x0e\x32/.google.shopping.merchant.products.v1.PickupSlaH\'\x88\x01\x01\x12P\n\x0bpickup_cost\x18\xac\x01 \x01(\x0b\x32\x30.google.shopping.merchant.products.v1.PickupCostB\x03\xe0\x41\x01H(\x88\x01\x01\x12\x1a\n\rlink_template\x18R \x01(\tH)\x88\x01\x01\x12!\n\x14mobile_link_template\x18S \x01(\tH*\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_0\x18G \x01(\tH+\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_1\x18H \x01(\tH,\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_2\x18I \x01(\tH-\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_3\x18J \x01(\tH.\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_4\x18K \x01(\tH/\x88\x01\x01\x12P\n\x15included_destinations\x18L \x03(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnum\x12P\n\x15\x65xcluded_destinations\x18M \x03(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnum\x12\'\n\x1fshopping_ads_excluded_countries\x18N \x03(\t\x12\x1f\n\x12\x65xternal_seller_id\x18\x01 \x01(\tH0\x88\x01\x01\x12?\n\x05pause\x18\r \x01(\x0e\x32+.google.shopping.merchant.products.v1.PauseH1\x88\x01\x01\x12\x1d\n\x15lifestyle_image_links\x18\x0e \x03(\t\x12q\n\"cloud_export_additional_properties\x18T \x03(\x0b\x32\x45.google.shopping.merchant.products.v1.CloudExportAdditionalProperties\x12 \n\x12virtual_model_link\x18\x82\x01 \x01(\tH2\x88\x01\x01\x12R\n\x0e\x63\x65rtifications\x18{ \x03(\x0b\x32:.google.shopping.merchant.products.v1.ProductCertification\x12U\n\x10structured_title\x18\x84\x01 \x01(\x0b\x32\x35.google.shopping.merchant.products.v1.StructuredTitleH3\x88\x01\x01\x12\x61\n\x16structured_description\x18\x85\x01 \x01(\x0b\x32;.google.shopping.merchant.products.v1.StructuredDescriptionH4\x88\x01\x01\x12;\n\x16\x61uto_pricing_min_price\x18| \x01(\x0b\x32\x1b.google.shopping.type.Price\x12h\n\x19sustainability_incentives\x18\x8a\x01 \x03(\x0b\x32\x44.google.shopping.merchant.products.v1.ProductSustainabilityIncentive\x12\x19\n\x0bvideo_links\x18\xa9\x01 \x03(\tB\x03\xe0\x41\x01\x12]\n\x14minimum_order_values\x18\x92\x01 \x03(\x0b\x32>.google.shopping.merchant.products.v1.ProductMinimumOrderValue\x12\x0c\n\x03vin\x18\x93\x01 \x01(\t\x12\x0e\n\x05model\x18\x94\x01 \x01(\t\x12\r\n\x04trim\x18\x95\x01 \x01(\t\x12]\n\nbody_style\x18\x96\x01 \x01(\x0e\x32H.google.shopping.merchant.products.v1.ProductAttributes.VehicleBodyStyle\x12\r\n\x04year\x18\x97\x01 \x01(\x03\x12Q\n\x07mileage\x18\x98\x01 \x01(\x0b\x32?.google.shopping.merchant.products.v1.ProductAttributes.Mileage\x12X\n\x0e\x65lectric_range\x18\x99\x01 \x01(\x0b\x32?.google.shopping.merchant.products.v1.ProductAttributes.Mileage\x12\x62\n\x10\x66uel_consumption\x18\x9a\x01 \x01(\x0b\x32G.google.shopping.merchant.products.v1.ProductAttributes.FuelConsumption\x12u\n#fuel_consumption_discharged_battery\x18\x9b\x01 \x01(\x0b\x32G.google.shopping.merchant.products.v1.ProductAttributes.FuelConsumption\x12\x66\n\x12\x65nergy_consumption\x18\x9c\x01 \x01(\x0b\x32I.google.shopping.merchant.products.v1.ProductAttributes.EnergyConsumption\x12\\\n\rco2_emissions\x18\x9d\x01 \x01(\x0b\x32\x44.google.shopping.merchant.products.v1.ProductAttributes.Co2Emissions\x12\x1e\n\x15\x64\x61te_first_registered\x18\x9e\x01 \x01(\t\x12S\n\x06\x65ngine\x18\x9f\x01 \x01(\x0e\x32\x42.google.shopping.merchant.products.v1.ProductAttributes.EngineType\x12\x66\n\x12\x65missions_standard\x18\xa0\x01 \x01(\x0e\x32I.google.shopping.merchant.products.v1.ProductAttributes.EmissionsStandard\x12\x1c\n\x13\x63\x65rtified_pre_owned\x18\xa1\x01 \x01(\x08\x12\x32\n\x0cvehicle_msrp\x18\xa2\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12:\n\x14vehicle_all_in_price\x18\xa3\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x65\n\x12vehicle_price_type\x18\xa4\x01 \x01(\x0e\x32H.google.shopping.merchant.products.v1.ProductAttributes.VehiclePriceType\x12.\n%vehicle_mandatory_inspection_included\x18\xa6\x01 \x01(\x08\x12\x36\n\x10vehicle_expenses\x18\xa7\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12S\n\x08warranty\x18\xa8\x01 \x01(\x0b\x32@.google.shopping.merchant.products.v1.ProductAttributes.Warranty\x12`\n\x0f\x64isplay_address\x18\xb3\x01 \x01(\x0b\x32\x46.google.shopping.merchant.products.v1.ProductAttributes.DisplayAddress\x12\x16\n\x08latitude\x18\xb4\x01 \x01(\x01H5\x88\x01\x01\x12\x17\n\tlongitude\x18\xb5\x01 \x01(\x01H6\x88\x01\x01\x12\x15\n\x0cneighborhood\x18\xb6\x01 \x01(\t\x12T\n\tunit_area\x18\xb7\x01 \x01(\x0b\x32@.google.shopping.merchant.products.v1.ProductAttributes.UnitArea\x12\x1d\n\x0fnumber_of_units\x18\xb8\x01 \x01(\x03H7\x88\x01\x01\x12\x16\n\rproperty_name\x18\xb9\x01 \x01(\t\x12 \n\x12number_of_bedrooms\x18\xba\x01 \x01(\x01H8\x88\x01\x01\x12!\n\x13number_of_bathrooms\x18\xbb\x01 \x01(\x01H9\x88\x01\x01\x12\\\n\rproperty_type\x18\xbc\x01 \x01(\x0e\x32\x44.google.shopping.merchant.products.v1.ProductAttributes.PropertyType\x12`\n\x0f\x61menity_feature\x18\xbd\x01 \x03(\x0e\x32\x46.google.shopping.merchant.products.v1.ProductAttributes.AmenityFeature\x12\x66\n\x12utilities_included\x18\xbe\x01 \x03(\x0e\x32I.google.shopping.merchant.products.v1.ProductAttributes.UtilitiesIncluded\x12V\n\npet_policy\x18\xbf\x01 \x01(\x0b\x32\x41.google.shopping.merchant.products.v1.ProductAttributes.PetPolicy\x12m\n\x16specialty_housing_type\x18\xc0\x01 \x01(\x0e\x32L.google.shopping.merchant.products.v1.ProductAttributes.SpecialtyHousingType\x12X\n\x0bproduct_fee\x18\xc1\x01 \x03(\x0b\x32\x42.google.shopping.merchant.products.v1.ProductAttributes.ProductFee\x12\x19\n\x0bshort_title\x18\xc2\x01 \x01(\tH:\x88\x01\x01\x12n\n\x15questions_and_answers\x18\xad\x01 \x03(\x0b\x32I.google.shopping.merchant.products.v1.ProductAttributes.QuestionAndAnswerB\x03\xe0\x41\x01\x12\x1d\n\x0fpopularity_rank\x18\xae\x01 \x01(\x02\x42\x03\xe0\x41\x01\x12\x1e\n\x10item_group_title\x18\xaf\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0e\x64ocument_links\x18\xb0\x01 \x03(\tB\x03\xe0\x41\x01\x12\x64\n\x0fvariant_options\x18\xb1\x01 \x03(\x0b\x32\x45.google.shopping.merchant.products.v1.ProductAttributes.VariantOptionB\x03\xe0\x41\x01\x12\x66\n\x10related_products\x18\xb2\x01 \x03(\x0b\x32\x46.google.shopping.merchant.products.v1.ProductAttributes.RelatedProductB\x03\xe0\x41\x01\x1al\n\x1aShippingBusinessDaysConfig\x12\x14\n\x07\x63ountry\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rbusiness_days\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\n\n\x08_countryB\x10\n\x0e_business_days\x1a\xa1\x07\n\x0f\x43\x61rrierShipping\x12\x14\n\x07\x63ountry\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06region\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0bpostal_code\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x12origin_postal_code\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x34\n\nflat_price\x18\x05 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x04\x88\x01\x01\x12\x66\n\rcarrier_price\x18\x06 \x01(\x0e\x32J.google.shopping.merchant.products.v1.ProductAttributes.CarrierPriceOptionH\x05\x88\x01\x01\x12G\n\x1d\x63\x61rrier_price_flat_adjustment\x18\x07 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x06\x88\x01\x01\x12\x30\n#carrier_price_percentage_adjustment\x18\x08 \x01(\x01H\x07\x88\x01\x01\x12\x1e\n\x11min_handling_time\x18\t \x01(\x03H\x08\x88\x01\x01\x12\x1e\n\x11max_handling_time\x18\n \x01(\x03H\t\x88\x01\x01\x12#\n\x16\x66ixed_min_transit_time\x18\x0b \x01(\x03H\n\x88\x01\x01\x12#\n\x16\x66ixed_max_transit_time\x18\x0c \x01(\x03H\x0b\x88\x01\x01\x12\x61\n\x14\x63\x61rrier_transit_time\x18\r \x01(\x0e\x32>.google.shopping.merchant.products.v1.CarrierTransitTimeOptionH\x0c\x88\x01\x01\x42\n\n\x08_countryB\t\n\x07_regionB\x0e\n\x0c_postal_codeB\x15\n\x13_origin_postal_codeB\r\n\x0b_flat_priceB\x10\n\x0e_carrier_priceB \n\x1e_carrier_price_flat_adjustmentB&\n$_carrier_price_percentage_adjustmentB\x14\n\x12_min_handling_timeB\x14\n\x12_max_handling_timeB\x19\n\x17_fixed_min_transit_timeB\x19\n\x17_fixed_max_transit_timeB\x17\n\x15_carrier_transit_time\x1a\xac\x01\n\x07Mileage\x12\x12\n\x05value\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12R\n\x04unit\x18\x02 \x01(\x0e\x32\x44.google.shopping.merchant.products.v1.ProductAttributes.Mileage.Unit\"/\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\t\n\x05MILES\x10\x01\x12\x06\n\x02KM\x10\x02\x42\x08\n\x06_value\x1a\xc8\x01\n\x0f\x46uelConsumption\x12\x12\n\x05value\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12Z\n\x04unit\x18\x02 \x01(\x0e\x32L.google.shopping.merchant.products.v1.ProductAttributes.FuelConsumption.Unit\";\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\r\n\tLPER100KM\x10\x01\x12\x0e\n\nKGPER100KM\x10\x02\x42\x08\n\x06_value\x1a\xbe\x01\n\x11\x45nergyConsumption\x12\x12\n\x05value\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12\\\n\x04unit\x18\x02 \x01(\x0e\x32N.google.shopping.merchant.products.v1.ProductAttributes.EnergyConsumption.Unit\"-\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\x0f\n\x0bKWHPER100KM\x10\x01\x42\x08\n\x06_value\x1a\xaf\x01\n\x0c\x43o2Emissions\x12\x12\n\x05value\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12W\n\x04unit\x18\x02 \x01(\x0e\x32I.google.shopping.merchant.products.v1.ProductAttributes.Co2Emissions.Unit\"(\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\n\n\x06GPERKM\x10\x01\x42\x08\n\x06_value\x1an\n\x08Warranty\x12\x10\n\x08\x64uration\x18\x01 \x01(\x03\x12P\n\x07mileage\x18\x02 \x01(\x0b\x32?.google.shopping.merchant.products.v1.ProductAttributes.Mileage\x1a\xf2\x01\n\nProductFee\x12X\n\x04type\x18\x01 \x01(\x0e\x32J.google.shopping.merchant.products.v1.ProductAttributes.ProductFee.FeeType\x12+\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\"]\n\x07\x46\x65\x65Type\x12\x18\n\x14\x46\x45\x45_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tADMIN_FEE\x10\x01\x12\x13\n\x0f\x41PPLICATION_FEE\x10\x02\x12\x14\n\x10SECURITY_DEPOSIT\x10\x03\x1ao\n\x0e\x44isplayAddress\x12\x15\n\rstreet_number\x18\x01 \x01(\t\x12\x13\n\x0bstreet_name\x18\x02 \x01(\t\x12\x0c\n\x04\x63ity\x18\x03 \x01(\t\x12\x0e\n\x06region\x18\x04 \x01(\t\x12\x13\n\x0bpostal_code\x18\x05 \x01(\t\x1a\xae\x01\n\x08UnitArea\x12\x12\n\x05value\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12S\n\x04unit\x18\x02 \x01(\x0e\x32\x45.google.shopping.merchant.products.v1.ProductAttributes.UnitArea.Unit\"/\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\x07\n\x03SQM\x10\x01\x12\x08\n\x04SQFT\x10\x02\x42\x08\n\x06_value\x1a\xce\x01\n\tPetPolicy\x12\x14\n\x0cpets_allowed\x18\x01 \x01(\x08\x12\\\n\tpet_types\x18\x02 \x03(\x0e\x32I.google.shopping.merchant.products.v1.ProductAttributes.PetPolicy.PetType\"M\n\x07PetType\x12\x18\n\x14PET_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x43\x41TS\x10\x01\x12\x0e\n\nLARGE_DOGS\x10\x02\x12\x0e\n\nSMALL_DOGS\x10\x03\x1a?\n\x11QuestionAndAnswer\x12\x15\n\x08question\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x61nswer\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\x36\n\rVariantOption\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\xdb\x03\n\x0eRelatedProduct\x12w\n\x11relationship_type\x18\x01 \x01(\x0e\x32W.google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.RelationshipTypeB\x03\xe0\x41\x02\x12\x63\n\x07id_type\x18\x02 \x01(\x0e\x32M.google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.IdTypeB\x03\xe0\x41\x02\x12\x0f\n\x02id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xa4\x01\n\x10RelationshipType\x12!\n\x1dRELATIONSHIP_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPART_OF_SET\x10\x01\x12\x11\n\rREQUIRED_PART\x10\x02\x12\x15\n\x11OFTEN_BOUGHT_WITH\x10\x03\x12\x0e\n\nSUBSTITUTE\x10\x04\x12\x13\n\x0f\x44IFFERENT_BRAND\x10\x05\x12\r\n\tACCESSORY\x10\x06\"3\n\x06IdType\x12\x17\n\x13ID_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04GTIN\x10\x01\x12\x06\n\x02ID\x10\x02\"\x88\x0c\n\x12\x43\x61rrierPriceOption\x12$\n CARRIER_PRICE_OPTION_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x41USTRALIA_POST_REGULAR\x10\x01\x12\x1a\n\x16\x41USTRALIA_POST_EXPRESS\x10\x02\x12\x1c\n\x18\x41USTRALIA_POST_REGULAR_S\x10\x03\x12\x1c\n\x18\x41USTRALIA_POST_REGULAR_M\x10\x04\x12\x1c\n\x18\x41USTRALIA_POST_REGULAR_L\x10\x05\x12\x1d\n\x19\x41USTRALIA_POST_REGULAR_XL\x10\x06\x12\x1c\n\x18\x41USTRALIA_POST_EXPRESS_S\x10\x07\x12\x1c\n\x18\x41USTRALIA_POST_EXPRESS_M\x10\x08\x12\x1c\n\x18\x41USTRALIA_POST_EXPRESS_L\x10\t\x12\x1d\n\x19\x41USTRALIA_POST_EXPRESS_XL\x10\n\x12\x14\n\x10TNT_ROAD_EXPRESS\x10\x0b\x12\x19\n\x15TNT_OVERNIGHT_EXPRESS\x10\x0c\x12\x16\n\x12TOLL_ROAD_DELIVERY\x10\r\x12\x1b\n\x17TOLL_OVERNIGHT_PRIORITY\x10\x0e\x12\r\n\tDHL_PAKET\x10\x0f\x12\x10\n\x0c\x44HL_PACKCHEN\x10\x10\x12\x12\n\x0e\x44PD_EXPRESS_12\x10\x11\x12\x0f\n\x0b\x44PD_EXPRESS\x10\x12\x12\x16\n\x12\x44PD_CLASSIC_PARCEL\x10\x13\x12\x13\n\x0fHERMES_PACKCHEN\x10\x14\x12\x18\n\x14HERMES_PAKETKLASSE_S\x10\x15\x12\x18\n\x14HERMES_PAKETKLASSE_M\x10\x16\x12\x18\n\x14HERMES_PAKETKLASSE_L\x10\x17\x12\x0f\n\x0bUPS_EXPRESS\x10\x18\x12\x15\n\x11UPS_EXPRESS_SAVER\x10\x19\x12\x18\n\x14UPS_EXPRESS_STANDARD\x10\x1a\x12\x0f\n\x0b\x44HL_EXPRESS\x10\x1b\x12\x12\n\x0e\x44HL_EXPRESS_12\x10\x1c\x12\x10\n\x0c\x44PD_NEXT_DAY\x10\x1d\x12\x19\n\x15\x44PD_STANDARD_NEXT_DAY\x10\x1e\x12\x18\n\x14\x44PD_STANDARD_TWO_DAY\x10\x1f\x12\x17\n\x13RMG_1ST_CLASS_SMALL\x10 \x12\x18\n\x14RMG_1ST_CLASS_MEDIUM\x10!\x12\x17\n\x13RMG_2ND_CLASS_SMALL\x10\"\x12\x18\n\x14RMG_2ND_CLASS_MEDIUM\x10#\x12\x0f\n\x0bTNT_EXPRESS\x10$\x12\x12\n\x0eTNT_EXPRESS_10\x10%\x12\x12\n\x0eTNT_EXPRESS_12\x10&\x12\x12\n\x0eYODEL_B2C_48HR\x10\'\x12\x12\n\x0eYODEL_B2C_72HR\x10(\x12\x14\n\x10YODEL_B2C_PACKET\x10)\x12\x10\n\x0c\x46\x45\x44\x45X_GROUND\x10*\x12\x17\n\x13\x46\x45\x44\x45X_HOME_DELIVERY\x10+\x12\x17\n\x13\x46\x45\x44\x45X_EXPRESS_SAVER\x10,\x12\x19\n\x15\x46\x45\x44\x45X_FIRST_OVERNIGHT\x10-\x12\x1c\n\x18\x46\x45\x44\x45X_PRIORITY_OVERNIGHT\x10.\x12\x1c\n\x18\x46\x45\x44\x45X_STANDARD_OVERNIGHT\x10/\x12\x0e\n\nFEDEX_2DAY\x10\x30\x12\x10\n\x0cUPS_STANDARD\x10\x31\x12\x13\n\x0fUPS_2ND_DAY_AIR\x10\x32\x12\x12\n\x0eUPS_2ND_DAY_AM\x10\x33\x12\x14\n\x10UPS_3_DAY_SELECT\x10\x34\x12\x0e\n\nUPS_GROUND\x10\x35\x12\x14\n\x10UPS_NEXT_DAY_AIR\x10\x36\x12\x1d\n\x19UPS_NEXT_DAY_AIR_EARLY_AM\x10\x37\x12\x1a\n\x16UPS_NEXT_DAY_AIR_SAVER\x10\x38\x12\x1e\n\x1aUSPS_PRIORITY_MAIL_EXPRESS\x10\x39\x12\x13\n\x0fUSPS_MEDIA_MAIL\x10:\x12 \n\x1cUSPS_GROUND_ADVANTAGE_RETAIL\x10;\x12\x16\n\x12USPS_PRIORITY_MAIL\x10<\x12$\n USPS_GROUND_ADVANTAGE_COMMERCIAL\x10=\"\xb6\x04\n\x10VehicleBodyStyle\x12\"\n\x1eVEHICLE_BODY_STYLE_UNSPECIFIED\x10\x00\x12\r\n\tATV_SPORT\x10\x01\x12\x0f\n\x0b\x41TV_TOURING\x10\x02\x12\x0f\n\x0b\x41TV_UTILITY\x10\x03\x12\r\n\tATV_YOUTH\x10\x04\x12\x0c\n\x08\x43ITY_CAR\x10\x05\x12\x15\n\x11\x43LASS_A_MOTORHOME\x10\x06\x12\x15\n\x11\x43LASS_B_MOTORHOME\x10\x07\x12\x15\n\x11\x43LASS_C_MOTORHOME\x10\x08\x12\x0f\n\x0b\x43OMPACT_SUV\x10\t\x12\x0f\n\x0b\x43ONVERTIBLE\x10\n\x12\t\n\x05\x43OUPE\x10\x0b\x12\r\n\tCROSSOVER\x10\x0c\x12\x0f\n\x0b\x46IFTH_WHEEL\x10\r\x12\x11\n\rFULL_SIZE_VAN\x10\x0e\x12\r\n\tHATCHBACK\x10\x0f\x12\r\n\tLIMOUSINE\x10\x10\x12\x0b\n\x07MINIVAN\x10\x11\x12\r\n\tNOTCHBACK\x10\x12\x12\x11\n\rPOP_UP_CAMPER\x10\x13\x12\t\n\x05SEDAN\x10\x14\x12\x10\n\x0cSIDE_BY_SIDE\x10\x15\x12\x11\n\rSTATION_WAGON\x10\x16\x12\x07\n\x03SUV\x10\x17\x12\x12\n\x0eTRAVEL_TRAILER\x10\x18\x12\t\n\x05TRUCK\x10\x19\x12\x10\n\x0cTRUCK_CAMPER\x10\x1a\x12\x07\n\x03UTE\x10\x1b\x12\x1c\n\x18UTV_RECREATIONAL_UTILITY\x10\x1c\x12\r\n\tUTV_SPORT\x10\x1d\x12\x0f\n\x0bUTV_UTILITY\x10\x1e\x12\r\n\tUTV_YOUTH\x10\x1f\"\xa3\x01\n\nEngineType\x12\x1b\n\x17\x45NGINE_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08GASOLINE\x10\x01\x12\n\n\x06\x44IESEL\x10\x02\x12\x0c\n\x08\x45LECTRIC\x10\x03\x12\n\n\x06HYBRID\x10\x04\x12\x12\n\x0ePLUG_IN_HYBRID\x10\x05\x12\x0f\n\x0bNATURAL_GAS\x10\x06\x12\x07\n\x03LPG\x10\x07\x12\x0b\n\x07METHANE\x10\x08\x12\t\n\x05OTHER\x10\t\"\xce\x01\n\x11\x45missionsStandard\x12\"\n\x1e\x45MISSIONS_STANDARD_UNSPECIFIED\x10\x00\x12\x12\n\x0eZERO_EMISSIONS\x10\x01\x12\t\n\x05\x45URO1\x10\x02\x12\t\n\x05\x45URO2\x10\x03\x12\t\n\x05\x45URO3\x10\x04\x12\t\n\x05\x45URO4\x10\x05\x12\t\n\x05\x45URO5\x10\x06\x12\n\n\x06\x45URO5B\x10\x07\x12\t\n\x05\x45URO6\x10\x08\x12\n\n\x06\x45URO6C\x10\t\x12\n\n\x06\x45URO6D\x10\n\x12\x0f\n\x0b\x45URO6D_TEMP\x10\x0b\x12\n\n\x06\x45URO6E\x10\x0c\"\xbe\x01\n\x10VehiclePriceType\x12\"\n\x1eVEHICLE_PRICE_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41LL_IN_PRICE\x10\x01\x12\x14\n\x10\x44RIVE_AWAY_PRICE\x10\x02\x12\x1e\n\x1a\x45STIMATED_DRIVE_AWAY_PRICE\x10\x03\x12&\n\"EXCLUDING_GOVERNMENT_CHARGES_PRICE\x10\x04\x12\x16\n\x12VEHICLE_BASE_PRICE\x10\x05\"\xb4\x01\n\x0cPropertyType\x12\x1d\n\x19PROPERTY_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tAPARTMENT\x10\x01\x12\t\n\x05\x43ONDO\x10\x02\x12\x08\n\x04LOFT\x10\x03\x12\x15\n\x11MULTI_FAMILY_HOME\x10\x04\x12\r\n\tPENTHOUSE\x10\x05\x12\x08\n\x04ROOM\x10\x06\x12\x16\n\x12SINGLE_FAMILY_HOME\x10\x07\x12\n\n\x06STUDIO\x10\x08\x12\r\n\tTOWNHOUSE\x10\t\"\x90\x05\n\x0e\x41menityFeature\x12\x1f\n\x1b\x41MENITY_FEATURE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x42\x41LCONY\x10\x01\x12\x0c\n\x08\x42\x41SEMENT\x10\x02\x12\x14\n\x10\x42\x41SKETBALL_COURT\x10\x03\x12\x10\n\x0c\x42IKE_STORAGE\x10\x04\x12\x0e\n\nCENTRAL_AC\x10\x05\x12\x0e\n\nDISHWASHER\x10\x06\x12\x0c\n\x08\x44OG_PARK\x10\x07\x12\x0c\n\x08\x45LEVATOR\x10\x08\x12\x0f\n\x0b\x45V_CHARGING\x10\t\x12\x0e\n\nFENCED_LOT\x10\n\x12\r\n\tFIREPLACE\x10\x0b\x12\x12\n\x0e\x46ITNESS_CENTER\x10\x0c\x12\x16\n\x12\x46ORCED_AIR_HEATING\x10\r\x12\x13\n\x0f\x46ULLY_FURNISHED\x10\x0e\x12\n\n\x06GARAGE\x10\x0f\x12\x13\n\x0fGATED_COMMUNITY\x10\x10\x12\x13\n\x0fHARDWOOD_FLOORS\x10\x11\x12\x17\n\x13HIGH_SPEED_INTERNET\x10\x12\x12\x0c\n\x08INTERCOM\x10\x13\x12\x18\n\x14IN_UNIT_WASHER_DRYER\x10\x14\x12\x0b\n\x07KITCHEN\x10\x15\x12\x11\n\rLARGE_CLOSETS\x10\x16\x12\x14\n\x10MULTISPORT_COURT\x10\x17\x12\x12\n\x0eONSITE_LAUNDRY\x10\x18\x12\x12\n\x0eOUTDOOR_LOUNGE\x10\x19\x12\x0b\n\x07PARKING\x10\x1a\x12\t\n\x05PATIO\x10\x1b\x12\x14\n\x10PICKLEBALL_COURT\x10\x1c\x12\x08\n\x04POOL\x10\x1d\x12\x10\n\x0cREFRIGERATOR\x10\x1e\x12\x10\n\x0cSOCCER_FIELD\x10\x1f\x12\x10\n\x0cTENNIS_COURT\x10 \x12\x13\n\x0fWALK_IN_CLOSETS\x10!\x12\x15\n\x11WHEELCHAIR_ACCESS\x10\"\"u\n\x11UtilitiesIncluded\x12\"\n\x1eUTILITIES_INCLUDED_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x45LECTRICITY\x10\x01\x12\x07\n\x03GAS\x10\x02\x12\x0c\n\x08INTERNET\x10\x03\x12\t\n\x05TRASH\x10\x04\x12\t\n\x05WATER\x10\x05\"\x94\x01\n\x14SpecialtyHousingType\x12&\n\"SPECIALTY_HOUSING_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tCORPORATE\x10\x01\x12\x0e\n\nLOW_INCOME\x10\x02\x12\x0c\n\x08MILITARY\x10\x03\x12\n\n\x06SENIOR\x10\x04\x12\x0e\n\nSHORT_TERM\x10\x05\x12\x0b\n\x07STUDENT\x10\x06\x42\x14\n\x12_identifier_existsB\x0c\n\n_is_bundleB\x08\n\x06_titleB\x0e\n\x0c_descriptionB\x07\n\x05_linkB\x0e\n\x0c_mobile_linkB\x11\n\x0f_canonical_linkB\r\n\x0b_image_linkB\x08\n\x06_adultB\x0c\n\n_age_groupB\x0f\n\r_availabilityB\x08\n\x06_brandB\x08\n\x06_colorB\x0c\n\n_conditionB\t\n\x07_genderB\x1a\n\x18_google_product_categoryB\x10\n\x0e_item_group_idB\x0b\n\t_materialB\x06\n\x04_mpnB\n\n\x08_patternB\x1a\n\x18_sell_on_google_quantityB\x14\n\x12_max_handling_timeB\x14\n\x12_min_handling_timeB\x11\n\x0f_shipping_labelB\x16\n\x14_return_policy_labelB\x15\n\x13_transit_time_labelB\x07\n\x05_sizeB\x0e\n\x0c_size_systemB\x1a\n\x18_energy_efficiency_classB\x1e\n\x1c_min_energy_efficiency_classB\x1e\n\x1c_max_energy_efficiency_classB\x0c\n\n_multipackB\x0f\n\r_ads_groupingB\x0f\n\r_ads_redirectB\x11\n\x0f_display_ads_idB\x14\n\x12_display_ads_titleB\x13\n\x11_display_ads_linkB\x14\n\x12_display_ads_valueB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\x0e\n\x0c_pickup_costB\x10\n\x0e_link_templateB\x17\n\x15_mobile_link_templateB\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\x15\n\x13_external_seller_idB\x08\n\x06_pauseB\x15\n\x13_virtual_model_linkB\x13\n\x11_structured_titleB\x19\n\x17_structured_descriptionB\x0b\n\t_latitudeB\x0c\n\n_longitudeB\x12\n\x10_number_of_unitsB\x15\n\x13_number_of_bedroomsB\x16\n\x14_number_of_bathroomsB\x0e\n\x0c_short_title\"-\n\x0eShippingWeight\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"0\n\x11ShippingDimension\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"5\n\x16UnitPricingBaseMeasure\x12\r\n\x05value\x18\x01 \x01(\x03\x12\x0c\n\x04unit\x18\x02 \x01(\t\"1\n\x12UnitPricingMeasure\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"\xa0\x01\n\x10SubscriptionCost\x12H\n\x06period\x18\x01 \x01(\x0e\x32\x38.google.shopping.merchant.products.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\"\x87\x03\n\x12ProductInstallment\x12\x0e\n\x06months\x18\x01 \x01(\x03\x12+\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x35\n\x0b\x64ownpayment\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x88\x01\x01\x12J\n\x0b\x63redit_type\x18\x04 \x01(\x0e\x32\x30.google.shopping.merchant.products.v1.CreditTypeH\x01\x88\x01\x01\x12(\n\x16\x61nnual_percentage_rate\x18\x05 \x01(\x01\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12;\n\x0ctotal_amount\x18\x06 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01H\x03\x88\x01\x01\x42\x0e\n\x0c_downpaymentB\x0e\n\x0c_credit_typeB\x19\n\x17_annual_percentage_rateB\x0f\n\r_total_amount\"B\n\rLoyaltyPoints\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cpoints_value\x18\x02 \x01(\x03\x12\r\n\x05ratio\x18\x03 \x01(\x01\"\xc1\x03\n\x0eLoyaltyProgram\x12\x1a\n\rprogram_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ntier_label\x18\x02 \x01(\tH\x01\x88\x01\x01\x12/\n\x05price\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x02\x88\x01\x01\x12\x41\n\x17\x63\x61shback_for_future_use\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x03\x88\x01\x01\x12\x1b\n\x0eloyalty_points\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12?\n\x1bmember_price_effective_date\x18\x06 \x01(\x0b\x32\x15.google.type.IntervalH\x05\x88\x01\x01\x12\x1b\n\x0eshipping_label\x18\x07 \x01(\tH\x06\x88\x01\x01\x42\x10\n\x0e_program_labelB\r\n\x0b_tier_labelB\x08\n\x06_priceB\x1a\n\x18_cashback_for_future_useB\x11\n\x0f_loyalty_pointsB\x1e\n\x1c_member_price_effective_dateB\x11\n\x0f_shipping_label\"\xc8\x04\n\x08Shipping\x12*\n\x05price\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x0f\n\x07\x63ountry\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\t\x12\x0f\n\x07service\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\x03\x12\x1b\n\x13location_group_name\x18\x06 \x01(\t\x12\x13\n\x0bpostal_code\x18\x07 \x01(\t\x12\x1e\n\x11min_handling_time\x18\x08 \x01(\x03H\x00\x88\x01\x01\x12\x1e\n\x11max_handling_time\x18\t \x01(\x03H\x01\x88\x01\x01\x12\x1d\n\x10min_transit_time\x18\n \x01(\x03H\x02\x88\x01\x01\x12\x1d\n\x10max_transit_time\x18\x0b \x01(\x03H\x03\x88\x01\x01\x12!\n\x14handling_cutoff_time\x18\x0c \x01(\tH\x04\x88\x01\x01\x12%\n\x18handling_cutoff_timezone\x18\r \x01(\tH\x05\x88\x01\x01\x12\"\n\x15loyalty_program_label\x18\x0e \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12loyalty_tier_label\x18\x0f \x01(\tB\x03\xe0\x41\x01\x42\x14\n\x12_min_handling_timeB\x14\n\x12_max_handling_timeB\x13\n\x11_min_transit_timeB\x13\n\x11_max_transit_timeB\x17\n\x15_handling_cutoff_timeB\x1b\n\x19_handling_cutoff_timezone\"\x88\x01\n\x15\x46reeShippingThreshold\x12\x14\n\x07\x63ountry\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x39\n\x0fprice_threshold\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x01\x88\x01\x01\x42\n\n\x08_countryB\x12\n\x10_price_threshold\"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\"\xf9\x02\n\x14ProductCertification\x12\x62\n\x17\x63\x65rtification_authority\x18\x01 \x01(\x0e\x32<.google.shopping.merchant.products.v1.CertificationAuthorityH\x00\x88\x01\x01\x12X\n\x12\x63\x65rtification_name\x18\x02 \x01(\x0e\x32\x37.google.shopping.merchant.products.v1.CertificationNameH\x01\x88\x01\x01\x12\x1f\n\x12\x63\x65rtification_code\x18\x03 \x01(\tH\x02\x88\x01\x01\x12 \n\x13\x63\x65rtification_value\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x1a\n\x18_certification_authorityB\x15\n\x13_certification_nameB\x15\n\x13_certification_codeB\x16\n\x14_certification_value\"\xa6\x01\n\x0fStructuredTitle\x12Y\n\x13\x64igital_source_type\x18\x01 \x01(\x0e\x32\x37.google.shopping.merchant.products.v1.DigitalSourceTypeH\x00\x88\x01\x01\x12\x14\n\x07\x63ontent\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x16\n\x14_digital_source_typeB\n\n\x08_content\"\xac\x01\n\x15StructuredDescription\x12Y\n\x13\x64igital_source_type\x18\x01 \x01(\x0e\x32\x37.google.shopping.merchant.products.v1.DigitalSourceTypeH\x00\x88\x01\x01\x12\x14\n\x07\x63ontent\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x16\n\x14_digital_source_typeB\n\n\x08_content\"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\"\xeb\x07\n\rProductStatus\x12\x63\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32\x45.google.shopping.merchant.products.v1.ProductStatus.DestinationStatus\x12]\n\x11item_level_issues\x18\x04 \x03(\x0b\x32\x42.google.shopping.merchant.products.v1.ProductStatus.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\xc1\x01\n\x11\x44\x65stinationStatus\x12V\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnum\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\xac\x03\n\x0eItemLevelIssue\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12]\n\x08severity\x18\x02 \x01(\x0e\x32K.google.shopping.merchant.products.v1.ProductStatus.ItemLevelIssue.Severity\x12\x12\n\nresolution\x18\x03 \x01(\t\x12\x11\n\tattribute\x18\x04 \x01(\t\x12V\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnum\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\"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\"\xa5\x02\n\x1f\x43loudExportAdditionalProperties\x12\x1a\n\rproperty_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\ntext_value\x18\x02 \x03(\t\x12\x17\n\nbool_value\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12\x11\n\tint_value\x18\x04 \x03(\x03\x12\x13\n\x0b\x66loat_value\x18\x05 \x03(\x02\x12\x16\n\tmin_value\x18\x06 \x01(\x02H\x02\x88\x01\x01\x12\x16\n\tmax_value\x18\x07 \x01(\x02H\x03\x88\x01\x01\x12\x16\n\tunit_code\x18\x08 \x01(\tH\x04\x88\x01\x01\x42\x10\n\x0e_property_nameB\r\n\x0b_bool_valueB\x0c\n\n_min_valueB\x0c\n\n_max_valueB\x0c\n\n_unit_code\"\x9d\x02\n\x1eProductSustainabilityIncentive\x12-\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x12\x14\n\npercentage\x18\x03 \x01(\x01H\x00\x12\\\n\x04type\x18\x01 \x01(\x0e\x32I.google.shopping.merchant.products.v1.ProductSustainabilityIncentive.TypeH\x01\x88\x01\x01\"F\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rEV_TAX_CREDIT\x10\x01\x12\x15\n\x11\x45V_PRICE_DISCOUNT\x10\x02\x42\x07\n\x05valueB\x07\n\x05_type\"\xb4\x01\n\x12\x41utomatedDiscounts\x12\x30\n\x0bprior_price\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12<\n\x17prior_price_progressive\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12.\n\tgad_price\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price\"\xa6\x01\n\nPickupCost\x12\x38\n\tflat_rate\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12=\n\x0e\x66ree_threshold\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x0c\n\n_flat_rateB\x11\n\x0f_free_threshold\"\xe0\x01\n\x12HandlingCutoffTime\x12\x14\n\x07\x63ountry\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0b\x63utoff_time\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0f\x63utoff_timezone\x18\x03 \x01(\tH\x02\x88\x01\x01\x12*\n\x1d\x64isable_delivery_after_cutoff\x18\x04 \x01(\x08H\x03\x88\x01\x01\x42\n\n\x08_countryB\x0e\n\x0c_cutoff_timeB\x12\n\x10_cutoff_timezoneB \n\x1e_disable_delivery_after_cutoff\"\xda\x02\n\x18ProductMinimumOrderValue\x12\x19\n\x07\x63ountry\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x14\n\x07service\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\\\n\x07surface\x18\x03 \x01(\x0e\x32\x46.google.shopping.merchant.products.v1.ProductMinimumOrderValue.SurfaceH\x02\x88\x01\x01\x12\x34\n\x05price\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x02H\x03\x88\x01\x01\"K\n\x07Surface\x12\x17\n\x13SURFACE_UNSPECIFIED\x10\x00\x12\n\n\x06ONLINE\x10\x01\x12\t\n\x05LOCAL\x10\x02\x12\x10\n\x0cONLINE_LOCAL\x10\x03\x42\n\n\x08_countryB\n\n\x08_serviceB\n\n\x08_surfaceB\x08\n\x06_price*X\n\x12SubscriptionPeriod\x12#\n\x1fSUBSCRIPTION_PERIOD_UNSPECIFIED\x10\x00\x12\t\n\x05MONTH\x10\x01\x12\x08\n\x04YEAR\x10\x02\x12\x08\n\x04WEEK\x10\x03*`\n\x08\x41geGroup\x12\x19\n\x15\x41GE_GROUP_UNSPECIFIED\x10\x00\x12\t\n\x05\x41\x44ULT\x10\x01\x12\x08\n\x04KIDS\x10\x02\x12\x0b\n\x07TODDLER\x10\x03\x12\n\n\x06INFANT\x10\x04\x12\x0b\n\x07NEWBORN\x10\x05*\x83\x01\n\x0c\x41vailability\x12\x1c\n\x18\x41VAILABILITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08IN_STOCK\x10\x01\x12\x10\n\x0cOUT_OF_STOCK\x10\x02\x12\x0c\n\x08PREORDER\x10\x03\x12\x18\n\x14LIMITED_AVAILABILITY\x10\x04\x12\r\n\tBACKORDER\x10\x05*J\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x08\n\x04USED\x10\x02\x12\x0f\n\x0bREFURBISHED\x10\x03*B\n\x06Gender\x12\x16\n\x12GENDER_UNSPECIFIED\x10\x00\x12\x08\n\x04MALE\x10\x01\x12\n\n\x06\x46\x45MALE\x10\x02\x12\n\n\x06UNISEX\x10\x03*A\n\nCreditType\x12\x1b\n\x17\x43REDIT_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46INANCE\x10\x01\x12\t\n\x05LEASE\x10\x02*\x82\x01\n\nSizeSystem\x12\x1b\n\x17SIZE_SYSTEM_UNSPECIFIED\x10\x00\x12\x06\n\x02\x41U\x10\x01\x12\x06\n\x02\x42R\x10\x02\x12\x06\n\x02\x43N\x10\x03\x12\x06\n\x02\x44\x45\x10\x04\x12\x06\n\x02\x45U\x10\x05\x12\x06\n\x02\x46R\x10\x06\x12\x06\n\x02IT\x10\x07\x12\x06\n\x02JP\x10\x08\x12\x07\n\x03MEX\x10\t\x12\x06\n\x02UK\x10\n\x12\x06\n\x02US\x10\x0b*j\n\x08SizeType\x12\x19\n\x15SIZE_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07REGULAR\x10\x01\x12\n\n\x06PETITE\x10\x02\x12\r\n\tMATERNITY\x10\x03\x12\x07\n\x03\x42IG\x10\x04\x12\x08\n\x04TALL\x10\x05\x12\x08\n\x04PLUS\x10\x06*\x8c\x01\n\x15\x45nergyEfficiencyClass\x12\'\n#ENERGY_EFFICIENCY_CLASS_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41PPP\x10\x01\x12\x07\n\x03\x41PP\x10\x02\x12\x06\n\x02\x41P\x10\x03\x12\x05\n\x01\x41\x10\x04\x12\x05\n\x01\x42\x10\x05\x12\x05\n\x01\x43\x10\x06\x12\x05\n\x01\x44\x10\x07\x12\x05\n\x01\x45\x10\x08\x12\x05\n\x01\x46\x10\t\x12\x05\n\x01G\x10\n*i\n\x0cPickupMethod\x12\x1d\n\x19PICKUP_METHOD_UNSPECIFIED\x10\x00\x12\x11\n\rNOT_SUPPORTED\x10\x01\x12\x07\n\x03\x42UY\x10\x02\x12\x0b\n\x07RESERVE\x10\x03\x12\x11\n\rSHIP_TO_STORE\x10\x04*\x98\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\x0e\n\nMULTI_WEEK\x10\x08*0\n\x05Pause\x12\x15\n\x11PAUSE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44S\x10\x01\x12\x07\n\x03\x41LL\x10\x02*g\n\x16\x43\x65rtificationAuthority\x12\'\n#CERTIFICATION_AUTHORITY_UNSPECIFIED\x10\x00\x12\t\n\x05\x41\x44\x45ME\x10\x01\x12\x08\n\x04\x42MWK\x10\x02\x12\x07\n\x03\x45PA\x10\x03\x12\x06\n\x02\x45\x43\x10\x04*\xd5\x01\n\x11\x43\x65rtificationName\x12\"\n\x1e\x43\x45RTIFICATION_NAME_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x45NERGY_STAR\x10\x01\x12\x1e\n\x1a\x45NERGY_STAR_MOST_EFFICIENT\x10\x02\x12\t\n\x05\x45PREL\x10\x03\x12\x0f\n\x0b\x45U_ECOLABEL\x10\x04\x12\x1d\n\x19VEHICLE_ENERGY_EFFICIENCY\x10\x05\x12\x30\n,VEHICLE_ENERGY_EFFICIENCY_DISCHARGED_BATTERY\x10\x06*d\n\x11\x44igitalSourceType\x12#\n\x1f\x44IGITAL_SOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19TRAINED_ALGORITHMIC_MEDIA\x10\x01\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x02*\xc8\x07\n\x18\x43\x61rrierTransitTimeOption\x12+\n\'CARRIER_TRANSIT_TIME_OPTION_UNSPECIFIED\x10\x00\x12\r\n\tDHL_PAKET\x10\x01\x12\x10\n\x0c\x44HL_PACKCHEN\x10\x02\x12\x13\n\x0f\x44HL_EXPRESSEASY\x10\x03\x12\x0f\n\x0b\x44PD_EXPRESS\x10\x04\x12\x16\n\x12\x44PD_CLASSIC_PARCEL\x10\x05\x12\x12\n\x0eHERMES_HAUSTUR\x10\x06\x12\x14\n\x10HERMES_PAKETSHOP\x10\x07\x12\x10\n\x0cGLS_BUSINESS\x10\x08\x12\x0f\n\x0bGLS_EXPRESS\x10\t\x12\x0f\n\x0bGLS_PRIVATE\x10\n\x12\x16\n\x12\x43OLISSIMO_DOMICILE\x10\x0b\x12\x14\n\x10\x44HL_EXPRESS_12AM\x10\x0c\x12\x13\n\x0f\x44HL_EXPRESS_9AM\x10\r\x12\x12\n\x0eGEODIS_EXPRESS\x10\x0e\x12\x12\n\x0eGEODIS_PACK_30\x10\x0f\x12\x13\n\x0fGEODIS_SAME_DAY\x10\x10\x12\x11\n\rGEODIS_TOP_24\x10\x11\x12\x15\n\x11TNT_ESSENTIEL_24H\x10\x12\x12\x1d\n\x19TNT_ESSENTIEL_FLEXIBILITE\x10\x13\x12\x10\n\x0c\x46\x45\x44\x45X_GROUND\x10\x14\x12\x17\n\x13\x46\x45\x44\x45X_HOME_DELIVERY\x10\x15\x12\x17\n\x13\x46\x45\x44\x45X_EXPRESS_SAVER\x10\x16\x12\x19\n\x15\x46\x45\x44\x45X_FIRST_OVERNIGHT\x10\x17\x12\x1c\n\x18\x46\x45\x44\x45X_PRIORITY_OVERNIGHT\x10\x18\x12\x1c\n\x18\x46\x45\x44\x45X_STANDARD_OVERNIGHT\x10\x19\x12\x0e\n\nFEDEX_2DAY\x10\x1a\x12\x13\n\x0fUPS_2ND_DAY_AIR\x10\x1b\x12\x12\n\x0eUPS_2ND_DAY_AM\x10\x1c\x12\x14\n\x10UPS_3_DAY_SELECT\x10\x1d\x12\x0e\n\nUPS_GROUND\x10\x1e\x12\x14\n\x10UPS_NEXT_DAY_AIR\x10\x1f\x12\x1d\n\x19UPS_NEXT_DAY_AIR_EARLY_AM\x10 \x12\x1a\n\x16UPS_NEXT_DAY_AIR_SAVER\x10!\x12\x1e\n\x1aUSPS_PRIORITY_MAIL_EXPRESS\x10\"\x12\x13\n\x0fUSPS_MEDIA_MAIL\x10#\x12 \n\x1cUSPS_GROUND_ADVANTAGE_RETAIL\x10$\x12\x16\n\x12USPS_PRIORITY_MAIL\x10%\x12$\n USPS_GROUND_ADVANTAGE_COMMERCIAL\x10&\x12\x19\n\x15USPS_FIRST_CLASS_MAIL\x10\'B\x86\x02\n(com.google.shopping.merchant.products.v1B\x13ProductsCommonProtoP\x01ZJcloud.google.com/go/shopping/merchant/products/apiv1/productspb;productspb\xaa\x02$Google.Shopping.Merchant.Products.V1\xca\x02$Google\\Shopping\\Merchant\\Products\\V1\xea\x02(Google::Shopping::Merchant::Products::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Products - module V1 - ProductAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes").msgclass - ProductAttributes::ShippingBusinessDaysConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.ShippingBusinessDaysConfig").msgclass - ProductAttributes::CarrierShipping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.CarrierShipping").msgclass - ProductAttributes::Mileage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.Mileage").msgclass - ProductAttributes::Mileage::Unit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.Mileage.Unit").enummodule - ProductAttributes::FuelConsumption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.FuelConsumption").msgclass - ProductAttributes::FuelConsumption::Unit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.FuelConsumption.Unit").enummodule - ProductAttributes::EnergyConsumption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.EnergyConsumption").msgclass - ProductAttributes::EnergyConsumption::Unit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.EnergyConsumption.Unit").enummodule - ProductAttributes::Co2Emissions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.Co2Emissions").msgclass - ProductAttributes::Co2Emissions::Unit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.Co2Emissions.Unit").enummodule - ProductAttributes::Warranty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.Warranty").msgclass - ProductAttributes::ProductFee = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.ProductFee").msgclass - ProductAttributes::ProductFee::FeeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.ProductFee.FeeType").enummodule - ProductAttributes::DisplayAddress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.DisplayAddress").msgclass - ProductAttributes::UnitArea = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.UnitArea").msgclass - ProductAttributes::UnitArea::Unit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.UnitArea.Unit").enummodule - ProductAttributes::PetPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.PetPolicy").msgclass - ProductAttributes::PetPolicy::PetType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.PetPolicy.PetType").enummodule - ProductAttributes::QuestionAndAnswer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.QuestionAndAnswer").msgclass - ProductAttributes::VariantOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.VariantOption").msgclass - ProductAttributes::RelatedProduct = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct").msgclass - ProductAttributes::RelatedProduct::RelationshipType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.RelationshipType").enummodule - ProductAttributes::RelatedProduct::IdType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.IdType").enummodule - ProductAttributes::CarrierPriceOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.CarrierPriceOption").enummodule - ProductAttributes::VehicleBodyStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.VehicleBodyStyle").enummodule - ProductAttributes::EngineType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.EngineType").enummodule - ProductAttributes::EmissionsStandard = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.EmissionsStandard").enummodule - ProductAttributes::VehiclePriceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.VehiclePriceType").enummodule - ProductAttributes::PropertyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.PropertyType").enummodule - ProductAttributes::AmenityFeature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.AmenityFeature").enummodule - ProductAttributes::UtilitiesIncluded = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.UtilitiesIncluded").enummodule - ProductAttributes::SpecialtyHousingType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.SpecialtyHousingType").enummodule - ShippingWeight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ShippingWeight").msgclass - ShippingDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ShippingDimension").msgclass - UnitPricingBaseMeasure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.UnitPricingBaseMeasure").msgclass - UnitPricingMeasure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.UnitPricingMeasure").msgclass - SubscriptionCost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.SubscriptionCost").msgclass - ProductInstallment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductInstallment").msgclass - LoyaltyPoints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.LoyaltyPoints").msgclass - LoyaltyProgram = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.LoyaltyProgram").msgclass - Shipping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.Shipping").msgclass - FreeShippingThreshold = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.FreeShippingThreshold").msgclass - ProductDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductDetail").msgclass - ProductCertification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductCertification").msgclass - StructuredTitle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.StructuredTitle").msgclass - StructuredDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.StructuredDescription").msgclass - ProductDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductDimension").msgclass - ProductWeight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductWeight").msgclass - ProductStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductStatus").msgclass - ProductStatus::DestinationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductStatus.DestinationStatus").msgclass - ProductStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductStatus.ItemLevelIssue").msgclass - ProductStatus::ItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductStatus.ItemLevelIssue.Severity").enummodule - CloudExportAdditionalProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.CloudExportAdditionalProperties").msgclass - ProductSustainabilityIncentive = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductSustainabilityIncentive").msgclass - ProductSustainabilityIncentive::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductSustainabilityIncentive.Type").enummodule - AutomatedDiscounts = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.AutomatedDiscounts").msgclass - PickupCost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.PickupCost").msgclass - HandlingCutoffTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.HandlingCutoffTime").msgclass - ProductMinimumOrderValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductMinimumOrderValue").msgclass - ProductMinimumOrderValue::Surface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductMinimumOrderValue.Surface").enummodule - SubscriptionPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.SubscriptionPeriod").enummodule - AgeGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.AgeGroup").enummodule - Availability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.Availability").enummodule - Condition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.Condition").enummodule - Gender = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.Gender").enummodule - CreditType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.CreditType").enummodule - SizeSystem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.SizeSystem").enummodule - SizeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.SizeType").enummodule - EnergyEfficiencyClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.EnergyEfficiencyClass").enummodule - PickupMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.PickupMethod").enummodule - PickupSla = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.PickupSla").enummodule - Pause = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.Pause").enummodule - CertificationAuthority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.CertificationAuthority").enummodule - CertificationName = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.CertificationName").enummodule - DigitalSourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.DigitalSourceType").enummodule - CarrierTransitTimeOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.CarrierTransitTimeOption").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_pb.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_pb.rb deleted file mode 100644 index 129d79605e94..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_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/products/v1/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/merchant/products/v1/products_common_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n3google/shopping/merchant/products/v1/products.proto\x12$google.shopping.merchant.products.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/products/v1/products_common.proto\x1a google/shopping/type/types.proto\"\xa8\x05\n\x07Product\x12\x0c\n\x04name\x18\x01 \x01(\t\x12 \n\x13\x62\x61se64_encoded_name\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0clegacy_local\x18\x0b \x01(\x08\x42\x03\xe0\x41\x03\x12\x15\n\x08offer_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63ontent_language\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nfeed_label\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x61ta_source\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12 \n\x0eversion_number\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12X\n\x12product_attributes\x18\r \x01(\x0b\x32\x37.google.shopping.merchant.products.v1.ProductAttributesB\x03\xe0\x41\x03\x12\x45\n\x11\x63ustom_attributes\x18\t \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x03\x12P\n\x0eproduct_status\x18\n \x01(\x0b\x32\x33.google.shopping.merchant.products.v1.ProductStatusB\x03\xe0\x41\x03\x12Z\n\x13\x61utomated_discounts\x18\x0c \x01(\x0b\x32\x38.google.shopping.merchant.products.v1.AutomatedDiscountsB\x03\xe0\x41\x03\x12\x15\n\x08\x61rchived\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03:N\xea\x41K\n\"merchantapi.googleapis.com/Product\x12%accounts/{account}/products/{product}B\x11\n\x0f_version_number\"M\n\x11GetProductRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Product\"x\n\x13ListProductsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"merchantapi.googleapis.com/Product\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"p\n\x14ListProductsResponse\x12?\n\x08products\x18\x01 \x03(\x0b\x32-.google.shopping.merchant.products.v1.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xcf\x03\n\x0fProductsService\x12\xae\x01\n\nGetProduct\x12\x37.google.shopping.merchant.products.v1.GetProductRequest\x1a-.google.shopping.merchant.products.v1.Product\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/products/v1/{name=accounts/*/products/*}\x12\xc1\x01\n\x0cListProducts\x12\x39.google.shopping.merchant.products.v1.ListProductsRequest\x1a:.google.shopping.merchant.products.v1.ListProductsResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/products/v1/{parent=accounts/*}/products\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xbb\x02\n(com.google.shopping.merchant.products.v1B\rProductsProtoP\x01ZJcloud.google.com/go/shopping/merchant/products/apiv1/productspb;productspb\xaa\x02$Google.Shopping.Merchant.Products.V1\xca\x02$Google\\Shopping\\Merchant\\Products\\V1\xea\x02(Google::Shopping::Merchant::Products::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 Products - module V1 - Product = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.Product").msgclass - GetProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.GetProductRequest").msgclass - ListProductsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ListProductsRequest").msgclass - ListProductsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ListProductsResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service.rb deleted file mode 100644 index 64476f45cd43..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_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/products/v1/version" - -require "google/shopping/merchant/products/v1/products_service/credentials" -require "google/shopping/merchant/products/v1/products_service/paths" -require "google/shopping/merchant/products/v1/products_service/client" -require "google/shopping/merchant/products/v1/products_service/rest" - -module Google - module Shopping - module Merchant - module Products - module V1 - ## - # Service to use Product resource. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/products/v1/products_service" - # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/products/v1/products_service/rest" - # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new - # - module ProductsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "products_service", "helpers.rb" -require "google/shopping/merchant/products/v1/products_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/client.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/client.rb deleted file mode 100644 index b77959106caf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/client.rb +++ /dev/null @@ -1,636 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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/products/v1/products_pb" - -module Google - module Shopping - module Merchant - module Products - module V1 - module ProductsService - ## - # Client for the ProductsService service. - # - # Service to use Product resource. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :products_service_stub - - ## - # Configure the ProductsService Client class. - # - # See {::Google::Shopping::Merchant::Products::V1::ProductsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ProductsService clients - # ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.configure do |config| - # config.timeout = 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", "Products", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.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 ProductsService Client instance. - # - # The configuration is set to the derived mode, meaning that values 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::Products::V1::ProductsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @products_service_stub.universe_domain - end - - ## - # Create a new ProductsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ProductsService 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/products/v1/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 - - @products_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Products::V1::ProductsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @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 - @products_service_stub.logger - end - - # Service calls - - ## - # Retrieves the processed product from your Merchant 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_product(request, options = nil) - # Pass arguments to `get_product` via a request object, either of type - # {::Google::Shopping::Merchant::Products::V1::GetProductRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Products::V1::GetProductRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_product(name: nil) - # Pass arguments to `get_product` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the product. - # Format: `accounts/{account}/products/{product}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url - # encoded string (RFC 4648 Section 5). The decoded string must result - # in the `content_language~feed_label~offer_id` structure. This encoding - # MUST be used if any part of the product identifier (like `offer_id`) - # contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123`, the - # `{product}` segment must be the unpadded base64url encoding of this - # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - # - # Note: For calls to the v1beta version, the plain format is - # `channel~content_language~feed_label~offer_id`, for example: - # `accounts/123/products/online~en~US~sku123`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Products::V1::Product] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Products::V1::Product] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/products/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Products::V1::ProductsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Products::V1::GetProductRequest.new - # - # # Call the get_product method. - # result = client.get_product request - # - # # The returned object is of type Google::Shopping::Merchant::Products::V1::Product. - # p result - # - def get_product request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::GetProductRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_product.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Products::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_product.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_product.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @products_service_stub.call_rpc :get_product, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the processed products in your Merchant 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 product input, it may take several - # minutes before the updated processed product can be retrieved. - # - # @overload list_products(request, options = nil) - # Pass arguments to `list_products` via a request object, either of type - # {::Google::Shopping::Merchant::Products::V1::ListProductsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Products::V1::ListProductsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_products(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_products` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to list processed products for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # The maximum number of 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 default page size of 25 products will be returned. - # @param page_token [::String] - # A page token, received from a previous `ListProducts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListProducts` 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::Products::V1::Product>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Products::V1::Product>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/products/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Products::V1::ProductsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Products::V1::ListProductsRequest.new - # - # # Call the list_products method. - # result = client.list_products request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Products::V1::Product. - # p item - # end - # - def list_products request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::ListProductsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_products.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Products::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_products.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_products.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @products_service_stub.call_rpc :list_products, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @products_service_stub, :list_products, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ProductsService API. - # - # This class represents the configuration for ProductsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Products::V1::ProductsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_product to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_product.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_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::Merchant::Products::V1::ProductsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ProductsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_product` - # @return [::Gapic::Config::Method] - # - attr_reader :get_product - ## - # RPC-specific configuration for `list_products` - # @return [::Gapic::Config::Method] - # - attr_reader :list_products - - # @private - def initialize parent_rpcs = nil - get_product_config = parent_rpcs.get_product if parent_rpcs.respond_to? :get_product - @get_product = ::Gapic::Config::Method.new get_product_config - list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products - @list_products = ::Gapic::Config::Method.new list_products_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/credentials.rb deleted file mode 100644 index 452534d75641..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_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 Products - module V1 - module ProductsService - # Credentials for the ProductsService 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-products-v1/lib/google/shopping/merchant/products/v1/products_service/paths.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/paths.rb deleted file mode 100644 index e94269725235..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_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 Products - module V1 - module ProductsService - # Path helper methods for the ProductsService 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-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest.rb deleted file mode 100644 index 0a338c0d900e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_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/products/v1/version" - -require "google/shopping/merchant/products/v1/products_service/credentials" -require "google/shopping/merchant/products/v1/products_service/paths" -require "google/shopping/merchant/products/v1/products_service/rest/client" - -module Google - module Shopping - module Merchant - module Products - module V1 - ## - # Service to use Product resource. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/products/v1/products_service/rest" - # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new - # - module ProductsService - # 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/products/v1/products_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/client.rb deleted file mode 100644 index 99fb8c0c1a03..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/client.rb +++ /dev/null @@ -1,579 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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/products/v1/products_pb" -require "google/shopping/merchant/products/v1/products_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Products - module V1 - module ProductsService - module Rest - ## - # REST client for the ProductsService service. - # - # Service to use Product resource. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :products_service_stub - - ## - # Configure the ProductsService Client class. - # - # See {::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ProductsService clients - # ::Google::Shopping::Merchant::Products::V1::ProductsService::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", "Products", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.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 ProductsService Client instance. - # - # The configuration is set to the derived mode, meaning that values 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::Products::V1::ProductsService::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 - @products_service_stub.universe_domain - end - - ## - # Create a new ProductsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ProductsService 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 - - @products_service_stub = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @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 - @products_service_stub.logger - end - - # Service calls - - ## - # Retrieves the processed product from your Merchant 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_product(request, options = nil) - # Pass arguments to `get_product` via a request object, either of type - # {::Google::Shopping::Merchant::Products::V1::GetProductRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Products::V1::GetProductRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_product(name: nil) - # Pass arguments to `get_product` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the product. - # Format: `accounts/{account}/products/{product}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url - # encoded string (RFC 4648 Section 5). The decoded string must result - # in the `content_language~feed_label~offer_id` structure. This encoding - # MUST be used if any part of the product identifier (like `offer_id`) - # contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123`, the - # `{product}` segment must be the unpadded base64url encoding of this - # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - # - # Note: For calls to the v1beta version, the plain format is - # `channel~content_language~feed_label~offer_id`, for example: - # `accounts/123/products/online~en~US~sku123`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Products::V1::Product] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Products::V1::Product] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/products/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Products::V1::GetProductRequest.new - # - # # Call the get_product method. - # result = client.get_product request - # - # # The returned object is of type Google::Shopping::Merchant::Products::V1::Product. - # p result - # - def get_product request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::GetProductRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_product.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Products::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_product.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_product.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @products_service_stub.get_product request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the processed products in your Merchant 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 product input, it may take several - # minutes before the updated processed product can be retrieved. - # - # @overload list_products(request, options = nil) - # Pass arguments to `list_products` via a request object, either of type - # {::Google::Shopping::Merchant::Products::V1::ListProductsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Products::V1::ListProductsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_products(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_products` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to list processed products for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # The maximum number of 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 default page size of 25 products will be returned. - # @param page_token [::String] - # A page token, received from a previous `ListProducts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListProducts` 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::Products::V1::Product>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Products::V1::Product>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/products/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Products::V1::ListProductsRequest.new - # - # # Call the list_products method. - # result = client.list_products request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Products::V1::Product. - # p item - # end - # - def list_products request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1::ListProductsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_products.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Products::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_products.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_products.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @products_service_stub.list_products request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @products_service_stub, :list_products, "products", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ProductsService REST API. - # - # This class represents the configuration for ProductsService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_product to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_product.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the ProductsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_product` - # @return [::Gapic::Config::Method] - # - attr_reader :get_product - ## - # RPC-specific configuration for `list_products` - # @return [::Gapic::Config::Method] - # - attr_reader :list_products - - # @private - def initialize parent_rpcs = nil - get_product_config = parent_rpcs.get_product if parent_rpcs.respond_to? :get_product - @get_product = ::Gapic::Config::Method.new get_product_config - list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products - @list_products = ::Gapic::Config::Method.new list_products_config - - 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-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/service_stub.rb deleted file mode 100644 index 31581fcf3077..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_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/products/v1/products_pb" - -module Google - module Shopping - module Merchant - module Products - module V1 - module ProductsService - module Rest - ## - # REST service stub for the ProductsService 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_product REST call - # - # @param request_pb [::Google::Shopping::Merchant::Products::V1::GetProductRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Products::V1::Product] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Products::V1::Product] - # A result object deserialized from the server's reply - def get_product request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_product_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_product", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Products::V1::Product.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_products REST call - # - # @param request_pb [::Google::Shopping::Merchant::Products::V1::ListProductsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Products::V1::ListProductsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Products::V1::ListProductsResponse] - # A result object deserialized from the server's reply - def list_products request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_products_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_products", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Products::V1::ListProductsResponse.decode_json response.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_product REST call - # - # @param request_pb [::Google::Shopping::Merchant::Products::V1::GetProductRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_product_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/products/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_products REST call - # - # @param request_pb [::Google::Shopping::Merchant::Products::V1::ListProductsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_products_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/products/v1/{parent}/products", - 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-products-v1/lib/google/shopping/merchant/products/v1/products_services_pb.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_services_pb.rb deleted file mode 100644 index 21a0bd234222..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_services_pb.rb +++ /dev/null @@ -1,57 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/products/v1/products.proto for package 'Google.Shopping.Merchant.Products.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/products/v1/products_pb' - -module Google - module Shopping - module Merchant - module Products - module V1 - module ProductsService - # Service to use Product resource. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.products.v1.ProductsService' - - # Retrieves the processed product from your Merchant Center account. - # - # After inserting, updating, or deleting a product input, it may take several - # minutes before the updated final product can be retrieved. - rpc :GetProduct, ::Google::Shopping::Merchant::Products::V1::GetProductRequest, ::Google::Shopping::Merchant::Products::V1::Product - # Lists the processed products in your Merchant 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 product input, it may take several - # minutes before the updated processed product can be retrieved. - rpc :ListProducts, ::Google::Shopping::Merchant::Products::V1::ListProductsRequest, ::Google::Shopping::Merchant::Products::V1::ListProductsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/rest.rb deleted file mode 100644 index 35efbd477133..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/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/products/v1/product_inputs_service/rest" -require "google/shopping/merchant/products/v1/products_service/rest" -require "google/shopping/merchant/products/v1/version" - -module Google - module Shopping - module Merchant - module Products - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/products/v1/rest" - # client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/version.rb b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/version.rb deleted file mode 100644 index 8daac29a337a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/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 Products - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/README.md deleted file mode 100644 index 110adc2cf42e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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. - # - # Note: This field should not be used in most cases. - 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. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # 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-products-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 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-products-v1/proto_docs/google/shopping/merchant/products/v1/productinputs.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/productinputs.rb deleted file mode 100644 index 852b9c4e5e01..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/productinputs.rb +++ /dev/null @@ -1,297 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Products - module V1 - # This resource represents input data you submit for a product, not the - # processed product that you see in Merchant Center, in Shopping ads, or - # across Google surfaces. Product inputs, rules and supplemental data source - # data are combined to create the processed - # {::Google::Shopping::Merchant::Products::V1::Product Product}. For more - # information, see [Manage products](/merchant/api/guides/products/overview). - # - # Required product input attributes to pass data validation checks are - # primarily defined in the [Products Data - # Specification](https://support.google.com/merchants/answer/188494). - # - # The following attributes are required: - # {::Google::Shopping::Merchant::Products::V1::Product#feed_label feedLabel}, - # {::Google::Shopping::Merchant::Products::V1::Product#content_language contentLanguage} - # and {::Google::Shopping::Merchant::Products::V1::Product#offer_id offerId}. - # - # After inserting, updating, or deleting a product input, it may take several - # minutes before the processed product can be retrieved. - # - # All fields in the product input and its sub-messages match the English name - # of their corresponding attribute in the [Products Data - # Specification](https://support.google.com/merchants/answer/188494) with - # [some exceptions](https://support.google.com/merchants/answer/7052112). - # The following reference documentation lists the field names in the - # **camelCase** casing style while the Products Data Specification lists the - # names in the **snake_case** casing style. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the product. - # Format: `accounts/{account}/productInputs/{productinput}` - # - # The \\{productinput} segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the \\{productinput} segment in the URL is automatically - # detected by the server, supporting two options: - # - # 1. **Encoded Format**: The `{productinput}` segment is an unpadded - # base64url - # encoded string (RFC 4648 Section 5). The decoded string must result - # in the `content_language~feed_label~offer_id` structure. This encoding - # MUST be used if any part of the product identifier (like `offer_id`) - # contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123`, the - # `{productinput}` segment must be the unpadded base64url encoding of - # this string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw`. - # - # 2. **Plain Format**: The `{productinput}` segment is the tilde-separated - # string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{productinput}` segment is used - # to differentiate between the two formats. - # @!attribute [r] base64_encoded_name - # @return [::String] - # Output only. The **unpadded base64url encoded name** of the product input. - # Format: - # `accounts/{account}/productInputs/{productinput}` where the last - # section `productinput` is the unpadded base64url encoding of the - # `content_language~feed_label~offer_id` name. - # Example: `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw` for the decoded - # product input name `accounts/123/productInputs/en~US~sku/123`. This field - # can be used directly as input to the API methods that require the product - # input name to be encoded if it contains special characters, for example - # [`GetProductInput`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.productInputs/get). - # @!attribute [r] product - # @return [::String] - # Output only. The name of the processed product. - # Format: `accounts/{account}/products/{product}` - # @!attribute [r] base64_encoded_product - # @return [::String] - # Output only. The **unpadded base64url encoded name** of the processed - # product. Format: `accounts/{account}/products/{product}` where the last - # section `product` is the unpadded base64url encoding of the - # `content_language~feed_label~offer_id` name. - # Example: `accounts/123/products/ZW5-VVN-c2t1LzEyMw` for the decoded - # product name `accounts/123/products/en~US~sku/123`. This field can be used - # directly as input to the API methods that require the product name to be - # encoded if it contains special characters, for example - # [`GetProduct`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.products/get). - # @!attribute [rw] legacy_local - # @return [::Boolean] - # Immutable. Determines whether the product is **only** targeting - # local destinations and whether the product name should be distinguished - # with a `local~` prefix. For example, - # `accounts/123/productInputs/local~en~US~sku123`. If a product that is not - # `legacy_local` is already targeting local destinations, - # creating a `legacy_local` product with an otherwise matching name will - # fail. - # @!attribute [rw] offer_id - # @return [::String] - # Required. Immutable. Your unique identifier for the product. This is the - # same for the product input and processed product. Leading and trailing - # whitespaces are stripped and multiple whitespaces are replaced by a single - # whitespace upon submission. See the [products data - # specification](https://support.google.com/merchants/answer/188494#id) for - # details. - # @!attribute [rw] content_language - # @return [::String] - # Required. Immutable. The two-letter [ISO - # 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the - # product. - # @!attribute [rw] feed_label - # @return [::String] - # Required. Immutable. The feed label that lets you categorize and identify - # your products. The maximum allowed characters are 20, and the supported - # characters are `A-Z`, `0-9`, hyphen, and underscore. The feed label must - # not include any spaces. For more information, see [Using feed - # labels](//support.google.com/merchants/answer/14994087). - # @!attribute [rw] version_number - # @return [::Integer] - # Optional. Immutable. Represents the existing version (freshness) of the - # product, which can be used to preserve the right order when multiple - # updates are done at the same time. - # - # If set, the insertion is prevented when version number is lower than - # the current version number of the existing product. Re-insertion (for - # example, product refresh after 30 days) can be performed with the current - # `version_number`. - # - # Only supported for insertions into primary data sources. - # Do not set this field for updates. - # Do not set this field for insertions into supplemental data sources. - # - # If the operation is prevented, the aborted exception will be - # thrown. - # @!attribute [rw] product_attributes - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes] - # Optional. A list of strongly-typed product attributes. - # @!attribute [rw] custom_attributes - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Optional. A list of custom (merchant-provided) attributes. It can also be - # used for submitting any attribute of the data specification in its generic - # form (for example, - # `{ "name": "size type", "value": "regular" }`). - # This is useful for submitting attributes not explicitly exposed by the - # API. - # Maximum allowed number of characters for each - # custom attribute is 10240 (represents sum of characters for name and - # value). Maximum 2500 custom attributes can be set per product, with total - # size of 102.4kB. Underscores in custom attribute names are replaced by - # spaces upon insertion. - class ProductInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the InsertProductInput method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account where this product will be inserted. - # Format: `accounts/{account}` - # @!attribute [rw] product_input - # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] - # Required. The product input to insert. - # @!attribute [rw] data_source - # @return [::String] - # Required. The primary or supplemental product data source name. If the - # product already exists and data source provided is different, then the - # product will be moved to a new data source. For more information, see - # [Create a primary data - # source](/merchant/api/guides/data-sources/api-sources#create-primary-data-source). - # - # Only API data sources are supported. - # - # Format: `accounts/{account}/dataSources/{datasource}`. For example, - # `accounts/123456/dataSources/104628`. - class InsertProductInputRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateProductInput method. - # The product (primary input) must exist for the update to succeed. - # If the update is for a primary product input, the existing primary product - # input must be from the same data source. - # @!attribute [rw] product_input - # @return [::Google::Shopping::Merchant::Products::V1::ProductInput] - # Required. The product input resource to update. Information you submit will - # be applied to the processed product as well. The `name` field within this - # resource identifies the product input to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of 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 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 product replacement is not supported. - # @!attribute [rw] data_source - # @return [::String] - # Required. The primary or supplemental product data source where - # `data_source` name identifies the product input to be updated. - # - # Only API data sources are supported. - # - # Format: `accounts/{account}/dataSources/{datasource}`. For example, - # `accounts/123456/dataSources/104628`. - class UpdateProductInputRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteProductInput method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the product input to delete. - # Format: `accounts/{account}/productInputs/{productInput}` - # - # The \\{productInput} segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the \\{productInput} segment in the URL is automatically - # detected by the server, supporting two options: - # - # 1. **Encoded Format**: The `{productInput}` segment is an unpadded - # base64url - # encoded string (RFC 4648 Section 5). The decoded string must result - # in the `content_language~feed_label~offer_id` structure. This encoding - # MUST be used if any part of the product identifier (like `offer_id`) - # contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123`, the - # `{productInput}` segment must be the unpadded base64url encoding of - # this string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw`. - # - # 2. **Plain Format**: The `{productInput}` segment is the tilde-separated - # string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{productInput}` segment is used - # to differentiate between the two formats. - # @!attribute [rw] data_source - # @return [::String] - # Required. The primary or supplemental data source from which the product - # input should be deleted. Format: - # `accounts/{account}/dataSources/{datasource}`. For example, - # `accounts/123456/dataSources/104628`. - class DeleteProductInputRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products.rb deleted file mode 100644 index d83cd354ded6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products.rb +++ /dev/null @@ -1,221 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Products - module V1 - # The processed product, built from multiple [product - # inputs][google.shopping.merchant.products.v1main.ProductInput] - # after applying rules and supplemental data sources. This processed product - # matches what is shown in your Merchant Center account. Each product is built - # from exactly one primary data source product input, and multiple supplemental - # data source inputs. After inserting, updating, or deleting a product input, - # it may take several minutes before the updated processed product can be - # retrieved. - # - # All fields in the processed product and its sub-messages match the name of - # their corresponding attribute in the [Product data - # specification](https://support.google.com/merchants/answer/7052112) with some - # exceptions. - # @!attribute [rw] name - # @return [::String] - # The name of the product. - # Format: - # `accounts/{account}/products/{product}` where the last - # section `product` consists of: - # `content_language~feed_label~offer_id` - # example for product name is `accounts/123/products/en~US~sku123`. A legacy - # local product name would be `accounts/123/products/local~en~US~sku123`. - # Note: For calls to the v1beta version, the `product` section consists - # of: `channel~content_language~feed_label~offer_id`, for example: - # `accounts/123/products/online~en~US~sku123`. - # @!attribute [r] base64_encoded_name - # @return [::String] - # Output only. The **unpadded base64url encoded name** of the product. - # Format: - # `accounts/{account}/products/{product}` where the last - # section `product` is the unpadded base64url encoding of the - # `content_language~feed_label~offer_id` name. - # Example: `accounts/123/products/ZW5-VVN-c2t1LzEyMw` for the decoded product - # name `accounts/123/products/en~US~sku/123`. This field can be used directly - # as input to the API methods that require the product name to be encoded if - # it contains special characters, for example - # [`GetProduct`](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.products/get). - # @!attribute [r] legacy_local - # @return [::Boolean] - # Output only. Determines whether the product is **only** targeting - # local destinations and whether the product name should be distinguished - # with a `local~` prefix. For example, - # `accounts/123/products/local~en~US~sku123`. - # @!attribute [r] offer_id - # @return [::String] - # Output only. Your unique identifier for the product. This is the same for - # the product input and processed product. Leading and trailing whitespaces - # are stripped and multiple whitespaces are replaced by a single whitespace - # upon submission. See the [product data - # specification](https://support.google.com/merchants/answer/188494#id) for - # details. - # @!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 lets you categorize and identify your products. - # The maximum allowed characters is 20 and the supported characters are`A-Z`, - # `0-9`, hyphen and underscore. The feed label must not include any spaces. - # For more information, see [Using feed - # labels](//support.google.com/merchants/answer/14994087) - # @!attribute [r] data_source - # @return [::String] - # Output only. The primary data source of the product. - # @!attribute [r] version_number - # @return [::Integer] - # Output only. Represents the existing version (freshness) of the product, - # which can be used to preserve the right order when multiple updates are - # done at the same time. - # - # If set, the insertion is prevented when version number is lower than - # the current version number of the existing product. Re-insertion (for - # example, product refresh after 30 days) can be performed with the current - # `version_number`. - # - # Only supported for insertions into primary data sources. - # - # If the operation is prevented, the aborted exception will be - # thrown. - # @!attribute [r] product_attributes - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes] - # Output only. A list of strongly-typed product attributes. - # @!attribute [r] custom_attributes - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Output only. A list of custom (merchant-provided) attributes. It can also - # be used to submit any attribute of the data 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] product_status - # @return [::Google::Shopping::Merchant::Products::V1::ProductStatus] - # Output only. The status of a product, data validation issues, that is, - # information about a product computed asynchronously. - # @!attribute [r] automated_discounts - # @return [::Google::Shopping::Merchant::Products::V1::AutomatedDiscounts] - # Output only. The automated discounts information for the product. - # @!attribute [r] archived - # @return [::Boolean] - # Output only. Determines whether the product is - # [archived](https://support.google.com/merchants/answer/11909930). - # - # To archive or restore your product, visit Merchant Center products page. - # Learn also more about [offer - # visibility](https://support.google.com/merchants/answer/12488713). - class Product - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the GetProduct method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the product. - # Format: `accounts/{account}/products/{product}` - # - # The `{product}` segment is a unique identifier for the product. - # This identifier must be unique within a merchant account and generally - # follows the structure: `content_language~feed_label~offer_id`. Example: - # `en~US~sku123` For legacy local products, the structure is: - # `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` - # - # The format of the `{product}` segment in the URL is automatically detected - # by the server, supporting two options: - # - # 1. **Encoded Format**: The `{product}` segment is an unpadded base64url - # encoded string (RFC 4648 Section 5). The decoded string must result - # in the `content_language~feed_label~offer_id` structure. This encoding - # MUST be used if any part of the product identifier (like `offer_id`) - # contains characters such as `/`, `%`, or `~`. - # * Example: To represent the product ID `en~US~sku/123`, the - # `{product}` segment must be the unpadded base64url encoding of this - # string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/products/ZW5-VVN-c2t1LzEyMw`. - # - # 2. **Plain Format**: The `{product}` segment is the tilde-separated string - # `content_language~feed_label~offer_id`. This format is suitable only - # when `content_language`, `feed_label`, and `offer_id` do not contain - # URL-problematic characters like `/`, `%`, or `~`. - # - # We recommend using the **Encoded Format** for all product IDs to ensure - # correct parsing, especially those containing special characters. The - # presence of tilde (`~`) characters in the `{product}` segment is used to - # differentiate between the two formats. - # - # Note: For calls to the v1beta version, the plain format is - # `channel~content_language~feed_label~offer_id`, for example: - # `accounts/123/products/online~en~US~sku123`. - class GetProductRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListProducts method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to list processed products for. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of 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 default page size of 25 products will be returned. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListProducts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListProducts` must - # match the call that provided the page token. - class ListProductsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListProducts method. - # @!attribute [rw] products - # @return [::Array<::Google::Shopping::Merchant::Products::V1::Product>] - # The processed products from the specified account. These are your processed - # products after applying rules and supplemental data sources. - # @!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 ListProductsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products_common.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products_common.rb deleted file mode 100644 index f2889cd30f1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products_common.rb +++ /dev/null @@ -1,2786 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Products - module V1 - # Product attributes. - # @!attribute [rw] identifier_exists - # @return [::Boolean] - # Set this value to false when the item does not have unique product - # identifiers appropriate to its category, such as GTIN, MPN, and brand. - # Defaults to true, if not provided. - # @!attribute [rw] is_bundle - # @return [::Boolean] - # Whether the item is a business-defined sub-API. A [sub-API] - # (https://support.google.com/merchants/answer/6324449) is a custom - # grouping of different products sold by a business for a single price. - # @!attribute [rw] title - # @return [::String] - # Title of the item. - # @!attribute [rw] description - # @return [::String] - # Description of the item. - # @!attribute [rw] link - # @return [::String] - # URL directly linking to your item's page on your online store. - # @!attribute [rw] mobile_link - # @return [::String] - # URL for the mobile-optimized version of your item's landing page. - # @!attribute [rw] canonical_link - # @return [::String] - # URL for the canonical version of your item's landing page. - # @!attribute [rw] image_link - # @return [::String] - # URL of an image of the item. - # @!attribute [rw] additional_image_links - # @return [::Array<::String>] - # Additional URLs of images of the item. - # @!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. - # @!attribute [rw] disclosure_date - # @return [::Google::Protobuf::Timestamp] - # The date time when an offer becomes visible in search results across - # Google’s YouTube surfaces, in [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. - # See [Disclosure date](https://support.google.com/merchants/answer/13034208) - # for more information. - # @!attribute [rw] adult - # @return [::Boolean] - # Set to true if the item is targeted towards adults. - # @!attribute [rw] age_group - # @return [::Google::Shopping::Merchant::Products::V1::AgeGroup] - # Target [age group](https://support.google.com/merchants/answer/6324463) of - # the item. - # @!attribute [rw] availability - # @return [::Google::Shopping::Merchant::Products::V1::Availability] - # [Availability](https://support.google.com/merchants/answer/6324448) status - # of the item. - # @!attribute [rw] availability_date - # @return [::Google::Protobuf::Timestamp] - # The day a pre-ordered product becomes available for delivery, in [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. - # @!attribute [rw] brand - # @return [::String] - # [Brand](https://support.google.com/merchants/answer/6324351) of the item. - # For example, "Google". - # @!attribute [rw] color - # @return [::String] - # [Color](https://support.google.com/merchants/answer/6324487) of the item. - # For example, "red". - # @!attribute [rw] condition - # @return [::Google::Shopping::Merchant::Products::V1::Condition] - # [Condition](https://support.google.com/merchants/answer/6324469) or state - # of the item. - # @!attribute [rw] gender - # @return [::Google::Shopping::Merchant::Products::V1::Gender] - # Target [gender](https://support.google.com/merchants/answer/6324479) of the - # item. - # @!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] gtins - # @return [::Array<::String>] - # Global Trade Item Numbers - # ([GTIN](https://support.google.com/merchants/answer/6324461)) of the - # item. - # You can provide up to 10 GTINs. - # @!attribute [rw] item_group_id - # @return [::String] - # Shared identifier for all variants of the same product. - # @!attribute [rw] material - # @return [::String] - # The [material](https://support.google.com/merchants/answer/6324410) of - # which the item is made. For example, "Leather" or "Cotton". - # @!attribute [rw] mpn - # @return [::String] - # Manufacturer Part Number - # ([MPN](https://support.google.com/merchants/answer/6324482)) of the - # item. - # @!attribute [rw] pattern - # @return [::String] - # The item's [pattern](https://support.google.com/merchants/answer/6324483). - # For example, polka dots. - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Price of the item. - # @!attribute [rw] maximum_retail_price - # @return [::Google::Shopping::Type::Price] - # Maximum retail price (MRP) of the item. Applicable to India only. - # @!attribute [rw] installment - # @return [::Google::Shopping::Merchant::Products::V1::ProductInstallment] - # Number and amount of installments to pay for an item. - # @!attribute [rw] subscription_cost - # @return [::Google::Shopping::Merchant::Products::V1::SubscriptionCost] - # Number of periods (weeks, months or years) and amount of payment per period - # for an item with an associated subscription contract. - # @!attribute [rw] loyalty_points - # @return [::Google::Shopping::Merchant::Products::V1::LoyaltyPoints] - # Loyalty points that users receive after purchasing the item. Japan only. - # @!attribute [rw] loyalty_programs - # @return [::Array<::Google::Shopping::Merchant::Products::V1::LoyaltyProgram>] - # A list of loyalty program information that is used to surface loyalty - # benefits (for example, better pricing, points, etc) to the user of this - # item. - # @!attribute [rw] product_types - # @return [::Array<::String>] - # Categories of the item (formatted as in [product data - # specification](https://support.google.com/merchants/answer/7052112#product_category)). - # @!attribute [rw] sale_price - # @return [::Google::Shopping::Type::Price] - # Advertised sale price of the item. - # @!attribute [rw] sale_price_effective_date - # @return [::Google::Type::Interval] - # Date range during which the item is on sale, see [product data - # specification](https://support.google.com/merchants/answer/7052112#price_and_availability). - # @!attribute [rw] sell_on_google_quantity - # @return [::Integer] - # The quantity of the product that is available for selling on Google. - # Supported only for online products. - # @!attribute [rw] product_height - # @return [::Google::Shopping::Merchant::Products::V1::ProductDimension] - # The height of the product in the units provided. The value must be - # between - # 0 (exclusive) and 3000 (inclusive). - # @!attribute [rw] product_length - # @return [::Google::Shopping::Merchant::Products::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::Merchant::Products::V1::ProductDimension] - # The width of the product in the units provided. The value must be between - # 0 (exclusive) and 3000 (inclusive). - # @!attribute [rw] product_weight - # @return [::Google::Shopping::Merchant::Products::V1::ProductWeight] - # The weight of the product in the units provided. The value must be - # between 0 (exclusive) and 2000 (inclusive). - # @!attribute [rw] shipping - # @return [::Array<::Google::Shopping::Merchant::Products::V1::Shipping>] - # Shipping rules. - # @!attribute [rw] carrier_shipping - # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping>] - # Rules for carrier-based shipping. - # @!attribute [rw] free_shipping_threshold - # @return [::Array<::Google::Shopping::Merchant::Products::V1::FreeShippingThreshold>] - # Conditions to be met for a product to have free shipping. - # @!attribute [rw] shipping_weight - # @return [::Google::Shopping::Merchant::Products::V1::ShippingWeight] - # Weight of the item for shipping. - # @!attribute [rw] shipping_length - # @return [::Google::Shopping::Merchant::Products::V1::ShippingDimension] - # Length of the item for shipping. - # @!attribute [rw] shipping_width - # @return [::Google::Shopping::Merchant::Products::V1::ShippingDimension] - # Width of the item for shipping. - # @!attribute [rw] shipping_height - # @return [::Google::Shopping::Merchant::Products::V1::ShippingDimension] - # Height of the item for shipping. - # @!attribute [rw] max_handling_time - # @return [::Integer] - # Maximal product handling time (in business days). - # @!attribute [rw] min_handling_time - # @return [::Integer] - # Minimal product handling time (in business days). - # @!attribute [rw] shipping_handling_business_days - # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductAttributes::ShippingBusinessDaysConfig>] - # The business days during which orders can be handled. If not provided, - # Monday to Friday business days will be assumed. - # @!attribute [rw] shipping_transit_business_days - # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductAttributes::ShippingBusinessDaysConfig>] - # The business days during which orders are in transit. - # If not provided, Monday to Friday business days will be assumed. - # @!attribute [rw] handling_cutoff_times - # @return [::Array<::Google::Shopping::Merchant::Products::V1::HandlingCutoffTime>] - # The handling cutoff times for shipping. - # @!attribute [rw] shipping_label - # @return [::String] - # The shipping label of the product, used to group products in account-level - # shipping rules. Max. 100 characters. For more information, see - # [Shipping label](https://support.google.com/merchants/answer/6324504). - # @!attribute [rw] return_policy_label - # @return [::String] - # The return label of the product, used to group products in account-level - # return policies. Max. 100 characters. For more information, see - # [Return policy label](https://support.google.com/merchants/answer/9445425). - # @!attribute [rw] transit_time_label - # @return [::String] - # The transit time label of the product, used to group product in - # account-level transit time tables. - # @!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 - # [Size](https://support.google.com/merchants/answer/6324492). - # @!attribute [rw] size_system - # @return [::Google::Shopping::Merchant::Products::V1::SizeSystem] - # System in which the size is specified. Recommended for apparel items. - # For more information, see - # [Size system](https://support.google.com/merchants/answer/6324502). - # @!attribute [rw] size_types - # @return [::Array<::Google::Shopping::Merchant::Products::V1::SizeType>] - # 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] energy_efficiency_class - # @return [::Google::Shopping::Merchant::Products::V1::EnergyEfficiencyClass] - # The [energy efficiency - # class](https://support.google.com/merchants/answer/7562785) as defined in - # EU directive 2010/30/EU. - # @!attribute [rw] min_energy_efficiency_class - # @return [::Google::Shopping::Merchant::Products::V1::EnergyEfficiencyClass] - # The [energy efficiency - # class](https://support.google.com/merchants/answer/7562785) as defined in - # EU directive 2010/30/EU. - # @!attribute [rw] max_energy_efficiency_class - # @return [::Google::Shopping::Merchant::Products::V1::EnergyEfficiencyClass] - # The [energy efficiency - # class](https://support.google.com/merchants/answer/7562785) as defined in - # EU directive 2010/30/EU. - # @!attribute [rw] unit_pricing_measure - # @return [::Google::Shopping::Merchant::Products::V1::UnitPricingMeasure] - # The measure and dimension of an item. - # @!attribute [rw] unit_pricing_base_measure - # @return [::Google::Shopping::Merchant::Products::V1::UnitPricingBaseMeasure] - # The preference of the denominator of the unit price. - # @!attribute [rw] multipack - # @return [::Integer] - # The number of identical products in a business-defined multipack. - # @!attribute [rw] ads_grouping - # @return [::String] - # Used to group items in an arbitrary way. Only for CPA%, discouraged - # otherwise. For more information, see - # [Display ads - # attribute](https://support.google.com/merchants/answer/6069387). - # @!attribute [rw] ads_labels - # @return [::Array<::String>] - # Similar to ads_grouping, but only works on CPC. - # @!attribute [rw] ads_redirect - # @return [::String] - # Allows advertisers to override the item URL when the product is shown - # within the context of Product ads. - # @!attribute [rw] cost_of_goods_sold - # @return [::Google::Shopping::Type::Price] - # Cost of goods sold. Used for gross profit reporting. - # @!attribute [rw] product_details - # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductDetail>] - # Technical specification or additional product details. - # @!attribute [rw] product_highlights - # @return [::Array<::String>] - # Bullet points describing the most relevant [product - # highlights](https://support.google.com/merchants/answer/9216100). - # @!attribute [rw] display_ads_id - # @return [::String] - # An identifier for an item for dynamic remarketing campaigns. - # @!attribute [rw] display_ads_similar_ids - # @return [::Array<::String>] - # Advertiser-specified recommendations. For more information, see - # [Display ads attribute - # specification](https://support.google.com/merchants/answer/6069387). - # @!attribute [rw] display_ads_title - # @return [::String] - # Title of an item for dynamic remarketing campaigns. - # @!attribute [rw] display_ads_link - # @return [::String] - # URL directly to your item's landing page for dynamic remarketing - # campaigns. - # @!attribute [rw] display_ads_value - # @return [::Float] - # Offer margin for dynamic remarketing campaigns. For more information, see - # [Display ads - # attribute](https://support.google.com/merchants/answer/6069387). - # @!attribute [rw] promotion_ids - # @return [::Array<::String>] - # The unique ID of a promotion. - # @!attribute [rw] pickup_method - # @return [::Google::Shopping::Merchant::Products::V1::PickupMethod] - # The [pickup](https://support.google.com/merchants/answer/14634021) option - # for the item. - # @!attribute [rw] pickup_sla - # @return [::Google::Shopping::Merchant::Products::V1::PickupSla] - # Item store pickup timeline. For more information, see - # [Pickup SLA](https://support.google.com/merchants/answer/14635400). - # @!attribute [rw] pickup_cost - # @return [::Google::Shopping::Merchant::Products::V1::PickupCost] - # Optional. The [pickup - # cost](https://support.google.com/merchants/answer/16988704) for an item - # when a customer buys it online and picks it up at a store. - # @!attribute [rw] link_template - # @return [::String] - # [Link template](https://support.google.com/merchants/answer/13871172) for - # business hosted local storefront. - # @!attribute [rw] mobile_link_template - # @return [::String] - # [Link template](https://support.google.com/merchants/answer/13870216) for - # business hosted local storefront optimized for mobile - # devices. - # @!attribute [rw] custom_label_0 - # @return [::String] - # [Custom label 0](https://support.google.com/merchants/answer/6324473) for - # custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_1 - # @return [::String] - # [Custom label 1](https://support.google.com/merchants/answer/6324473) - # for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_2 - # @return [::String] - # [Custom label 2](https://support.google.com/merchants/answer/6324473) - # for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_3 - # @return [::String] - # [Custom label 3](https://support.google.com/merchants/answer/6324473) - # for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_4 - # @return [::String] - # [Custom label 4](https://support.google.com/merchants/answer/6324473) for - # custom grouping of items in a Shopping campaign. - # @!attribute [rw] included_destinations - # @return [::Array<::Google::Shopping::Type::Destination::DestinationEnum>] - # 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`. - # - # For more information, see - # [Included - # destination](https://support.google.com/merchants/answer/7501026). - # - # Note: We recommend setting destinations on datasources level for most use - # cases. Use this field within products to only setup exceptions. - # @!attribute [rw] excluded_destinations - # @return [::Array<::Google::Shopping::Type::Destination::DestinationEnum>] - # The list of destinations to exclude for this target (corresponds to - # unchecked check boxes in Merchant Center). - # - # For more information, see - # [Excluded - # destination](https://support.google.com/merchants/answer/6324486). - # - # Note: We recommend setting destinations on datasources level for most use - # cases. Use this field within products to only setup exceptions. - # @!attribute [rw] shopping_ads_excluded_countries - # @return [::Array<::String>] - # List of country codes [(ISO 3166-1 - # alpha-2)](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) to exclude the - # offer from Shopping Ads destination. Countries from this list are removed - # from countries configured in data source settings. - # @!attribute [rw] external_seller_id - # @return [::String] - # Required for multi-seller accounts. Use this attribute if you're a - # marketplace uploading products for various sellers to your multi-seller - # account. - # @!attribute [rw] pause - # @return [::Google::Shopping::Merchant::Products::V1::Pause] - # Publication of this item will be temporarily - # [paused](https://support.google.com/merchants/answer/11909930). - # @!attribute [rw] lifestyle_image_links - # @return [::Array<::String>] - # Additional URLs of lifestyle images of the item, used to explicitly - # identify images that showcase your item in a real-world context. See the - # [Help Center article](https://support.google.com/merchants/answer/9103186) - # for more information. - # @!attribute [rw] cloud_export_additional_properties - # @return [::Array<::Google::Shopping::Merchant::Products::V1::CloudExportAdditionalProperties>] - # Extra fields to export to the Cloud Retail program. - # @!attribute [rw] virtual_model_link - # @return [::String] - # URL of the 3D image of the item. See the - # [Help Center article](https://support.google.com/merchants/answer/13674896) - # for more information. - # @!attribute [rw] certifications - # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductCertification>] - # Product Certifications, for example for energy efficiency labeling of - # products recorded in the [EU EPREL](https://eprel.ec.europa.eu/screen/home) - # database. See the [Help - # Center](https://support.google.com/merchants/answer/13528839) - # article for more information. - # @!attribute [rw] structured_title - # @return [::Google::Shopping::Merchant::Products::V1::StructuredTitle] - # Structured title, for algorithmically (AI)-generated titles. - # @!attribute [rw] structured_description - # @return [::Google::Shopping::Merchant::Products::V1::StructuredDescription] - # Structured description, for algorithmically (AI)-generated descriptions. - # @!attribute [rw] auto_pricing_min_price - # @return [::Google::Shopping::Type::Price] - # A safeguard in the [automated discounts] - # (https://support.google.com/merchants/answer/10295759) and - # "Dynamic Promotions" - # (https://support.google.com/merchants/answer/13949249) projects, - # ensuring that discounts on business offers do not fall below this value, - # thereby preserving the offer's value and profitability. - # @!attribute [rw] sustainability_incentives - # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductSustainabilityIncentive>] - # The list of sustainability incentive programs. - # @!attribute [rw] video_links - # @return [::Array<::String>] - # Optional. A list of video URLs for the item. Use this attribute to provide - # more visuals for your product beyond your image attributes. See the [Help - # Center article](https://support.google.com/merchants/answer/15216925) for - # more information. - # @!attribute [rw] minimum_order_values - # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductMinimumOrderValue>] - # The [minimum value](https://support.google.com/merchants/answer/16989009) - # in the cart before a customer can initiate checkout. Supports multiple - # minimum order values. Different minimum order values can be specified per - # country, service and surface. Maximum entries: 100. - # @!attribute [rw] vin - # @return [::String] - # The [Vehicle Identification Number - # (VIN)](https://support.google.com/google-ads/answer/14154510) of the - # vehicle. - # @!attribute [rw] model - # @return [::String] - # The [Model](https://support.google.com/google-ads/answer/14154511) of the - # vehicle, such as `LX`, `EX`, and others. - # @!attribute [rw] trim - # @return [::String] - # The [Trim](https://support.google.com/google-ads/answer/14154176) of the - # vehicle model, such as `S`, `SV`, `SL` and others. - # @!attribute [rw] body_style - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::VehicleBodyStyle] - # The [body style](https://support.google.com/google-ads/answer/14157085) of - # the vehicle. - # @!attribute [rw] year - # @return [::Integer] - # The [Year](https://support.google.com/google-ads/answer/14152816) of the - # vehicle model. - # @!attribute [rw] mileage - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::Mileage] - # The number of miles/kms on the vehicle. See the - # [Mileage](https://support.google.com/google-ads/answer/14156166) for more - # information. - # @!attribute [rw] electric_range - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::Mileage] - # The [electric range](https://support.google.com/google-ads/answer/15162232) - # of the vehicle in miles/kms. - # @!attribute [rw] fuel_consumption - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::FuelConsumption] - # The [fuel - # consumption](https://support.google.com/google-ads/answer/14543580) of the - # vehicle. - # @!attribute [rw] fuel_consumption_discharged_battery - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::FuelConsumption] - # The fuel consumption of the vehicle when the hybrid battery is discharged. - # See the [Help Center - # article](https://support.google.com/google-ads/answer/15162033) for more - # information. - # @!attribute [rw] energy_consumption - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::EnergyConsumption] - # The [energy - # consumption](https://support.google.com/google-ads/answer/14546149) of the - # vehicle. - # @!attribute [rw] co2_emissions - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::Co2Emissions] - # The [co2 emission](https://support.google.com/google-ads/answer/14546146) - # of the vehicle. - # @!attribute [rw] date_first_registered - # @return [::String] - # The date the vehicle was first registered. Format: `YYYY-MM`. See the - # [Date first - # registered](https://support.google.com/google-ads/answer/14546138) for more - # information. - # @!attribute [rw] engine - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::EngineType] - # The [engine](https://support.google.com/google-ads/answer/14156068) type of - # the vehicle. - # @!attribute [rw] emissions_standard - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::EmissionsStandard] - # The [emission - # standard](https://support.google.com/google-ads/answer/14869021) of the - # vehicle. - # @!attribute [rw] certified_pre_owned - # @return [::Boolean] - # Whether the vehicle is OEM [certified - # pre-owned](https://support.google.com/google-ads/answer/14156475). - # @!attribute [rw] vehicle_msrp - # @return [::Google::Shopping::Type::Price] - # The MSRP (Manufacturer Suggested Retail Price) for the vehicle in its - # current configuration. See the [Vehicle - # MSRP](https://support.google.com/google-ads/answer/14154171) for more - # information. - # @!attribute [rw] vehicle_all_in_price - # @return [::Google::Shopping::Type::Price] - # The all-in advertised price for a vehicle, which includes costs for the - # following – any accessories attached to the vehicle, environmental levies, - # extra warranty, fuel, freight, pre-delivery inspection (PDI), dealer fees - # for handling licensing, provincial regulatory fees, miscellaneous dealer - # charges for security etching and nitrogen tire fill, and - # factory-to-customer or dealer-to-customer discounts or incentives. See the - # [Vehicle all-in - # price](https://support.google.com/google-ads/answer/14156981) for more - # information. - # @!attribute [rw] vehicle_price_type - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::VehiclePriceType] - # The [price type](https://support.google.com/google-ads/answer/14592783) of - # the vehicle. - # @!attribute [rw] vehicle_mandatory_inspection_included - # @return [::Boolean] - # Whether the vehicle is sold with mandatory inspection and maintenance - # performed before delivery. See the [Vehicle mandatory inspection - # included](https://support.google.com/google-ads/answer/15956630) for more - # information.` - # @!attribute [rw] vehicle_expenses - # @return [::Google::Shopping::Type::Price] - # The miscellaneous expenses like insurance and registration fees of the - # vehicle. See the [Vehicle - # expenses](https://support.google.com/google-ads/answer/15957154) for more - # information. - # @!attribute [rw] warranty - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::Warranty] - # The [warranty](https://support.google.com/google-ads/answer/15957626) of - # the vehicle. - # @!attribute [rw] display_address - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::DisplayAddress] - # The display address of the property. - # @!attribute [rw] latitude - # @return [::Float] - # The latitude of the property. The value must be between -90 (inclusive) and - # 90 (inclusive), up to 6 decimal places. - # @!attribute [rw] longitude - # @return [::Float] - # The longitude of the property. The value must be between -180 (inclusive) - # and 180 (inclusive), up to 6 decimal places. - # @!attribute [rw] neighborhood - # @return [::String] - # The neighborhood (locality) of the property, such as `Wallingford`, - # `Greenwood`, etc. - # @!attribute [rw] unit_area - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::UnitArea] - # The unit area of the property, such as `1000 sqft`. - # @!attribute [rw] number_of_units - # @return [::Integer] - # The number of units available for a specific floor plan of the property. - # The value must be greater than 0. - # @!attribute [rw] property_name - # @return [::String] - # The name of the property. - # @!attribute [rw] number_of_bedrooms - # @return [::Float] - # The number of bedrooms in the property. The value must be greater than or - # equal to 0 and a multiple of 1.0. - # @!attribute [rw] number_of_bathrooms - # @return [::Float] - # The number of bathrooms in the property. The value must be greater than 0 - # and a multiple of 0.5. - # @!attribute [rw] property_type - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::PropertyType] - # The type of property. - # @!attribute [rw] amenity_feature - # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductAttributes::AmenityFeature>] - # The amenity features for the property. - # @!attribute [rw] utilities_included - # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductAttributes::UtilitiesIncluded>] - # The utilities included for the property. - # @!attribute [rw] pet_policy - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::PetPolicy] - # The pet policy for the property. - # @!attribute [rw] specialty_housing_type - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::SpecialtyHousingType] - # The specialty housing type for the property. - # @!attribute [rw] product_fee - # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductAttributes::ProductFee>] - # The product fee for the property. - # @!attribute [rw] short_title - # @return [::String] - # The short title of the item. - # @!attribute [rw] questions_and_answers - # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductAttributes::QuestionAndAnswer>] - # Optional. Contains user-, merchant-, and manufacturer-authored [questions - # and answers](https://support.google.com/merchants/answer/17085211) about - # the product. Max 30 question and answer pairs. Max 10000 characters total. - # Each question can have max 1000 characters. Each answer can have max 1000 - # characters. - # @!attribute [rw] popularity_rank - # @return [::Float] - # Optional. Indicates the - # [popularity](https://support.google.com/merchants/answer/17085297) of the - # product in a merchant's inventory. Using a scale of 0.0 (lowest) to 100.0 - # (highest). - # @!attribute [rw] item_group_title - # @return [::String] - # Optional. Represents the [title of the product - # group](https://support.google.com/merchants/answer/17085146) to which - # this variant product belongs. This can be used along with the [item group - # id](https://support.google.com/merchants/answer/6324507) attribute. - # It lets you perform better grouping of variant products, and helps - # identifying common product characteristics more efficiently. - # @!attribute [rw] document_links - # @return [::Array<::String>] - # Optional. Contains a list of PDF [document - # URLs](https://support.google.com/merchants/answer/17084656) for the - # product. Examples are training manuals, user guides, assembly instructions, - # package inserts, etc. Must start with "http://" or "https://"), ASCII - # characters only, and RFC 3986 compliant. - # @!attribute [rw] variant_options - # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductAttributes::VariantOption>] - # Optional. Contains the [list of all variant-identifying - # options](https://support.google.com/merchants/answer/17085214) of this - # product. - # @!attribute [rw] related_products - # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductAttributes::RelatedProduct>] - # Optional. Specifies how other [products are - # related](https://support.google.com/merchants/answer/17085213) to this - # product. - class ProductAttributes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The business days during which orders are on their path to fulfillment. - # If not provided, Monday to Friday business days will be assumed. - # @!attribute [rw] country - # @return [::String] - # The [CLDR territory - # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - # of the country to which an item will ship. - # @!attribute [rw] business_days - # @return [::String] - # Effective days of the week considered for the delivery time calculation. - # May not be empty. The more business days included the faster the - # delivery. Can be set through individual days (e.g. `MTWRF`), or day - # ranges (e.g. `Mon-Fri`). For more information about accepted formats, - # see [Shipping handling business - # days](https://support.google.com/merchants/answer/16072859). - class ShippingBusinessDaysConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Carrier-based shipping configuration. Allows for setting shipping speed or - # shipping cost based on a carrier's provided info. - # @!attribute [rw] country - # @return [::String] - # The [CLDR territory - # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - # of the country to which an item will ship. - # @!attribute [rw] region - # @return [::String] - # The geographic region to which a shipping rate applies. - # See [region](https://support.google.com/merchants/answer/6324484) for - # more information. - # @!attribute [rw] postal_code - # @return [::String] - # The postal code range that the shipping rate applies to, represented by - # a postal code (eg. `94043`), a postal code prefix followed by a * - # wildcard (eg. `94*`), a range between two postal codes (eg. - # `94043-98033`) or two postal code prefixes of equal length (eg. - # `94*-98*`). - # @!attribute [rw] origin_postal_code - # @return [::String] - # The source location postal code from which this offer ships. Represented - # only by a full-length postal code. - # @!attribute [rw] flat_price - # @return [::Google::Shopping::Type::Price] - # Fixed shipping price, represented as a number with currency. Cannot be - # set together with - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#carrier_price carrierPrice} - # or its adjustments - # ({::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#carrier_price_flat_adjustment carrierPriceFlatAdjustment}, - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#carrier_price_percentage_adjustment carrierPricePercentageAdjustment}). - # @!attribute [rw] carrier_price - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierPriceOption] - # Selected carrier to calculate the shipping price from. Select a carrier - # from the [available carriers - # list](https://support.google.com/merchants/answer/15449142#Supported), - # for example `AUSTRALIA_POST_REGULAR`. Price will be calculated by this - # selected carrier, the location expressed in - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#origin_postal_code originPostalCode}, - # along with the user location to determine the accurate shipping price. - # Carrier is represented by a carrier service name or a carrier service ID. - # Cannot be set together with - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#flat_price flatPrice}. - # @!attribute [rw] carrier_price_flat_adjustment - # @return [::Google::Shopping::Type::Price] - # A flat adjustment on the carrier price. Can be either positive or - # negative. Cannot be zero. Requires `carrier_price` to be present. Cannot - # be set together with - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#flat_price flatPrice} - # and - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#carrier_price_percentage_adjustment carrierPricePercentageAdjustment}. - # @!attribute [rw] carrier_price_percentage_adjustment - # @return [::Float] - # A percentual adjustment on the carrier price. Can be either positive or - # negative. Cannot be zero. Requires `carrier_price` to be present. Cannot - # be set together with - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#flat_price flatPrice} - # and - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#carrier_price_flat_adjustment carrierPriceFlatAdjustment}. - # @!attribute [rw] min_handling_time - # @return [::Integer] - # Minimum handling time (inclusive) between when the order is received and - # shipped in business days. 0 means that the order is shipped on the same - # day as it is received if it happens before the cut-off time. - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#min_handling_time minHandlingTime} - # can only be set if - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#max_handling_time maxHandlingTime} - # is also set. - # @!attribute [rw] max_handling_time - # @return [::Integer] - # Maximum handling time (inclusive) between when the order is received and - # shipped in business days. 0 means that the order is shipped on the same - # day as it is received if it happens before the cut-off time. Both - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#max_handling_time maxHandlingTime} - # and - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#fixed_max_transit_time fixedMaxTransitTime} - # or - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#carrier_transit_time carrierTransitTime} - # are required if providing shipping speeds. - # @!attribute [rw] fixed_min_transit_time - # @return [::Integer] - # Minimum transit time (inclusive) between when the order has shipped and - # when it is delivered in business days. 0 means that the order is - # delivered on the same day as it ships. - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#fixed_min_transit_time fixedMinTransitTime} - # can only be set if - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#fixed_max_transit_time fixedMaxTransitTime} - # is set. Cannot be set if - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#carrier_transit_time carrierTransitTime} - # is present. - # @!attribute [rw] fixed_max_transit_time - # @return [::Integer] - # Maximum transit time (inclusive) between when the order has shipped and - # when it is delivered in business days. 0 means that the order is - # delivered on the same day as it ships. Needs to be provided together with - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#max_handling_time maxHandlingTime}. - # Cannot be set if - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#carrier_transit_time carrierTransitTime} - # is present. - # @!attribute [rw] carrier_transit_time - # @return [::Google::Shopping::Merchant::Products::V1::CarrierTransitTimeOption] - # Selected carrier to calculate the shipping speed from. Select a carrier - # from the [available carriers - # list](https://support.google.com/merchants/answer/15449142#Supported), - # for example `AUSTRALIA_POST_REGULAR`. Speed will be calculated by this - # selected carrier, the location expressed in - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#origin_postal_code originPostalCode}, - # along with the user location to determine the accurate delivery speed. - # Carrier is represented by a carrier service name or a carrier service ID. - # Cannot be set together with - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#fixed_max_transit_time fixedMaxTransitTime} - # or - # {::Google::Shopping::Merchant::Products::V1::ProductAttributes::CarrierShipping#fixed_min_transit_time fixedMinTransitTime}. - class CarrierShipping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The mileage of the vehicle. - # @!attribute [rw] value - # @return [::Integer] - # The distance value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::Mileage::Unit] - # The unit of the mileage. - class Mileage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The unit of the mileage. - module Unit - # Unspecified unit. - UNIT_UNSPECIFIED = 0 - - # Miles. - MILES = 1 - - # Kilometers. - KM = 2 - end - end - - # The fuel consumption of the vehicle. - # @!attribute [rw] value - # @return [::Float] - # The fuel consumption value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::FuelConsumption::Unit] - # The unit of the fuel consumption. - class FuelConsumption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The unit of the fuel consumption. - module Unit - # Unspecified unit. - UNIT_UNSPECIFIED = 0 - - # Liter per 100 kilometers. - LPER100KM = 1 - - # Kilograms per 100 kilometers. - KGPER100KM = 2 - end - end - - # The energy consumption of the vehicle. - # @!attribute [rw] value - # @return [::Float] - # The energy consumption value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::EnergyConsumption::Unit] - # The unit of the energy consumption. - class EnergyConsumption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The unit of the energy consumption. - module Unit - # Unspecified unit. - UNIT_UNSPECIFIED = 0 - - # Kilowatt hours per 100 kilometers. - KWHPER100KM = 1 - end - end - - # The co2 emission of the vehicle. - # @!attribute [rw] value - # @return [::Integer] - # The co2 emission value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::Co2Emissions::Unit] - # The unit of the co2 emission. - class Co2Emissions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The unit of the co2 emission. - module Unit - # Unspecified unit. - UNIT_UNSPECIFIED = 0 - - # Grams per kilometer. - GPERKM = 1 - end - end - - # The warranty of the vehicle. - # @!attribute [rw] duration - # @return [::Integer] - # The warranty duration in months. - # @!attribute [rw] mileage - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::Mileage] - # The warranty mileage. - class Warranty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The product fee attribute containing type and amount. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::ProductFee::FeeType] - # The type of product fee. - # @!attribute [rw] amount - # @return [::Google::Shopping::Type::Price] - # The amount of product fee. - class ProductFee - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of product fee. - module FeeType - # Unspecified fee type. - FEE_TYPE_UNSPECIFIED = 0 - - # Admin fee. - ADMIN_FEE = 1 - - # Application fee. - APPLICATION_FEE = 2 - - # Security deposit. - SECURITY_DEPOSIT = 3 - end - end - - # The display address of the property. - # @!attribute [rw] street_number - # @return [::String] - # The street number. - # @!attribute [rw] street_name - # @return [::String] - # The street name. - # @!attribute [rw] city - # @return [::String] - # The city such as Seattle, New York, etc. - # @!attribute [rw] region - # @return [::String] - # The region(state), such as WA, OH, etc. - # @!attribute [rw] postal_code - # @return [::String] - # The postal code, such as 94043. - class DisplayAddress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The unit area of the property. - # @!attribute [rw] value - # @return [::Float] - # The area value. - # @!attribute [rw] unit - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::UnitArea::Unit] - # The unit of area. - class UnitArea - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The unit of area. - module Unit - # Unspecified unit. - UNIT_UNSPECIFIED = 0 - - # Square meters. - SQM = 1 - - # Square feet. - SQFT = 2 - end - end - - # The pet policy of the property. - # @!attribute [rw] pets_allowed - # @return [::Boolean] - # Whether pets are allowed. - # @!attribute [rw] pet_types - # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductAttributes::PetPolicy::PetType>] - # The pet types allowed. - class PetPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The pet types. - module PetType - # Unspecified pet type. - PET_TYPE_UNSPECIFIED = 0 - - # Cats. - CATS = 1 - - # Large dogs. - LARGE_DOGS = 2 - - # Small dogs. - SMALL_DOGS = 3 - end - end - - # The question and answer for the product. - # @!attribute [rw] question - # @return [::String] - # Required. The question text. - # @!attribute [rw] answer - # @return [::String] - # Required. The answer text. - class QuestionAndAnswer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Additional product variants for the product. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the variant. For example, "Color", "Memory", - # "Size", "Length" - # @!attribute [rw] value - # @return [::String] - # Required. The value of the variant. For example, "Red", "128GB", "XL", - # "100cm" - class VariantOption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies how other products are related to this product. - # @!attribute [rw] relationship_type - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::RelatedProduct::RelationshipType] - # Required. The type of the relationship between this product and the - # related product. - # @!attribute [rw] id_type - # @return [::Google::Shopping::Merchant::Products::V1::ProductAttributes::RelatedProduct::IdType] - # Required. The type of the identifier of the related product. - # For example, [GTIN](https://support.google.com/merchants/answer/6219078) - # or [product ID](https://support.google.com/merchants/answer/6324405). - # @!attribute [rw] id - # @return [::String] - # Required. The identifier of the related product. - class RelatedProduct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The various types of the relationships between this product and the - # related product. - module RelationshipType - # The relationship type is unspecified. - RELATIONSHIP_TYPE_UNSPECIFIED = 0 - - # Part of a set of products that are often purchased together. - PART_OF_SET = 1 - - # Part that is necessary for the product to function, for example a - # battery for a battery-operated lamp. - REQUIRED_PART = 2 - - # A product that this product is often purchased together with, for - # example a phone case with a phone. - OFTEN_BOUGHT_WITH = 3 - - # Product that this product can be substituted for. For example a printer - # comparable in function to another printer. - SUBSTITUTE = 4 - - # An identical product sold under a different brand, for example a - # cheaper house brand. - DIFFERENT_BRAND = 5 - - # An accessory to this product, for example a side table that matches the - # style of a couch. - ACCESSORY = 6 - end - - # The type of the identifier of the related product. - module IdType - # The identifier type is unspecified. - ID_TYPE_UNSPECIFIED = 0 - - # The identifier is a GTIN. - GTIN = 1 - - # The identifier is a product ID in the feed. - ID = 2 - end - end - - # Possible carrier where price is coming from. - module CarrierPriceOption - # Carrier price option is unspecified. - CARRIER_PRICE_OPTION_UNSPECIFIED = 0 - - # Australia Post Regular shipping service. - AUSTRALIA_POST_REGULAR = 1 - - # Australia Post Express shipping service. - AUSTRALIA_POST_EXPRESS = 2 - - # Australia Post Regular Small shipping service. - AUSTRALIA_POST_REGULAR_S = 3 - - # Australia Post Regular Medium shipping service. - AUSTRALIA_POST_REGULAR_M = 4 - - # Australia Post Regular Large shipping service. - AUSTRALIA_POST_REGULAR_L = 5 - - # Australia Post Regular XL shipping service. - AUSTRALIA_POST_REGULAR_XL = 6 - - # Australia Post Express Small shipping service. - AUSTRALIA_POST_EXPRESS_S = 7 - - # Australia Post Express Medium shipping service. - AUSTRALIA_POST_EXPRESS_M = 8 - - # Australia Post Express Large shipping service. - AUSTRALIA_POST_EXPRESS_L = 9 - - # Australia Post Express XL shipping service. - AUSTRALIA_POST_EXPRESS_XL = 10 - - # TNT Road Express shipping service. - TNT_ROAD_EXPRESS = 11 - - # TNT Overnight Express shipping service. - TNT_OVERNIGHT_EXPRESS = 12 - - # Toll Road Delivery shipping service. - TOLL_ROAD_DELIVERY = 13 - - # Toll Overnight Priority shipping service. - TOLL_OVERNIGHT_PRIORITY = 14 - - # DHL Paket shipping service. - DHL_PAKET = 15 - - # DHL Packchen shipping service. - DHL_PACKCHEN = 16 - - # DPD Express 12 shipping service. - DPD_EXPRESS_12 = 17 - - # DPD Express shipping service. - DPD_EXPRESS = 18 - - # DPD Classic Parcel shipping service. - DPD_CLASSIC_PARCEL = 19 - - # Hermes Packchen shipping service. - HERMES_PACKCHEN = 20 - - # Hermes Paketklasse S shipping service. - HERMES_PAKETKLASSE_S = 21 - - # Hermes Paketklasse M shipping service. - HERMES_PAKETKLASSE_M = 22 - - # Hermes Paketklasse L shipping service. - HERMES_PAKETKLASSE_L = 23 - - # UPS Express shipping service. - UPS_EXPRESS = 24 - - # UPS Express Saver shipping service. - UPS_EXPRESS_SAVER = 25 - - # UPS Express Standard shipping service. - UPS_EXPRESS_STANDARD = 26 - - # DHL Express shipping service. - DHL_EXPRESS = 27 - - # DHL Express 12 shipping service. - DHL_EXPRESS_12 = 28 - - # DPD Next Day shipping service. - DPD_NEXT_DAY = 29 - - # DPD Standard Next Day shipping service. - DPD_STANDARD_NEXT_DAY = 30 - - # DPD Standard Two Day shipping service. - DPD_STANDARD_TWO_DAY = 31 - - # RMG 1st Class Small shipping service. - RMG_1ST_CLASS_SMALL = 32 - - # RMG 1st Class Medium shipping service. - RMG_1ST_CLASS_MEDIUM = 33 - - # RMG 2nd Class Small shipping service. - RMG_2ND_CLASS_SMALL = 34 - - # RMG 2nd Class Medium shipping service. - RMG_2ND_CLASS_MEDIUM = 35 - - # TNT Express shipping service. - TNT_EXPRESS = 36 - - # TNT Express 10 shipping service. - TNT_EXPRESS_10 = 37 - - # TNT Express 12 shipping service. - TNT_EXPRESS_12 = 38 - - # Yodel B2C 48HR shipping service. - YODEL_B2C_48HR = 39 - - # Yodel B2C 72HR shipping service. - YODEL_B2C_72HR = 40 - - # Yodel B2C Packet shipping service. - YODEL_B2C_PACKET = 41 - - # FedEx Ground shipping service. - FEDEX_GROUND = 42 - - # FedEx Home Delivery shipping service. - FEDEX_HOME_DELIVERY = 43 - - # FedEx Express Saver shipping service. - FEDEX_EXPRESS_SAVER = 44 - - # FedEx First Overnight shipping service. - FEDEX_FIRST_OVERNIGHT = 45 - - # FedEx Priority Overnight shipping service. - FEDEX_PRIORITY_OVERNIGHT = 46 - - # FedEx Standard Overnight shipping service. - FEDEX_STANDARD_OVERNIGHT = 47 - - # FedEx 2Day shipping service. - FEDEX_2DAY = 48 - - # UPS Standard shipping service. - UPS_STANDARD = 49 - - # UPS 2nd Day Air shipping service. - UPS_2ND_DAY_AIR = 50 - - # UPS 2nd Day AM shipping service. - UPS_2ND_DAY_AM = 51 - - # UPS 3 Day Select shipping service. - UPS_3_DAY_SELECT = 52 - - # UPS Ground shipping service. - UPS_GROUND = 53 - - # UPS Next Day Air shipping service. - UPS_NEXT_DAY_AIR = 54 - - # UPS Next Day Air Early AM shipping service. - UPS_NEXT_DAY_AIR_EARLY_AM = 55 - - # UPS Next Day Air Saver shipping service. - UPS_NEXT_DAY_AIR_SAVER = 56 - - # USPS Priority Mail Express shipping service. - USPS_PRIORITY_MAIL_EXPRESS = 57 - - # USPS Media Mail shipping service. - USPS_MEDIA_MAIL = 58 - - # USPS Ground Advantage Retail shipping service. - USPS_GROUND_ADVANTAGE_RETAIL = 59 - - # USPS Priority Mail shipping service. - USPS_PRIORITY_MAIL = 60 - - # USPS Ground Advantage Commercial shipping service. - USPS_GROUND_ADVANTAGE_COMMERCIAL = 61 - end - - # The vehicle body style. See the [Body - # style](https://support.google.com/google-ads/answer/14157085) for more - # information. - module VehicleBodyStyle - # Unspecified vehicle body style. - VEHICLE_BODY_STYLE_UNSPECIFIED = 0 - - # ATV Sport. - ATV_SPORT = 1 - - # ATV Touring. - ATV_TOURING = 2 - - # ATV Utility. - ATV_UTILITY = 3 - - # ATV Youth. - ATV_YOUTH = 4 - - # City car. - CITY_CAR = 5 - - # Class A motorhome. - CLASS_A_MOTORHOME = 6 - - # Class B motorhome. - CLASS_B_MOTORHOME = 7 - - # Class C motorhome. - CLASS_C_MOTORHOME = 8 - - # Compact SUV. - COMPACT_SUV = 9 - - # Convertible. - CONVERTIBLE = 10 - - # Coupe. - COUPE = 11 - - # Crossover. - CROSSOVER = 12 - - # Fifth wheel. - FIFTH_WHEEL = 13 - - # Full size van. - FULL_SIZE_VAN = 14 - - # Hatchback. - HATCHBACK = 15 - - # Limousine. - LIMOUSINE = 16 - - # Minivan. - MINIVAN = 17 - - # Notchback. - NOTCHBACK = 18 - - # Pop up camper. - POP_UP_CAMPER = 19 - - # Sedan. - SEDAN = 20 - - # Side by side. - SIDE_BY_SIDE = 21 - - # Station wagon. - STATION_WAGON = 22 - - # SUV. - SUV = 23 - - # Travel trailer. - TRAVEL_TRAILER = 24 - - # Truck. - TRUCK = 25 - - # Truck camper. - TRUCK_CAMPER = 26 - - # Ute. - UTE = 27 - - # UTV Recreational utility. - UTV_RECREATIONAL_UTILITY = 28 - - # UTV Sport. - UTV_SPORT = 29 - - # UTV Utility. - UTV_UTILITY = 30 - - # UTV Youth. - UTV_YOUTH = 31 - end - - # The engine type of the vehicle. - module EngineType - # Unspecified engine type. - ENGINE_TYPE_UNSPECIFIED = 0 - - # Gasoline. - GASOLINE = 1 - - # Diesel. - DIESEL = 2 - - # Electric. - ELECTRIC = 3 - - # Hybrid. - HYBRID = 4 - - # Plug-in hybrid. - PLUG_IN_HYBRID = 5 - - # Natural gas. - NATURAL_GAS = 6 - - # LPG. - LPG = 7 - - # Methane. - METHANE = 8 - - # Other. - OTHER = 9 - end - - # The emission standard of the vehicle. - module EmissionsStandard - # Unspecified emission standard. - EMISSIONS_STANDARD_UNSPECIFIED = 0 - - # Zero emissions. - ZERO_EMISSIONS = 1 - - # Euro 1. - EURO1 = 2 - - # Euro 2. - EURO2 = 3 - - # Euro 3. - EURO3 = 4 - - # Euro 4. - EURO4 = 5 - - # Euro 5. - EURO5 = 6 - - # Euro 5b. - EURO5B = 7 - - # Euro 6. - EURO6 = 8 - - # Euro 6c. - EURO6C = 9 - - # Euro 6d. - EURO6D = 10 - - # Euro 6d-TEMP. - EURO6D_TEMP = 11 - - # Euro 6e. - EURO6E = 12 - end - - # The vehicle price type. - module VehiclePriceType - # Unspecified vehicle price type. - VEHICLE_PRICE_TYPE_UNSPECIFIED = 0 - - # All in price. - ALL_IN_PRICE = 1 - - # Drive away price. - DRIVE_AWAY_PRICE = 2 - - # Estimated drive away price. - ESTIMATED_DRIVE_AWAY_PRICE = 3 - - # Excluding government charges price. - EXCLUDING_GOVERNMENT_CHARGES_PRICE = 4 - - # Vehicle base price. - VEHICLE_BASE_PRICE = 5 - end - - # The property type. - module PropertyType - # Unspecified property type. - PROPERTY_TYPE_UNSPECIFIED = 0 - - # Apartment. - APARTMENT = 1 - - # Condo. - CONDO = 2 - - # Loft. - LOFT = 3 - - # Multi-family home. - MULTI_FAMILY_HOME = 4 - - # Penthouse. - PENTHOUSE = 5 - - # Room. - ROOM = 6 - - # Single-family home. - SINGLE_FAMILY_HOME = 7 - - # Studio. - STUDIO = 8 - - # Townhouse. - TOWNHOUSE = 9 - end - - # The amenity features for the property. - module AmenityFeature - # Unspecified amenity feature. - AMENITY_FEATURE_UNSPECIFIED = 0 - - # Balcony. - BALCONY = 1 - - # Basement. - BASEMENT = 2 - - # Basketball court. - BASKETBALL_COURT = 3 - - # Bike storage. - BIKE_STORAGE = 4 - - # Central air conditioning. - CENTRAL_AC = 5 - - # Dishwasher. - DISHWASHER = 6 - - # Dog park. - DOG_PARK = 7 - - # Elevator. - ELEVATOR = 8 - - # EV charging. - EV_CHARGING = 9 - - # Fenced lot. - FENCED_LOT = 10 - - # Fireplace. - FIREPLACE = 11 - - # Fitness center. - FITNESS_CENTER = 12 - - # Forced air heating. - FORCED_AIR_HEATING = 13 - - # Fully furnished. - FULLY_FURNISHED = 14 - - # Garage. - GARAGE = 15 - - # Gated community. - GATED_COMMUNITY = 16 - - # Hardwood floors. - HARDWOOD_FLOORS = 17 - - # High speed internet. - HIGH_SPEED_INTERNET = 18 - - # Intercom. - INTERCOM = 19 - - # In-unit washer and dryer. - IN_UNIT_WASHER_DRYER = 20 - - # Kitchen. - KITCHEN = 21 - - # Large closets. - LARGE_CLOSETS = 22 - - # Multisport court. - MULTISPORT_COURT = 23 - - # Onsite laundry. - ONSITE_LAUNDRY = 24 - - # Outdoor lounge. - OUTDOOR_LOUNGE = 25 - - # Parking. - PARKING = 26 - - # Patio. - PATIO = 27 - - # Pickleball court. - PICKLEBALL_COURT = 28 - - # Pool. - POOL = 29 - - # Refrigerator. - REFRIGERATOR = 30 - - # Soccer field. - SOCCER_FIELD = 31 - - # Tennis court. - TENNIS_COURT = 32 - - # Walk-in closets. - WALK_IN_CLOSETS = 33 - - # Wheelchair accessibility. - WHEELCHAIR_ACCESS = 34 - end - - # The utilities included for the property. - module UtilitiesIncluded - # Unspecified utilities included. - UTILITIES_INCLUDED_UNSPECIFIED = 0 - - # Electricity. - ELECTRICITY = 1 - - # Gas. - GAS = 2 - - # Internet. - INTERNET = 3 - - # Trash. - TRASH = 4 - - # Water. - WATER = 5 - end - - # The specialty housing type for the property. - module SpecialtyHousingType - # Unspecified specialty housing type. - SPECIALTY_HOUSING_TYPE_UNSPECIFIED = 0 - - # Corporate housing. - CORPORATE = 1 - - # Low income housing. - LOW_INCOME = 2 - - # Military housing. - MILITARY = 3 - - # Senior housing. - SENIOR = 4 - - # Short term housing. - SHORT_TERM = 5 - - # Student housing. - STUDENT = 6 - end - end - - # The ShippingWeight of the product. - # @!attribute [rw] value - # @return [::Float] - # The weight of the product used to calculate the shipping cost of the - # item. - # @!attribute [rw] unit - # @return [::String] - # The unit of value. - class ShippingWeight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The ShippingDimension of the product. - # @!attribute [rw] value - # @return [::Float] - # The dimension of the product used to calculate the shipping cost of the - # item. - # @!attribute [rw] unit - # @return [::String] - # The unit of value. - class ShippingDimension - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The UnitPricingBaseMeasure of the product. - # @!attribute [rw] value - # @return [::Integer] - # The denominator of the unit price. - # @!attribute [rw] unit - # @return [::String] - # The unit of the denominator. - class UnitPricingBaseMeasure - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The UnitPricingMeasure of the product. - # @!attribute [rw] value - # @return [::Float] - # The measure of an item. - # @!attribute [rw] unit - # @return [::String] - # The unit of the measure. - class UnitPricingMeasure - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The SubscriptionCost of the product. - # @!attribute [rw] period - # @return [::Google::Shopping::Merchant::Products::V1::SubscriptionPeriod] - # The type of subscription period. - # Supported values are: - # * "`month`" - # * "`year`" - # * "`week`" - # @!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 SubscriptionCost - 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. - # @!attribute [rw] credit_type - # @return [::Google::Shopping::Merchant::Products::V1::CreditType] - # Type of installment payments. - # @!attribute [rw] annual_percentage_rate - # @return [::Float] - # Optional. Annual percentage rate for `credit_type` finance - # @!attribute [rw] total_amount - # @return [::Google::Shopping::Type::Price] - # Optional. Total amount the buyer has to pay, including interest. - class ProductInstallment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents loyalty points. - # @!attribute [rw] name - # @return [::String] - # Name of loyalty points program. It is recommended to limit the name to - # 12 full-width characters or 24 Roman characters. - # @!attribute [rw] points_value - # @return [::Integer] - # The retailer's loyalty points in absolute value. - # @!attribute [rw] ratio - # @return [::Float] - # The ratio of a point when converted to currency. Google assumes currency - # based on Merchant Center settings. If ratio is left out, it defaults to - # 1.0. - class LoyaltyPoints - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents loyalty program. - # @!attribute [rw] program_label - # @return [::String] - # The label of the loyalty program. This is an internal label that uniquely - # identifies the relationship between a business entity and a loyalty - # program entity. The label must be provided so that the system can associate - # the assets below (for example, price and points) with a business. The - # corresponding program must be linked to the Merchant Center account. - # @!attribute [rw] tier_label - # @return [::String] - # The label of the tier within the loyalty program. - # Must match one of the labels within the program. - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # The price for members of the given tier, that is, the instant discount - # price. Must be smaller or equal to the regular price. - # @!attribute [rw] cashback_for_future_use - # @return [::Google::Shopping::Type::Price] - # The cashback that can be used for future purchases. - # @!attribute [rw] loyalty_points - # @return [::Integer] - # The amount of loyalty points earned on a purchase. - # @!attribute [rw] member_price_effective_date - # @return [::Google::Type::Interval] - # A date range during which the item is eligible for member price. If not - # specified, the member price is always applicable. The date range is - # represented by a pair of ISO 8601 dates separated by a space, - # comma, or slash. - # @!attribute [rw] shipping_label - # @return [::String] - # The label of the shipping benefit. If the field has value, this offer has - # loyalty shipping benefit. If the field value isn't provided, the item is - # not eligible for loyalty shipping for the given loyalty tier. - class LoyaltyProgram - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Shipping of the product. - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Fixed shipping price, represented as a number. - # @!attribute [rw] country - # @return [::String] - # The [CLDR territory - # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - # of the country to which an item will ship. - # @!attribute [rw] region - # @return [::String] - # The geographic region to which a shipping rate applies. - # See [region](https://support.google.com/merchants/answer/6324484) for more - # information. - # @!attribute [rw] service - # @return [::String] - # A free-form description of the service class or delivery speed. - # @!attribute [rw] location_id - # @return [::Integer] - # The numeric ID of a location that the shipping rate applies to as - # defined in the [AdWords - # API](https://developers.google.com/adwords/api/docs/appendix/geotargeting). - # @!attribute [rw] location_group_name - # @return [::String] - # The location where the shipping is applicable, represented by a - # location group name. - # @!attribute [rw] postal_code - # @return [::String] - # The postal code range that the shipping rate applies to, represented by - # a postal code, a postal code prefix followed by a * wildcard, a range - # between two postal codes or two postal code prefixes of equal length. - # @!attribute [rw] min_handling_time - # @return [::Integer] - # Minimum handling time (inclusive) between when the order is received and - # shipped in business days. 0 means that the order is shipped on the same - # day as it is received if it happens before the cut-off time. - # {::Google::Shopping::Merchant::Products::V1::Shipping#min_handling_time minHandlingTime} - # can only be present together with - # {::Google::Shopping::Merchant::Products::V1::Shipping#max_handling_time maxHandlingTime}; - # but it is not required if - # {::Google::Shopping::Merchant::Products::V1::Shipping#max_handling_time maxHandlingTime} - # is present. - # @!attribute [rw] max_handling_time - # @return [::Integer] - # Maximum handling time (inclusive) between when the order is received and - # shipped in business days. 0 means that the order is shipped on the same - # day as it is received if it happens before the cut-off time. Both - # {::Google::Shopping::Merchant::Products::V1::Shipping#max_handling_time maxHandlingTime} - # and - # {::Google::Shopping::Merchant::Products::V1::Shipping#max_transit_time maxTransitTime} - # are required if providing shipping speeds. - # {::Google::Shopping::Merchant::Products::V1::Shipping#min_handling_time minHandlingTime} - # is optional if - # {::Google::Shopping::Merchant::Products::V1::Shipping#max_handling_time maxHandlingTime} - # is present. - # @!attribute [rw] min_transit_time - # @return [::Integer] - # Minimum transit time (inclusive) between when the order has shipped and - # when it is delivered in business days. 0 means that the order is - # delivered on the same day as it ships. - # {::Google::Shopping::Merchant::Products::V1::Shipping#min_transit_time minTransitTime} - # can only be present together with - # {::Google::Shopping::Merchant::Products::V1::Shipping#max_transit_time maxTransitTime}; - # but it is not required if - # {::Google::Shopping::Merchant::Products::V1::Shipping#max_transit_time maxTransitTime} - # is present. - # @!attribute [rw] max_transit_time - # @return [::Integer] - # Maximum transit time (inclusive) between when the order has shipped and - # when it is delivered in business days. 0 means that the order is - # delivered on the same day as it ships. Both - # {::Google::Shopping::Merchant::Products::V1::Shipping#max_handling_time maxHandlingTime} - # and - # {::Google::Shopping::Merchant::Products::V1::Shipping#max_transit_time maxTransitTime} - # are required if providing shipping speeds. - # {::Google::Shopping::Merchant::Products::V1::Shipping#min_transit_time minTransitTime} - # is optional if - # {::Google::Shopping::Merchant::Products::V1::Shipping#max_transit_time maxTransitTime} - # is present. - # @!attribute [rw] handling_cutoff_time - # @return [::String] - # The handling cutoff time until which an order has to be placed to be - # processed in the same day. This is a string in format of HHMM (e.g. - # `1530`) for 3:30 PM. If not configured, the cutoff time will be defaulted - # to 8AM PST and `handling_cutoff_timezone` will be ignored. - # @!attribute [rw] handling_cutoff_timezone - # @return [::String] - # [Timezone - # identifier](https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids) - # For example `Europe/Zurich`. This field only applies if - # `handling_cutoff_time` is set. If `handling_cutoff_time` is set but this - # field is not set, the shipping destination timezone will be used. If both - # fields are not set, the handling cutoff time will default to 8AM PST. - # @!attribute [rw] loyalty_program_label - # @return [::String] - # Optional. The label of the [loyalty - # program](https://support.google.com/merchants/answer/6324484). - # Must match one of the program labels set in - # {::Google::Shopping::Merchant::Products::V1::LoyaltyProgram loyalty_programs}. - # When set (in combination with - # [loyalty_tier_label](https://support.google.com/merchants/answer/6324484)), - # this shipping option is only applicable to loyalty program members of the - # specified tier. - # @!attribute [rw] loyalty_tier_label - # @return [::String] - # Optional. The label of the [loyalty - # tier](https://support.google.com/merchants/answer/6324484) within the - # loyalty program. Must match one of the tiers set in the - # {::Google::Shopping::Merchant::Products::V1::LoyaltyProgram loyalty_programs}. - # When set (in combination with - # [loyalty_program_label](https://support.google.com/merchants/answer/6324484)), - # this shipping option is only applicable to loyalty program members of the - # specified tier. - class Shipping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Conditions to be met for a product to have free shipping. - # @!attribute [rw] country - # @return [::String] - # The [CLDR territory - # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - # of the country to which an item will ship. - # @!attribute [rw] price_threshold - # @return [::Google::Shopping::Type::Price] - # The minimum product price for the shipping cost to become free. Represented - # as a number. - class FreeShippingThreshold - 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 - - # Product - # [certification](https://support.google.com/merchants/answer/13528839), - # initially introduced for EU energy efficiency labeling compliance using the - # EU EPREL database. - # @!attribute [rw] certification_authority - # @return [::Google::Shopping::Merchant::Products::V1::CertificationAuthority] - # The certification authority. - # @!attribute [rw] certification_name - # @return [::Google::Shopping::Merchant::Products::V1::CertificationName] - # The name of the certification. - # @!attribute [rw] certification_code - # @return [::String] - # The certification code. - # Maximum length is 2000 characters. - # @!attribute [rw] certification_value - # @return [::String] - # The certification value (also known as class, level or grade), for - # example "A+", "C", "gold". Maximum length is 2000 characters. - class ProductCertification - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Structured title, for algorithmically (AI)-generated titles. - # @!attribute [rw] digital_source_type - # @return [::Google::Shopping::Merchant::Products::V1::DigitalSourceType] - # The digital source type. - # Following [IPTC](https://cv.iptc.org/newscodes/digitalsourcetype). - # @!attribute [rw] content - # @return [::String] - # The title text - # Maximum length is 150 characters - class StructuredTitle - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Structured description, for algorithmically (AI)-generated descriptions. - # @!attribute [rw] digital_source_type - # @return [::Google::Shopping::Merchant::Products::V1::DigitalSourceType] - # The digital source type. - # Following [IPTC](https://cv.iptc.org/newscodes/digitalsourcetype). - # @!attribute [rw] content - # @return [::String] - # The description text - # Maximum length is 5000 characters - class StructuredDescription - 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 a product, data validation issues, that is, information about - # a product computed asynchronously. - # @!attribute [rw] destination_statuses - # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductStatus::DestinationStatus>] - # The intended destinations for the product. - # @!attribute [rw] item_level_issues - # @return [::Array<::Google::Shopping::Merchant::Products::V1::ProductStatus::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 ProductStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The destination status of the product status. - # - # Equivalent to - # [`StatusPerReportingContext`][google.shopping.merchant.reports.v1.ProductView.StatusPerReportingContext] - # in Reports API. - # @!attribute [rw] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # The name of the reporting context. - # @!attribute [rw] approved_countries - # @return [::Array<::String>] - # List of country codes (ISO 3166-1 alpha-2) where the offer is approved. - # @!attribute [rw] pending_countries - # @return [::Array<::String>] - # List of country codes (ISO 3166-1 alpha-2) where the offer is pending - # approval. - # @!attribute [rw] disapproved_countries - # @return [::Array<::String>] - # List of country codes (ISO 3166-1 alpha-2) where the offer 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] severity - # @return [::Google::Shopping::Merchant::Products::V1::ProductStatus::ItemLevelIssue::Severity] - # How this issue affects serving of the offer. - # @!attribute [rw] resolution - # @return [::String] - # Whether the issue can be resolved by the business. - # @!attribute [rw] attribute - # @return [::String] - # The attribute's name, if the issue is caused by a single attribute. - # @!attribute [rw] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # The reporting context 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 - # offer. - 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 - end - end - - # Product property for the Cloud Retail API. - # For example, properties for a TV product could be "Screen-Resolution" or - # "Screen-Size". - # @!attribute [rw] property_name - # @return [::String] - # Name of the given property. For example, - # "Screen-Resolution" for a TV product. Maximum string size is 256 - # characters. - # @!attribute [rw] text_value - # @return [::Array<::String>] - # Text value of the given property. For example, - # "8K(UHD)" could be a text value for a TV product. Maximum - # repeatedness of this value is 400. Values are stored in an arbitrary but - # consistent order. Maximum string size is 256 characters. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Boolean value of the given property. For example for a TV product, - # "True" or "False" if the screen is UHD. - # @!attribute [rw] int_value - # @return [::Array<::Integer>] - # Integer values of the given property. For example, 1080 for a TV - # product's Screen Resolution. Maximum repeatedness of this value - # is 400. Values are stored in an arbitrary but consistent order. - # @!attribute [rw] float_value - # @return [::Array<::Float>] - # Float values of the given property. For example for a TV product - # 1.2345. Maximum repeatedness of this value is 400. Values - # are stored in an arbitrary but consistent order. - # @!attribute [rw] min_value - # @return [::Float] - # Minimum float value of the given property. For example for a TV - # product 1.00. - # @!attribute [rw] max_value - # @return [::Float] - # Maximum float value of the given property. For example for a TV - # product 100.00. - # @!attribute [rw] unit_code - # @return [::String] - # Unit of the given property. For example, "Pixels" for a TV product. Maximum - # string size is 256B. - class CloudExportAdditionalProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information regarding sustainability-related incentive programs such as - # rebates or tax relief. - # @!attribute [rw] amount - # @return [::Google::Shopping::Type::Price] - # The fixed amount of the incentive. - # - # Note: The following fields are mutually exclusive: `amount`, `percentage`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] percentage - # @return [::Float] - # The percentage of the sale price that the incentive is applied to. - # - # Note: The following fields are mutually exclusive: `percentage`, `amount`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::Products::V1::ProductSustainabilityIncentive::Type] - # Sustainability incentive program. - class ProductSustainabilityIncentive - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Types of supported sustainability incentive programs. - module Type - # Unspecified or unknown sustainability incentive type. - TYPE_UNSPECIFIED = 0 - - # Program offering tax liability reductions for electric vehicles and, in - # some countries, plug-in hybrids. These reductions can be based on a - # specific amount or a percentage of the sale price. - EV_TAX_CREDIT = 1 - - # A subsidy program, often called an environmental bonus, provides a - # purchase grant for electric vehicles and, in some countries, plug-in - # hybrids. The grant amount may be a fixed sum or a percentage of the sale - # price. - EV_PRICE_DISCOUNT = 2 - end - end - - # Information regarding Automated Discounts. - # @!attribute [rw] prior_price - # @return [::Google::Shopping::Type::Price] - # The price prior to the application of the first price reduction. - # Absent if the information about the prior price of the product is not - # available. - # @!attribute [rw] prior_price_progressive - # @return [::Google::Shopping::Type::Price] - # The price prior to the application of consecutive price reductions. - # Absent if the information about the prior price of the product is not - # available. - # @!attribute [rw] gad_price - # @return [::Google::Shopping::Type::Price] - # The current sale price for products with a price optimized using Google - # Automated Discounts (GAD). Absent if the information about the GAD_price of - # the product is not available. - class AutomatedDiscounts - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The pickup cost of the item. - # @!attribute [rw] flat_rate - # @return [::Google::Shopping::Type::Price] - # Required. The flat rate pickup cost of the item. - # @!attribute [rw] free_threshold - # @return [::Google::Shopping::Type::Price] - # Optional. The price threshold above which pickup is free of charge. - class PickupCost - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for offer or offer-country level shipping handling cutoff time. - # @!attribute [rw] country - # @return [::String] - # The [CLDR territory - # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - # of the country to which the handling cutoff time applies. - # @!attribute [rw] cutoff_time - # @return [::String] - # The handling cutoff time until which an order has to be placed to be - # processed in the same day. This is a string in format of HHMM (e.g. `1530`) - # for 3:30 PM. - # If not configured, the cutoff time will be defaulted to 8AM PST. - # @!attribute [rw] cutoff_timezone - # @return [::String] - # [Timezone - # identifier](https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids) - # For example 'Europe/Zurich'. If not set, the shipping destination - # timezone will be used. - # @!attribute [rw] disable_delivery_after_cutoff - # @return [::Boolean] - # This field only applies to same-day delivery. If true, prevents next-day - # delivery from being shown for this offer after the cutoff time. This field - # only applies to same-day delivery offers, for merchants who want to - # explicitly disable it. - class HandlingCutoffTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The minimum order value in the cart before the checkout is permitted. - # @!attribute [rw] country - # @return [::String] - # Required. The [CLDR territory - # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - # of the country to which an item will ship. - # @!attribute [rw] service - # @return [::String] - # A free-form description of the service class or delivery speed. - # This should match the service value set for the Shipping attribute. - # See {::Google::Shopping::Merchant::Products::V1::Shipping#service service}. - # @!attribute [rw] surface - # @return [::Google::Shopping::Merchant::Products::V1::ProductMinimumOrderValue::Surface] - # The surface to which the minimum order value applies. - # Defaults to `ONLINE_LOCAL` if not configured. - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Required. The minimum cart or basket value before the checkout is - # permitted. - class ProductMinimumOrderValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The surface values to which the minimum order value applies. - module Surface - # Surface is unspecified. - SURFACE_UNSPECIFIED = 0 - - # Surface value to indicate online purchases. - ONLINE = 1 - - # Surface value to indicate local purchases. - LOCAL = 2 - - # Surface value to indicate online and local purchases. - ONLINE_LOCAL = 3 - end - 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 - - # Indicates that the subscription period is week. - WEEK = 3 - end - - # Target [age group](https://support.google.com/merchants/answer/6324463) of - # the item. - module AgeGroup - # Age group is not specified. - AGE_GROUP_UNSPECIFIED = 0 - - # Teens or older. - ADULT = 1 - - # 5-13 years old. - KIDS = 2 - - # 1-5 years old. - TODDLER = 3 - - # 3-12 months old. - INFANT = 4 - - # 0-3 months old. - NEWBORN = 5 - end - - # [Availability](https://support.google.com/merchants/answer/6324448) status - # of the item. - module Availability - # Availability is not specified. - AVAILABILITY_UNSPECIFIED = 0 - - # In stock. - IN_STOCK = 1 - - # Out of stock. - OUT_OF_STOCK = 2 - - # Pre-order. - PREORDER = 3 - - # Limited availability. - LIMITED_AVAILABILITY = 4 - - # Backorder. - BACKORDER = 5 - end - - # [Condition](https://support.google.com/merchants/answer/6324469) or state - # of the item. - module Condition - # Default value. This value is unused. - CONDITION_UNSPECIFIED = 0 - - # Brand new, original, unopened packaging. - NEW = 1 - - # Previously used, original packaging opened or missing. - USED = 2 - - # Professionally restored to working order, comes with a warranty, may or - # may not have the original packaging. - REFURBISHED = 3 - end - - # Target [gender](https://support.google.com/merchants/answer/6324479) of the - # item. - module Gender - # Gender is not specified. - GENDER_UNSPECIFIED = 0 - - # Male. - MALE = 1 - - # Female. - FEMALE = 2 - - # Unisex. - UNISEX = 3 - end - - # Type of installment payments. - module CreditType - # Default value. This value is unused. - CREDIT_TYPE_UNSPECIFIED = 0 - - # Finance. - FINANCE = 1 - - # Lease. - LEASE = 2 - end - - # System in which the size is specified. Recommended for apparel items. - # For more information, see - # [Size system](https://support.google.com/merchants/answer/6324502). - module SizeSystem - # Unspecified size system. - SIZE_SYSTEM_UNSPECIFIED = 0 - - # AU. - AU = 1 - - # BR. - BR = 2 - - # CN. - CN = 3 - - # DE. - DE = 4 - - # EU. - EU = 5 - - # FR. - FR = 6 - - # IT. - IT = 7 - - # JP. - JP = 8 - - # MEX. - MEX = 9 - - # UK. - UK = 10 - - # US. - US = 11 - end - - # 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). - module SizeType - # The size type is not specified. - SIZE_TYPE_UNSPECIFIED = 0 - - # Regular size. - REGULAR = 1 - - # Petite size. - PETITE = 2 - - # Maternity size. - MATERNITY = 3 - - # Big size. - BIG = 4 - - # Tall size. - TALL = 5 - - # Plus size. - PLUS = 6 - end - - # The [energy efficiency - # class](https://support.google.com/merchants/answer/7562785) as defined in EU - # directive 2010/30/EU. - module EnergyEfficiencyClass - # The energy efficiency class is unspecified. - ENERGY_EFFICIENCY_CLASS_UNSPECIFIED = 0 - - # A+++. - APPP = 1 - - # A++. - APP = 2 - - # A+. - AP = 3 - - # A. - A = 4 - - # B. - B = 5 - - # C. - C = 6 - - # D. - D = 7 - - # E. - E = 8 - - # F. - F = 9 - - # G. - G = 10 - end - - # The [pickup](https://support.google.com/merchants/answer/14634021) option - # for the item. - module PickupMethod - # Pickup method is not specified. - PICKUP_METHOD_UNSPECIFIED = 0 - - # The item is not available for store pickup. - NOT_SUPPORTED = 1 - - # The entire transaction occurs online. - BUY = 2 - - # The item is reserved online and the transaction occurs in-store. - RESERVE = 3 - - # The item is purchased online and shipped to a local store for the customer - # to pick up. - SHIP_TO_STORE = 4 - end - - # Item store pickup timeline. For more information, see - # [Pickup SLA](https://support.google.com/merchants/answer/14635400). - module PickupSla - # Pickup SLA is not specified. - PICKUP_SLA_UNSPECIFIED = 0 - - # Indicates that the product is available for pickup the same day that the - # order is placed, subject to cut off times. - SAME_DAY = 1 - - # Indicates that the product is available for pickup the following day that - # the order is placed. - NEXT_DAY = 2 - - # Indicates that the product will be shipped to a store for a customer to - # pick up in 2 days. - TWO_DAY = 3 - - # Indicates that the product will be shipped to a store for a customer to - # pick up in 3 days. - THREE_DAY = 4 - - # Indicates that the product will be shipped to a store for a customer to - # pick up in 4 days - FOUR_DAY = 5 - - # Indicates that the product will be shipped to a store for a customer to - # pick up in 5 days. - FIVE_DAY = 6 - - # Indicates that the product will be shipped to a store for a customer to - # pick up in 6 days. - SIX_DAY = 7 - - # Indicates that the product will be shipped to a store for a customer to - # pick up in one week or more. - MULTI_WEEK = 8 - end - - # Publication of this item will be temporarily - # [paused](https://support.google.com/merchants/answer/11909930). - module Pause - # The pause is unspecified. - PAUSE_UNSPECIFIED = 0 - - # You’re currently pausing your product for all ads locations (including - # Shopping Ads, Display Ads, and local inventory ads). - ADS = 1 - - # You’re currently pausing your product for all Shopping locations - # (including Shopping Ads, Display Ads, local inventory ads, Buy on Google, - # and free listings). - ALL = 2 - end - - # The certification authority. - module CertificationAuthority - # Certification authority is not specified. - CERTIFICATION_AUTHORITY_UNSPECIFIED = 0 - - # For the French CO2 emissions class for vehicles. - ADEME = 1 - - # For the German CO2 emissions classes for vehicles. - BMWK = 2 - - # Environment Protection Agency. - EPA = 3 - - # European Commission for energy labels in the EU. - EC = 4 - end - - # The name of the certification. - module CertificationName - # Certification name is not specified. - CERTIFICATION_NAME_UNSPECIFIED = 0 - - # Energy Star. - ENERGY_STAR = 1 - - # Energy Star Most Efficient. - ENERGY_STAR_MOST_EFFICIENT = 2 - - # Represents energy efficiency certifications in the EU European - # Registry for Energy Labeling (EPREL) database. - EPREL = 3 - - # EU Ecolabel. - EU_ECOLABEL = 4 - - # The overall CO2 class of a vehicle - VEHICLE_ENERGY_EFFICIENCY = 5 - - # For the CO2 class of a vehicle with a discharged battery. - VEHICLE_ENERGY_EFFICIENCY_DISCHARGED_BATTERY = 6 - end - - # The digital source type. - # Following [IPTC](https://cv.iptc.org/newscodes/digitalsourcetype). - module DigitalSourceType - # Digital source type is unspecified. - DIGITAL_SOURCE_TYPE_UNSPECIFIED = 0 - - # Text created algorithmically using a model derived from sampled - # content. - TRAINED_ALGORITHMIC_MEDIA = 1 - - # Text NOT created algorithmically using a model derived from sampled - # content (the default) - DEFAULT = 2 - end - - # Possible carrier where transit time is coming from. - module CarrierTransitTimeOption - # Carrier transit time option is unspecified. - CARRIER_TRANSIT_TIME_OPTION_UNSPECIFIED = 0 - - # DHL Paket shipping service. - DHL_PAKET = 1 - - # DHL Packchen shipping service. - DHL_PACKCHEN = 2 - - # DHL Express Easy shipping service. - DHL_EXPRESSEASY = 3 - - # DPD Express shipping service. - DPD_EXPRESS = 4 - - # DPD Classic Parcel shipping service. - DPD_CLASSIC_PARCEL = 5 - - # Hermes Haustur shipping service. - HERMES_HAUSTUR = 6 - - # Hermes Paketshop shipping service. - HERMES_PAKETSHOP = 7 - - # GLS Business shipping service. - GLS_BUSINESS = 8 - - # GLS Express shipping service. - GLS_EXPRESS = 9 - - # GLS Private shipping service. - GLS_PRIVATE = 10 - - # Colissimo Domicile shipping service. - COLISSIMO_DOMICILE = 11 - - # DHL Express 12 AM shipping service. - DHL_EXPRESS_12AM = 12 - - # DHL Express 9 AM shipping service. - DHL_EXPRESS_9AM = 13 - - # GEODIS Express shipping service. - GEODIS_EXPRESS = 14 - - # GEODIS Pack 30 shipping service. - GEODIS_PACK_30 = 15 - - # GEODIS Same Day shipping service. - GEODIS_SAME_DAY = 16 - - # GEODIS Top 24 shipping service. - GEODIS_TOP_24 = 17 - - # TNT Essentiel 24H shipping service. - TNT_ESSENTIEL_24H = 18 - - # TNT Essentiel Flexibilite shipping service. - TNT_ESSENTIEL_FLEXIBILITE = 19 - - # FedEx Ground shipping service. - FEDEX_GROUND = 20 - - # FedEx Home Delivery shipping service. - FEDEX_HOME_DELIVERY = 21 - - # FedEx Express Saver shipping service. - FEDEX_EXPRESS_SAVER = 22 - - # FedEx First Overnight shipping service. - FEDEX_FIRST_OVERNIGHT = 23 - - # FedEx Priority Overnight shipping service. - FEDEX_PRIORITY_OVERNIGHT = 24 - - # FedEx Standard Overnight shipping service. - FEDEX_STANDARD_OVERNIGHT = 25 - - # FedEx 2Day shipping service. - FEDEX_2DAY = 26 - - # UPS 2nd Day Air shipping service. - UPS_2ND_DAY_AIR = 27 - - # UPS 2nd Day AM shipping service. - UPS_2ND_DAY_AM = 28 - - # UPS 3 Day Select shipping service. - UPS_3_DAY_SELECT = 29 - - # UPS Ground shipping service. - UPS_GROUND = 30 - - # UPS Next Day Air shipping service. - UPS_NEXT_DAY_AIR = 31 - - # UPS Next Day Air Early AM shipping service. - UPS_NEXT_DAY_AIR_EARLY_AM = 32 - - # UPS Next Day Air Saver shipping service. - UPS_NEXT_DAY_AIR_SAVER = 33 - - # USPS Priority Mail Express shipping service. - USPS_PRIORITY_MAIL_EXPRESS = 34 - - # USPS Media Mail shipping service. - USPS_MEDIA_MAIL = 35 - - # USPS Ground Advantage Retail shipping service. - USPS_GROUND_ADVANTAGE_RETAIL = 36 - - # USPS Priority Mail shipping service. - USPS_PRIORITY_MAIL = 37 - - # USPS Ground Advantage Commercial shipping service. - USPS_GROUND_ADVANTAGE_COMMERCIAL = 38 - - # USPS First Class Mail shipping service. - USPS_FIRST_CLASS_MAIL = 39 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1/proto_docs/google/type/interval.rb b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/type/interval.rb deleted file mode 100644 index 9350ca479005..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-products-v1/snippets/Gemfile deleted file mode 100644 index 476b0913359f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1", path: "../" -else - gem "google-shopping-merchant-products-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-products-v1/snippets/product_inputs_service/delete_product_input.rb b/owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/delete_product_input.rb deleted file mode 100644 index fed58bf376e9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/delete_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 merchantapi_v1_generated_ProductInputsService_DeleteProductInput_sync] -require "google/shopping/merchant/products/v1" - -## -# Snippet for the delete_product_input call in the ProductInputsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#delete_product_input. -# -def delete_product_input - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new - - # Call the delete_product_input method. - result = client.delete_product_input request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1_generated_ProductInputsService_DeleteProductInput_sync] diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/insert_product_input.rb b/owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/insert_product_input.rb deleted file mode 100644 index 93a4a28126da..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/insert_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 merchantapi_v1_generated_ProductInputsService_InsertProductInput_sync] -require "google/shopping/merchant/products/v1" - -## -# Snippet for the insert_product_input call in the ProductInputsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#insert_product_input. -# -def insert_product_input - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new - - # Call the insert_product_input method. - result = client.insert_product_input request - - # The returned object is of type Google::Shopping::Merchant::Products::V1::ProductInput. - p result -end -# [END merchantapi_v1_generated_ProductInputsService_InsertProductInput_sync] diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/update_product_input.rb b/owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/update_product_input.rb deleted file mode 100644 index 03fa844cc1bb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/snippets/product_inputs_service/update_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 merchantapi_v1_generated_ProductInputsService_UpdateProductInput_sync] -require "google/shopping/merchant/products/v1" - -## -# Snippet for the update_product_input call in the ProductInputsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#update_product_input. -# -def update_product_input - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new - - # Call the update_product_input method. - result = client.update_product_input request - - # The returned object is of type Google::Shopping::Merchant::Products::V1::ProductInput. - p result -end -# [END merchantapi_v1_generated_ProductInputsService_UpdateProductInput_sync] diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/snippets/products_service/get_product.rb b/owl-bot-staging/google-shopping-merchant-products-v1/snippets/products_service/get_product.rb deleted file mode 100644 index c3ee6d98c313..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/snippets/products_service/get_product.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ProductsService_GetProduct_sync] -require "google/shopping/merchant/products/v1" - -## -# Snippet for the get_product call in the ProductsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Products::V1::ProductsService::Client#get_product. -# -def get_product - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Products::V1::ProductsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Products::V1::GetProductRequest.new - - # Call the get_product method. - result = client.get_product request - - # The returned object is of type Google::Shopping::Merchant::Products::V1::Product. - p result -end -# [END merchantapi_v1_generated_ProductsService_GetProduct_sync] diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/snippets/products_service/list_products.rb b/owl-bot-staging/google-shopping-merchant-products-v1/snippets/products_service/list_products.rb deleted file mode 100644 index 8c761094470d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/snippets/products_service/list_products.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_ProductsService_ListProducts_sync] -require "google/shopping/merchant/products/v1" - -## -# Snippet for the list_products call in the ProductsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Products::V1::ProductsService::Client#list_products. -# -def list_products - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Products::V1::ProductsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Products::V1::ListProductsRequest.new - - # Call the list_products method. - result = client.list_products request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Products::V1::Product. - p item - end -end -# [END merchantapi_v1_generated_ProductsService_ListProducts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/snippets/snippet_metadata_google.shopping.merchant.products.v1.json b/owl-bot-staging/google-shopping-merchant-products-v1/snippets/snippet_metadata_google.shopping.merchant.products.v1.json deleted file mode 100644 index 18fb7a47b809..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/snippets/snippet_metadata_google.shopping.merchant.products.v1.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-products-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.products.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1_generated_ProductInputsService_InsertProductInput_sync", - "title": "Snippet for the insert_product_input call in the ProductInputsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#insert_product_input.", - "file": "product_inputs_service/insert_product_input.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_product_input", - "full_name": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#insert_product_input", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Products::V1::ProductInput", - "client": { - "short_name": "ProductInputsService::Client", - "full_name": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client" - }, - "method": { - "short_name": "InsertProductInput", - "full_name": "google.shopping.merchant.products.v1.ProductInputsService.InsertProductInput", - "service": { - "short_name": "ProductInputsService", - "full_name": "google.shopping.merchant.products.v1.ProductInputsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ProductInputsService_UpdateProductInput_sync", - "title": "Snippet for the update_product_input call in the ProductInputsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#update_product_input.", - "file": "product_inputs_service/update_product_input.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_product_input", - "full_name": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#update_product_input", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Products::V1::ProductInput", - "client": { - "short_name": "ProductInputsService::Client", - "full_name": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client" - }, - "method": { - "short_name": "UpdateProductInput", - "full_name": "google.shopping.merchant.products.v1.ProductInputsService.UpdateProductInput", - "service": { - "short_name": "ProductInputsService", - "full_name": "google.shopping.merchant.products.v1.ProductInputsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ProductInputsService_DeleteProductInput_sync", - "title": "Snippet for the delete_product_input call in the ProductInputsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#delete_product_input.", - "file": "product_inputs_service/delete_product_input.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_product_input", - "full_name": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client#delete_product_input", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ProductInputsService::Client", - "full_name": "::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client" - }, - "method": { - "short_name": "DeleteProductInput", - "full_name": "google.shopping.merchant.products.v1.ProductInputsService.DeleteProductInput", - "service": { - "short_name": "ProductInputsService", - "full_name": "google.shopping.merchant.products.v1.ProductInputsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ProductsService_GetProduct_sync", - "title": "Snippet for the get_product call in the ProductsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1::ProductsService::Client#get_product.", - "file": "products_service/get_product.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_product", - "full_name": "::Google::Shopping::Merchant::Products::V1::ProductsService::Client#get_product", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Products::V1::GetProductRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Products::V1::Product", - "client": { - "short_name": "ProductsService::Client", - "full_name": "::Google::Shopping::Merchant::Products::V1::ProductsService::Client" - }, - "method": { - "short_name": "GetProduct", - "full_name": "google.shopping.merchant.products.v1.ProductsService.GetProduct", - "service": { - "short_name": "ProductsService", - "full_name": "google.shopping.merchant.products.v1.ProductsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_ProductsService_ListProducts_sync", - "title": "Snippet for the list_products call in the ProductsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1::ProductsService::Client#list_products.", - "file": "products_service/list_products.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_products", - "full_name": "::Google::Shopping::Merchant::Products::V1::ProductsService::Client#list_products", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Products::V1::ListProductsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Products::V1::ListProductsResponse", - "client": { - "short_name": "ProductsService::Client", - "full_name": "::Google::Shopping::Merchant::Products::V1::ProductsService::Client" - }, - "method": { - "short_name": "ListProducts", - "full_name": "google.shopping.merchant.products.v1.ProductsService.ListProducts", - "service": { - "short_name": "ProductsService", - "full_name": "google.shopping.merchant.products.v1.ProductsService" - } - } - }, - "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-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_paths_test.rb deleted file mode 100644 index 129ddf43af5d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/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/merchant/products/v1/product_inputs_service" - -class ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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::Products::V1::ProductInputsService::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_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::Merchant::Products::V1::ProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.product_input_path account: "value0", productinput: "value1" - assert_equal "accounts/value0/productInputs/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_rest_test.rb deleted file mode 100644 index 4fb0bfefbe32..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_rest_test.rb +++ /dev/null @@ -1,266 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/products/v1/productinputs_pb" -require "google/shopping/merchant/products/v1/product_inputs_service/rest" - - -class ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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_product_input - # Create test objects. - client_result = ::Google::Shopping::Merchant::Products::V1::ProductInput.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - product_input = {} - data_source = "hello world" - - insert_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::Merchant::Products::V1::ProductInputsService::Rest::ServiceStub.stub :transcode_insert_product_input_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_product_input_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.insert_product_input({ parent: parent, product_input: product_input, data_source: data_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.insert_product_input parent: parent, product_input: product_input, data_source: data_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.insert_product_input ::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new(parent: parent, product_input: product_input, data_source: data_source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.insert_product_input({ parent: parent, product_input: product_input, data_source: data_source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.insert_product_input(::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new(parent: parent, product_input: product_input, data_source: data_source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_product_input_client_stub.call_count - end - end - end - - def test_update_product_input - # Create test objects. - client_result = ::Google::Shopping::Merchant::Products::V1::ProductInput.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - product_input = {} - update_mask = {} - data_source = "hello world" - - update_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::Merchant::Products::V1::ProductInputsService::Rest::ServiceStub.stub :transcode_update_product_input_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_product_input_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_product_input({ product_input: product_input, update_mask: update_mask, data_source: data_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_product_input product_input: product_input, update_mask: update_mask, data_source: data_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_product_input ::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new(product_input: product_input, update_mask: update_mask, data_source: data_source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_product_input({ product_input: product_input, update_mask: update_mask, data_source: data_source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_product_input(::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new(product_input: product_input, update_mask: update_mask, data_source: data_source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_product_input_client_stub.call_count - end - end - end - - def test_delete_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" - data_source = "hello world" - - delete_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::Merchant::Products::V1::ProductInputsService::Rest::ServiceStub.stub :transcode_delete_product_input_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_product_input_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_product_input({ name: name, data_source: data_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_product_input name: name, data_source: data_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_product_input ::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new(name: name, data_source: data_source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_product_input({ name: name, data_source: data_source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_product_input(::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new(name: name, data_source: data_source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_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::Merchant::Products::V1::ProductInputsService::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::Products::V1::ProductInputsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_test.rb deleted file mode 100644 index 64c3eaa96159..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/product_inputs_service_test.rb +++ /dev/null @@ -1,288 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/products/v1/productinputs_pb" -require "google/shopping/merchant/products/v1/product_inputs_service" - -class ::Google::Shopping::Merchant::Products::V1::ProductInputsService::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_product_input - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Products::V1::ProductInput.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - product_input = {} - data_source = "hello world" - - insert_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_product_input, name - assert_kind_of ::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Products::V1::ProductInput), request["product_input"] - assert_equal "hello world", request["data_source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_product_input_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.insert_product_input({ parent: parent, product_input: product_input, data_source: data_source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.insert_product_input parent: parent, product_input: product_input, data_source: data_source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.insert_product_input ::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new(parent: parent, product_input: product_input, data_source: data_source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.insert_product_input({ parent: parent, product_input: product_input, 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 - c.insert_product_input(::Google::Shopping::Merchant::Products::V1::InsertProductInputRequest.new(parent: parent, product_input: product_input, 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, insert_product_input_client_stub.call_rpc_count - end - end - - def test_update_product_input - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Products::V1::ProductInput.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - product_input = {} - update_mask = {} - data_source = "hello world" - - update_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_product_input, name - assert_kind_of ::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Products::V1::ProductInput), request["product_input"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal "hello world", request["data_source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_product_input_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_product_input({ product_input: product_input, update_mask: update_mask, data_source: data_source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_product_input product_input: product_input, update_mask: update_mask, data_source: data_source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_product_input ::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new(product_input: product_input, update_mask: update_mask, data_source: data_source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_product_input({ product_input: product_input, update_mask: update_mask, 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 - c.update_product_input(::Google::Shopping::Merchant::Products::V1::UpdateProductInputRequest.new(product_input: product_input, update_mask: update_mask, 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, update_product_input_client_stub.call_rpc_count - end - end - - def test_delete_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" - data_source = "hello world" - - delete_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_product_input, name - assert_kind_of ::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["data_source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_product_input_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_product_input({ name: name, data_source: data_source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_product_input name: name, data_source: data_source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_product_input ::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new(name: name, data_source: data_source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_product_input({ name: name, 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 - c.delete_product_input(::Google::Shopping::Merchant::Products::V1::DeleteProductInputRequest.new(name: name, 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, delete_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::Merchant::Products::V1::ProductInputsService::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::Products::V1::ProductInputsService::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::Products::V1::ProductInputsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_paths_test.rb deleted file mode 100644 index 7699b26cd912..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/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/merchant/products/v1/products_service" - -class ::Google::Shopping::Merchant::Products::V1::ProductsService::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::Products::V1::ProductsService::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::Products::V1::ProductsService::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-products-v1/test/google/shopping/merchant/products/v1/products_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_rest_test.rb deleted file mode 100644 index f65e8189f567..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/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/merchant/products/v1/products_pb" -require "google/shopping/merchant/products/v1/products_service/rest" - - -class ::Google::Shopping::Merchant::Products::V1::ProductsService::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_product - # Create test objects. - client_result = ::Google::Shopping::Merchant::Products::V1::Product.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_product_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::ServiceStub.stub :transcode_get_product_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_product_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_product({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_product name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_product ::Google::Shopping::Merchant::Products::V1::GetProductRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_product({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_product(::Google::Shopping::Merchant::Products::V1::GetProductRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_product_client_stub.call_count - end - end - end - - def test_list_products - # Create test objects. - client_result = ::Google::Shopping::Merchant::Products::V1::ListProductsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_products_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::ServiceStub.stub :transcode_list_products_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_products_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_products({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_products parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_products ::Google::Shopping::Merchant::Products::V1::ListProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_products({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_products(::Google::Shopping::Merchant::Products::V1::ListProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_products_client_stub.call_count - end - end - end - - def test_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::Products::V1::ProductsService::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::Products::V1::ProductsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/products_service_test.rb deleted file mode 100644 index f01d9b28135c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/test/google/shopping/merchant/products/v1/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/merchant/products/v1/products_pb" -require "google/shopping/merchant/products/v1/products_service" - -class ::Google::Shopping::Merchant::Products::V1::ProductsService::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_product - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Products::V1::Product.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_product, name - assert_kind_of ::Google::Shopping::Merchant::Products::V1::GetProductRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_product_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_product({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_product name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_product ::Google::Shopping::Merchant::Products::V1::GetProductRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_product({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_product(::Google::Shopping::Merchant::Products::V1::GetProductRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_product_client_stub.call_rpc_count - end - end - - def test_list_products - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Products::V1::ListProductsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_products_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_products, name - assert_kind_of ::Google::Shopping::Merchant::Products::V1::ListProductsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_products_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_products({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_products parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_products ::Google::Shopping::Merchant::Products::V1::ListProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_products({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_products(::Google::Shopping::Merchant::Products::V1::ListProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_products_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::Products::V1::ProductsService::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::Products::V1::ProductsService::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::Products::V1::ProductsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Products::V1::ProductsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-products-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -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-products-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-products-v1beta/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -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-products-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-products-v1beta/.repo-metadata.json deleted file mode 100644 index b8f3e6f102ed..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta", - "distribution_name": "google-shopping-merchant-products-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-products-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-products 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-products-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-products-v1beta/.rubocop.yml deleted file mode 100644 index 02dfe36a64d7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-products-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-products-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-products-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-products-v1beta/AUTHENTICATION.md deleted file mode 100644 index 05272e5624bd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-products-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-products-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/products/v1beta" - -client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::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/products/v1beta" - -::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::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-products-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/products/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::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-products-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-products-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-products-v1beta/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/Gemfile +++ /dev/null @@ -1,15 +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-reporters", "~> 1.8.0", require: false -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-products-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-products-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-products-v1beta/README.md deleted file mode 100644 index 54b5fad7683e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products](https://rubygems.org/gems/google-shopping-merchant-products). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-products-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/products/v1beta" - -client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new -request = ::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest.new # (request fields as keyword arguments...) -response = client.insert_product_input request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-products-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/products/v1beta" -require "logger" - -client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::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.2+. - -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-products`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-products-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-products`. -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-products-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-products-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-products-v1beta/Rakefile deleted file mode 100644 index 10cb6d8b95a9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-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/products/v1beta/product_inputs_service/credentials" - ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::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-products-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-products-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-products-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-products-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-products-v1beta" - header "google-shopping-merchant-products-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-products-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-products-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-products-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-products-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-products-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-products-v1beta/gapic_metadata.json deleted file mode 100644 index 40fc37abe836..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/gapic_metadata.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.products.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::Products::V1beta", - "services": { - "ProductInputsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client", - "rpcs": { - "InsertProductInput": { - "methods": [ - "insert_product_input" - ] - }, - "UpdateProductInput": { - "methods": [ - "update_product_input" - ] - }, - "DeleteProductInput": { - "methods": [ - "delete_product_input" - ] - } - } - } - } - }, - "ProductsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client", - "rpcs": { - "GetProduct": { - "methods": [ - "get_product" - ] - }, - "ListProducts": { - "methods": [ - "list_products" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/google-shopping-merchant-products-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-products-v1beta/google-shopping-merchant-products-v1beta.gemspec deleted file mode 100644 index 2713703c4d8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/google-shopping-merchant-products-v1beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/products/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-products-v1beta" - gem.version = Google::Shopping::Merchant::Products::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-products-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-products 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.3" - 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-products-v1beta/lib/google-shopping-merchant-products-v1beta.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google-shopping-merchant-products-v1beta.rb deleted file mode 100644 index 7d527ddd9822..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google-shopping-merchant-products-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/products/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta.rb deleted file mode 100644 index e683bb4e583d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/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/products/v1beta/product_inputs_service" -require "google/shopping/merchant/products/v1beta/products_service" -require "google/shopping/merchant/products/v1beta/version" - -module Google - module Shopping - module Merchant - module Products - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/products/v1beta" - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/products/v1beta" - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/products/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service.rb deleted file mode 100644 index 0ddfb756c73a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_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/products/v1beta/version" - -require "google/shopping/merchant/products/v1beta/product_inputs_service/credentials" -require "google/shopping/merchant/products/v1beta/product_inputs_service/paths" -require "google/shopping/merchant/products/v1beta/product_inputs_service/client" -require "google/shopping/merchant/products/v1beta/product_inputs_service/rest" - -module Google - module Shopping - module Merchant - module Products - module V1beta - ## - # Service to use ProductInput resource. - # This service works for products with online channel only. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/products/v1beta/product_inputs_service" - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/products/v1beta/product_inputs_service/rest" - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new - # - module ProductInputsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "product_inputs_service", "helpers.rb" -require "google/shopping/merchant/products/v1beta/product_inputs_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/client.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/client.rb deleted file mode 100644 index 165f4881a6dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/client.rb +++ /dev/null @@ -1,733 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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/products/v1beta/productinputs_pb" - -module Google - module Shopping - module Merchant - module Products - module V1beta - module ProductInputsService - ## - # Client for the ProductInputsService service. - # - # Service to use ProductInput resource. - # This service works for products with online channel only. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :product_inputs_service_stub - - ## - # Configure the ProductInputsService Client class. - # - # See {::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ProductInputsService clients - # ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.configure do |config| - # config.timeout = 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", "Products", "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 ProductInputsService Client instance. - # - # The configuration is set to the derived mode, meaning that values 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::Products::V1beta::ProductInputsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @product_inputs_service_stub.universe_domain - end - - ## - # Create a new ProductInputsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ProductInputsService 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/products/v1beta/productinputs_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 - - @product_inputs_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @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 - @product_inputs_service_stub.logger - end - - # Service calls - - ## - # [Uploads a product input to your Merchant Center - # account](/merchant/api/guides/products/overview#upload-product-input). You - # must have a products data source to be able to insert a product. The unique - # identifier of the data source is passed as a query parameter in the request - # URL. - # - # If an input with the same contentLanguage, offerId, and dataSource already - # exists, this method replaces that entry. - # - # After inserting, updating, or deleting a product input, it may take several - # minutes before the processed product can be retrieved. - # - # @overload insert_product_input(request, options = nil) - # Pass arguments to `insert_product_input` via a request object, either of type - # {::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_product_input(parent: nil, product_input: nil, data_source: nil) - # Pass arguments to `insert_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 product will be inserted. - # Format: `accounts/{account}` - # @param product_input [::Google::Shopping::Merchant::Products::V1beta::ProductInput, ::Hash] - # Required. The product input to insert. - # @param data_source [::String] - # Required. The primary or supplemental product data source name. If the - # product already exists and data source provided is different, then the - # product will be moved to a new data source. For more information, see - # [Overview of Data sources - # sub-API](/merchant/api/guides/data-sources/overview). - # - # Only API data sources are supported. - # - # Format: `accounts/{account}/dataSources/{datasource}`. For example, - # `accounts/123456/dataSources/104628`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Products::V1beta::ProductInput] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Products::V1beta::ProductInput] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/products/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest.new - # - # # Call the insert_product_input method. - # result = client.insert_product_input request - # - # # The returned object is of type Google::Shopping::Merchant::Products::V1beta::ProductInput. - # p result - # - def insert_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest - - # Converts hash and nil to 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_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::Merchant::Products::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_product_input.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_inputs_service_stub.call_rpc :insert_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 product input in your Merchant Center account. - # - # After inserting, updating, or deleting a product input, it may take several - # minutes before the processed product can be retrieved. - # - # @overload update_product_input(request, options = nil) - # Pass arguments to `update_product_input` via a request object, either of type - # {::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_product_input(product_input: nil, update_mask: nil, data_source: nil) - # Pass arguments to `update_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 product_input [::Google::Shopping::Merchant::Products::V1beta::ProductInput, ::Hash] - # Required. The product input resource to update. Information you submit will - # be applied to the processed product as well. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of 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 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 product replacement is not supported. - # @param data_source [::String] - # Required. The primary or supplemental product data source where - # `data_source` name identifies the product input to be updated. - # - # Only API data sources are supported. - # - # Format: `accounts/{account}/dataSources/{datasource}`. For example, - # `accounts/123456/dataSources/104628`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Products::V1beta::ProductInput] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Products::V1beta::ProductInput] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/products/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest.new - # - # # Call the update_product_input method. - # result = client.update_product_input request - # - # # The returned object is of type Google::Shopping::Merchant::Products::V1beta::ProductInput. - # p result - # - def update_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_product_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::Merchant::Products::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.product_input&.name - header_params["product_input.name"] = request.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_product_input.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_inputs_service_stub.call_rpc :update_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 product input from your Merchant Center account. - # - # After inserting, updating, or deleting a product input, it may take several - # minutes before the processed product can be retrieved. - # - # @overload delete_product_input(request, options = nil) - # Pass arguments to `delete_product_input` via a request object, either of type - # {::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_product_input(name: nil, data_source: nil) - # Pass arguments to `delete_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 product input resource to delete. - # Format: `accounts/{account}/productInputs/{product}` - # where the last section `product` consists of 4 parts: - # `channel~content_language~feed_label~offer_id` - # example for product name is - # `accounts/123/productInputs/online~en~US~sku123`. - # @param data_source [::String] - # Required. The primary or supplemental data source from which the product - # input should be deleted. Format: - # `accounts/{account}/dataSources/{datasource}`. For example, - # `accounts/123456/dataSources/104628`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::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/products/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest.new - # - # # Call the delete_product_input method. - # result = client.delete_product_input request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_product_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::Merchant::Products::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_product_input.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_inputs_service_stub.call_rpc :delete_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 ProductInputsService API. - # - # This class represents the configuration for ProductInputsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_product_input to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_product_input.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_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::Merchant::Products::V1beta::ProductInputsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ProductInputsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `insert_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_product_input - ## - # RPC-specific configuration for `update_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :update_product_input - ## - # RPC-specific configuration for `delete_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_product_input - - # @private - def initialize parent_rpcs = nil - insert_product_input_config = parent_rpcs.insert_product_input if parent_rpcs.respond_to? :insert_product_input - @insert_product_input = ::Gapic::Config::Method.new insert_product_input_config - update_product_input_config = parent_rpcs.update_product_input if parent_rpcs.respond_to? :update_product_input - @update_product_input = ::Gapic::Config::Method.new update_product_input_config - delete_product_input_config = parent_rpcs.delete_product_input if parent_rpcs.respond_to? :delete_product_input - @delete_product_input = ::Gapic::Config::Method.new delete_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-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/credentials.rb deleted file mode 100644 index 718d7d4e3f00..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_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 Products - module V1beta - module ProductInputsService - # Credentials for the ProductInputsService 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-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/paths.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/paths.rb deleted file mode 100644 index 4a11a773de08..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_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 Products - module V1beta - module ProductInputsService - # Path helper methods for the ProductInputsService 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 ProductInput resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/productInputs/{productinput}` - # - # @param account [String] - # @param productinput [String] - # - # @return [::String] - def product_input_path account:, productinput: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/productInputs/#{productinput}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest.rb deleted file mode 100644 index 672cd8c37902..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_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/products/v1beta/version" - -require "google/shopping/merchant/products/v1beta/product_inputs_service/credentials" -require "google/shopping/merchant/products/v1beta/product_inputs_service/paths" -require "google/shopping/merchant/products/v1beta/product_inputs_service/rest/client" - -module Google - module Shopping - module Merchant - module Products - module V1beta - ## - # Service to use ProductInput resource. - # This service works for products with online channel only. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/products/v1beta/product_inputs_service/rest" - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new - # - module ProductInputsService - # 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/products/v1beta/product_inputs_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/client.rb deleted file mode 100644 index d718e5bfd70b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/client.rb +++ /dev/null @@ -1,669 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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/products/v1beta/productinputs_pb" -require "google/shopping/merchant/products/v1beta/product_inputs_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Products - module V1beta - module ProductInputsService - module Rest - ## - # REST client for the ProductInputsService service. - # - # Service to use ProductInput resource. - # This service works for products with online channel only. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :product_inputs_service_stub - - ## - # Configure the ProductInputsService Client class. - # - # See {::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ProductInputsService clients - # ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::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", "Products", "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 ProductInputsService Client instance. - # - # The configuration is set to the derived mode, meaning that values 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::Products::V1beta::ProductInputsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @product_inputs_service_stub.universe_domain - end - - ## - # Create a new ProductInputsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ProductInputsService 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 - - @product_inputs_service_stub = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @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 - @product_inputs_service_stub.logger - end - - # Service calls - - ## - # [Uploads a product input to your Merchant Center - # account](/merchant/api/guides/products/overview#upload-product-input). You - # must have a products data source to be able to insert a product. The unique - # identifier of the data source is passed as a query parameter in the request - # URL. - # - # If an input with the same contentLanguage, offerId, and dataSource already - # exists, this method replaces that entry. - # - # After inserting, updating, or deleting a product input, it may take several - # minutes before the processed product can be retrieved. - # - # @overload insert_product_input(request, options = nil) - # Pass arguments to `insert_product_input` via a request object, either of type - # {::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_product_input(parent: nil, product_input: nil, data_source: nil) - # Pass arguments to `insert_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 product will be inserted. - # Format: `accounts/{account}` - # @param product_input [::Google::Shopping::Merchant::Products::V1beta::ProductInput, ::Hash] - # Required. The product input to insert. - # @param data_source [::String] - # Required. The primary or supplemental product data source name. If the - # product already exists and data source provided is different, then the - # product will be moved to a new data source. For more information, see - # [Overview of Data sources - # sub-API](/merchant/api/guides/data-sources/overview). - # - # Only API data sources are supported. - # - # Format: `accounts/{account}/dataSources/{datasource}`. For example, - # `accounts/123456/dataSources/104628`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Products::V1beta::ProductInput] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Products::V1beta::ProductInput] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/products/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest.new - # - # # Call the insert_product_input method. - # result = client.insert_product_input request - # - # # The returned object is of type Google::Shopping::Merchant::Products::V1beta::ProductInput. - # p result - # - def insert_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest - - # Converts hash and nil to an 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_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::Merchant::Products::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_product_input.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_inputs_service_stub.insert_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 product input in your Merchant Center account. - # - # After inserting, updating, or deleting a product input, it may take several - # minutes before the processed product can be retrieved. - # - # @overload update_product_input(request, options = nil) - # Pass arguments to `update_product_input` via a request object, either of type - # {::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_product_input(product_input: nil, update_mask: nil, data_source: nil) - # Pass arguments to `update_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 product_input [::Google::Shopping::Merchant::Products::V1beta::ProductInput, ::Hash] - # Required. The product input resource to update. Information you submit will - # be applied to the processed product as well. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of 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 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 product replacement is not supported. - # @param data_source [::String] - # Required. The primary or supplemental product data source where - # `data_source` name identifies the product input to be updated. - # - # Only API data sources are supported. - # - # Format: `accounts/{account}/dataSources/{datasource}`. For example, - # `accounts/123456/dataSources/104628`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Products::V1beta::ProductInput] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Products::V1beta::ProductInput] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/products/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest.new - # - # # Call the update_product_input method. - # result = client.update_product_input request - # - # # The returned object is of type Google::Shopping::Merchant::Products::V1beta::ProductInput. - # p result - # - def update_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_product_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::Merchant::Products::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_product_input.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_inputs_service_stub.update_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 product input from your Merchant Center account. - # - # After inserting, updating, or deleting a product input, it may take several - # minutes before the processed product can be retrieved. - # - # @overload delete_product_input(request, options = nil) - # Pass arguments to `delete_product_input` via a request object, either of type - # {::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_product_input(name: nil, data_source: nil) - # Pass arguments to `delete_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 product input resource to delete. - # Format: `accounts/{account}/productInputs/{product}` - # where the last section `product` consists of 4 parts: - # `channel~content_language~feed_label~offer_id` - # example for product name is - # `accounts/123/productInputs/online~en~US~sku123`. - # @param data_source [::String] - # Required. The primary or supplemental data source from which the product - # input should be deleted. Format: - # `accounts/{account}/dataSources/{datasource}`. For example, - # `accounts/123456/dataSources/104628`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @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/products/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest.new - # - # # Call the delete_product_input method. - # result = client.delete_product_input request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_product_input request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_product_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::Merchant::Products::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_product_input.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_product_input.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_inputs_service_stub.delete_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 ProductInputsService REST API. - # - # This class represents the configuration for ProductInputsService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_product_input to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_product_input.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the ProductInputsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `insert_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_product_input - ## - # RPC-specific configuration for `update_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :update_product_input - ## - # RPC-specific configuration for `delete_product_input` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_product_input - - # @private - def initialize parent_rpcs = nil - insert_product_input_config = parent_rpcs.insert_product_input if parent_rpcs.respond_to? :insert_product_input - @insert_product_input = ::Gapic::Config::Method.new insert_product_input_config - update_product_input_config = parent_rpcs.update_product_input if parent_rpcs.respond_to? :update_product_input - @update_product_input = ::Gapic::Config::Method.new update_product_input_config - delete_product_input_config = parent_rpcs.delete_product_input if parent_rpcs.respond_to? :delete_product_input - @delete_product_input = ::Gapic::Config::Method.new delete_product_input_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-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/service_stub.rb deleted file mode 100644 index dc90849ebd50..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/rest/service_stub.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 "google/shopping/merchant/products/v1beta/productinputs_pb" - -module Google - module Shopping - module Merchant - module Products - module V1beta - module ProductInputsService - module Rest - ## - # REST service stub for the ProductInputsService 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_product_input REST call - # - # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Products::V1beta::ProductInput] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Products::V1beta::ProductInput] - # A result object deserialized from the server's reply - def insert_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_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_product_input", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Products::V1beta::ProductInput.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_product_input REST call - # - # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Products::V1beta::ProductInput] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Products::V1beta::ProductInput] - # A result object deserialized from the server's reply - def update_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_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_product_input", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Products::V1beta::ProductInput.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_product_input REST call - # - # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_product_input request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_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_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_product_input REST call - # - # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest] - # 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_product_input_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/products/v1beta/{parent}/productInputs:insert", - body: "product_input", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_product_input REST call - # - # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_product_input_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/products/v1beta/{product_input.name}", - body: "product_input", - matches: [ - ["product_input.name", %r{^accounts/[^/]+/productInputs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_product_input REST call - # - # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_product_input_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/products/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/productInputs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_pb.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_pb.rb deleted file mode 100644 index bced0f14a337..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_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/products/v1beta/productinputs.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/products/v1beta/products_common_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\ngoogle/shopping/merchant/products/v1beta/products_common.proto\x1a google/shopping/type/types.proto\"\x9a\x04\n\x0cProductInput\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x14\n\x07product\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12?\n\x07\x63hannel\x18\x03 \x01(\x0e\x32).google.shopping.type.Channel.ChannelEnumB\x03\xe0\x41\x05\x12\x18\n\x08offer_id\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\x12\x1a\n\nfeed_label\x18\x06 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12#\n\x0eversion_number\x18\x07 \x01(\x03\x42\x06\xe0\x41\x01\xe0\x41\x05H\x00\x88\x01\x01\x12M\n\nattributes\x18\x08 \x01(\x0b\x32\x34.google.shopping.merchant.products.v1beta.AttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\t \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01:z\xea\x41w\n\'merchantapi.googleapis.com/ProductInput\x12/accounts/{account}/productInputs/{productinput}*\rproductInputs2\x0cproductInputB\x11\n\x0f_version_number\"\xc5\x01\n\x19InsertProductInputRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"merchantapi.googleapis.com/Product\x12R\n\rproduct_input\x18\x02 \x01(\x0b\x32\x36.google.shopping.merchant.products.v1beta.ProductInputB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xbf\x01\n\x19UpdateProductInputRequest\x12R\n\rproduct_input\x18\x01 \x01(\x0b\x32\x36.google.shopping.merchant.products.v1beta.ProductInputB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"t\n\x19\x44\x65leteProductInputRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'merchantapi.googleapis.com/ProductInput\x12\x18\n\x0b\x64\x61ta_source\x18\x02 \x01(\tB\x03\xe0\x41\x02\x32\x85\x06\n\x14ProductInputsService\x12\xe3\x01\n\x12InsertProductInput\x12\x43.google.shopping.merchant.products.v1beta.InsertProductInputRequest\x1a\x36.google.shopping.merchant.products.v1beta.ProductInput\"P\x82\xd3\xe4\x93\x02J\"9/products/v1beta/{parent=accounts/*}/productInputs:insert:\rproduct_input\x12\x86\x02\n\x12UpdateProductInput\x12\x43.google.shopping.merchant.products.v1beta.UpdateProductInputRequest\x1a\x36.google.shopping.merchant.products.v1beta.ProductInput\"s\xda\x41\x19product_input,update_mask\x82\xd3\xe4\x93\x02Q2@/products/v1beta/{product_input.name=accounts/*/productInputs/*}:\rproduct_input\x12\xb4\x01\n\x12\x44\x65leteProductInput\x12\x43.google.shopping.merchant.products.v1beta.DeleteProductInputRequest\x1a\x16.google.protobuf.Empty\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/products/v1beta/{name=accounts/*/productInputs/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x94\x01\n,com.google.shopping.merchant.products.v1betaB\x12ProductInputsProtoP\x01ZNcloud.google.com/go/shopping/merchant/products/apiv1beta/productspb;productspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Products - module V1beta - ProductInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductInput").msgclass - InsertProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.InsertProductInputRequest").msgclass - UpdateProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.UpdateProductInputRequest").msgclass - DeleteProductInputRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.DeleteProductInputRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_services_pb.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_services_pb.rb deleted file mode 100644 index 847efb1541c4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/productinputs_services_pb.rb +++ /dev/null @@ -1,68 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/products/v1beta/productinputs.proto for package 'google.shopping.merchant.products.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/products/v1beta/productinputs_pb' - -module Google - module Shopping - module Merchant - module Products - module V1beta - module ProductInputsService - # Service to use ProductInput resource. - # This service works for products with online channel only. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.products.v1beta.ProductInputsService' - - # [Uploads a product input to your Merchant Center - # account](/merchant/api/guides/products/overview#upload-product-input). You - # must have a products data source to be able to insert a product. The unique - # identifier of the data source is passed as a query parameter in the request - # URL. - # - # If an input with the same contentLanguage, offerId, and dataSource already - # exists, this method replaces that entry. - # - # After inserting, updating, or deleting a product input, it may take several - # minutes before the processed product can be retrieved. - rpc :InsertProductInput, ::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest, ::Google::Shopping::Merchant::Products::V1beta::ProductInput - # Updates the existing product input in your Merchant Center account. - # - # After inserting, updating, or deleting a product input, it may take several - # minutes before the processed product can be retrieved. - rpc :UpdateProductInput, ::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest, ::Google::Shopping::Merchant::Products::V1beta::ProductInput - # Deletes a product input from your Merchant Center account. - # - # After inserting, updating, or deleting a product input, it may take several - # minutes before the processed product can be retrieved. - rpc :DeleteProductInput, ::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_common_pb.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_common_pb.rb deleted file mode 100644 index 10f689189d70..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_common_pb.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/products/v1beta/products_common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' -require 'google/shopping/type/types_pb' -require 'google/type/interval_pb' - - -descriptor_data = "\n>google/shopping/merchant/products/v1beta/products_common.proto\x12(google.shopping.merchant.products.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/interval.proto\"\xe1(\n\nAttributes\x12\x1e\n\x11identifier_exists\x18\x04 \x01(\x08H\x00\x88\x01\x01\x12\x16\n\tis_bundle\x18\x05 \x01(\x08H\x01\x88\x01\x01\x12\x12\n\x05title\x18\x06 \x01(\tH\x02\x88\x01\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tH\x03\x88\x01\x01\x12\x11\n\x04link\x18\x08 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0bmobile_link\x18\t \x01(\tH\x05\x88\x01\x01\x12\x1b\n\x0e\x63\x61nonical_link\x18\n \x01(\tH\x06\x88\x01\x01\x12\x17\n\nimage_link\x18\x0b \x01(\tH\x07\x88\x01\x01\x12\x1e\n\x16\x61\x64\x64itional_image_links\x18\x0c \x03(\t\x12\x33\n\x0f\x65xpiration_date\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x64isclosure_date\x18O \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\x05\x61\x64ult\x18\x11 \x01(\x08H\x08\x88\x01\x01\x12\x16\n\tage_group\x18\x12 \x01(\tH\t\x88\x01\x01\x12\x19\n\x0c\x61vailability\x18\x13 \x01(\tH\n\x88\x01\x01\x12\x35\n\x11\x61vailability_date\x18\x14 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\x05\x62rand\x18\x15 \x01(\tH\x0b\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x16 \x01(\tH\x0c\x88\x01\x01\x12\x16\n\tcondition\x18\x17 \x01(\tH\r\x88\x01\x01\x12\x13\n\x06gender\x18\x18 \x01(\tH\x0e\x88\x01\x01\x12$\n\x17google_product_category\x18\x19 \x01(\tH\x0f\x88\x01\x01\x12\x10\n\x04gtin\x18\x1a \x03(\tB\x02\x18\x01\x12\x0e\n\x05gtins\x18\x8c\x01 \x03(\t\x12\x1a\n\ritem_group_id\x18\x1b \x01(\tH\x10\x88\x01\x01\x12\x15\n\x08material\x18\x1c \x01(\tH\x11\x88\x01\x01\x12\x10\n\x03mpn\x18\x1d \x01(\tH\x12\x88\x01\x01\x12\x14\n\x07pattern\x18\x1e \x01(\tH\x13\x88\x01\x01\x12*\n\x05price\x18\x1f \x01(\x0b\x32\x1b.google.shopping.type.Price\x12:\n\x14maximum_retail_price\x18\x8b\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12J\n\x0binstallment\x18 \x01(\x0b\x32\x35.google.shopping.merchant.products.v1beta.Installment\x12U\n\x11subscription_cost\x18! \x01(\x0b\x32:.google.shopping.merchant.products.v1beta.SubscriptionCost\x12O\n\x0eloyalty_points\x18\" \x01(\x0b\x32\x37.google.shopping.merchant.products.v1beta.LoyaltyPoints\x12S\n\x10loyalty_programs\x18\x88\x01 \x03(\x0b\x32\x38.google.shopping.merchant.products.v1beta.LoyaltyProgram\x12\x15\n\rproduct_types\x18# \x03(\t\x12/\n\nsale_price\x18$ \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x38\n\x19sale_price_effective_date\x18% \x01(\x0b\x32\x15.google.type.Interval\x12$\n\x17sell_on_google_quantity\x18& \x01(\x03H\x14\x88\x01\x01\x12R\n\x0eproduct_height\x18w \x01(\x0b\x32:.google.shopping.merchant.products.v1beta.ProductDimension\x12R\n\x0eproduct_length\x18x \x01(\x0b\x32:.google.shopping.merchant.products.v1beta.ProductDimension\x12Q\n\rproduct_width\x18y \x01(\x0b\x32:.google.shopping.merchant.products.v1beta.ProductDimension\x12O\n\x0eproduct_weight\x18z \x01(\x0b\x32\x37.google.shopping.merchant.products.v1beta.ProductWeight\x12\x44\n\x08shipping\x18\' \x03(\x0b\x32\x32.google.shopping.merchant.products.v1beta.Shipping\x12\x61\n\x17\x66ree_shipping_threshold\x18\x87\x01 \x03(\x0b\x32?.google.shopping.merchant.products.v1beta.FreeShippingThreshold\x12Q\n\x0fshipping_weight\x18( \x01(\x0b\x32\x38.google.shopping.merchant.products.v1beta.ShippingWeight\x12T\n\x0fshipping_length\x18) \x01(\x0b\x32;.google.shopping.merchant.products.v1beta.ShippingDimension\x12S\n\x0eshipping_width\x18* \x01(\x0b\x32;.google.shopping.merchant.products.v1beta.ShippingDimension\x12T\n\x0fshipping_height\x18+ \x01(\x0b\x32;.google.shopping.merchant.products.v1beta.ShippingDimension\x12\x1e\n\x11max_handling_time\x18, \x01(\x03H\x15\x88\x01\x01\x12\x1e\n\x11min_handling_time\x18- \x01(\x03H\x16\x88\x01\x01\x12\x1b\n\x0eshipping_label\x18. \x01(\tH\x17\x88\x01\x01\x12\x1f\n\x12transit_time_label\x18/ \x01(\tH\x18\x88\x01\x01\x12\x11\n\x04size\x18\x30 \x01(\tH\x19\x88\x01\x01\x12\x18\n\x0bsize_system\x18\x31 \x01(\tH\x1a\x88\x01\x01\x12\x12\n\nsize_types\x18\x32 \x03(\t\x12@\n\x05taxes\x18\x33 \x03(\x0b\x32-.google.shopping.merchant.products.v1beta.TaxB\x02\x18\x01\x12\x1d\n\x0ctax_category\x18\x34 \x01(\tB\x02\x18\x01H\x1b\x88\x01\x01\x12$\n\x17\x65nergy_efficiency_class\x18\x35 \x01(\tH\x1c\x88\x01\x01\x12(\n\x1bmin_energy_efficiency_class\x18\x36 \x01(\tH\x1d\x88\x01\x01\x12(\n\x1bmax_energy_efficiency_class\x18\x37 \x01(\tH\x1e\x88\x01\x01\x12Z\n\x14unit_pricing_measure\x18\x38 \x01(\x0b\x32<.google.shopping.merchant.products.v1beta.UnitPricingMeasure\x12\x63\n\x19unit_pricing_base_measure\x18\x39 \x01(\x0b\x32@.google.shopping.merchant.products.v1beta.UnitPricingBaseMeasure\x12\x16\n\tmultipack\x18: \x01(\x03H\x1f\x88\x01\x01\x12\x19\n\x0c\x61\x64s_grouping\x18; \x01(\tH \x88\x01\x01\x12\x12\n\nads_labels\x18< \x03(\t\x12\x19\n\x0c\x61\x64s_redirect\x18= \x01(\tH!\x88\x01\x01\x12\x37\n\x12\x63ost_of_goods_sold\x18> \x01(\x0b\x32\x1b.google.shopping.type.Price\x12P\n\x0fproduct_details\x18? \x03(\x0b\x32\x37.google.shopping.merchant.products.v1beta.ProductDetail\x12\x1a\n\x12product_highlights\x18@ \x03(\t\x12\x1b\n\x0e\x64isplay_ads_id\x18\x41 \x01(\tH\"\x88\x01\x01\x12\x1f\n\x17\x64isplay_ads_similar_ids\x18\x42 \x03(\t\x12\x1e\n\x11\x64isplay_ads_title\x18\x43 \x01(\tH#\x88\x01\x01\x12\x1d\n\x10\x64isplay_ads_link\x18\x44 \x01(\tH$\x88\x01\x01\x12\x1e\n\x11\x64isplay_ads_value\x18\x45 \x01(\x01H%\x88\x01\x01\x12\x15\n\rpromotion_ids\x18\x46 \x03(\t\x12\x1a\n\rpickup_method\x18P \x01(\tH&\x88\x01\x01\x12\x17\n\npickup_sla\x18Q \x01(\tH\'\x88\x01\x01\x12\x1a\n\rlink_template\x18R \x01(\tH(\x88\x01\x01\x12!\n\x14mobile_link_template\x18S \x01(\tH)\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_0\x18G \x01(\tH*\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_1\x18H \x01(\tH+\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_2\x18I \x01(\tH,\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_3\x18J \x01(\tH-\x88\x01\x01\x12\x1b\n\x0e\x63ustom_label_4\x18K \x01(\tH.\x88\x01\x01\x12\x1d\n\x15included_destinations\x18L \x03(\t\x12\x1d\n\x15\x65xcluded_destinations\x18M \x03(\t\x12\'\n\x1fshopping_ads_excluded_countries\x18N \x03(\t\x12\x1f\n\x12\x65xternal_seller_id\x18\x01 \x01(\tH/\x88\x01\x01\x12\x12\n\x05pause\x18\r \x01(\tH0\x88\x01\x01\x12\x1d\n\x15lifestyle_image_links\x18\x0e \x03(\t\x12u\n\"cloud_export_additional_properties\x18T \x03(\x0b\x32I.google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties\x12 \n\x12virtual_model_link\x18\x82\x01 \x01(\tH1\x88\x01\x01\x12O\n\x0e\x63\x65rtifications\x18{ \x03(\x0b\x32\x37.google.shopping.merchant.products.v1beta.Certification\x12`\n\x10structured_title\x18\x84\x01 \x01(\x0b\x32@.google.shopping.merchant.products.v1beta.ProductStructuredTitleH2\x88\x01\x01\x12l\n\x16structured_description\x18\x85\x01 \x01(\x0b\x32\x46.google.shopping.merchant.products.v1beta.ProductStructuredDescriptionH3\x88\x01\x01\x12;\n\x16\x61uto_pricing_min_price\x18| \x01(\x0b\x32\x1b.google.shopping.type.Price\x12l\n\x19sustainability_incentives\x18\x8a\x01 \x03(\x0b\x32H.google.shopping.merchant.products.v1beta.ProductSustainabilityIncentiveB\x14\n\x12_identifier_existsB\x0c\n\n_is_bundleB\x08\n\x06_titleB\x0e\n\x0c_descriptionB\x07\n\x05_linkB\x0e\n\x0c_mobile_linkB\x11\n\x0f_canonical_linkB\r\n\x0b_image_linkB\x08\n\x06_adultB\x0c\n\n_age_groupB\x0f\n\r_availabilityB\x08\n\x06_brandB\x08\n\x06_colorB\x0c\n\n_conditionB\t\n\x07_genderB\x1a\n\x18_google_product_categoryB\x10\n\x0e_item_group_idB\x0b\n\t_materialB\x06\n\x04_mpnB\n\n\x08_patternB\x1a\n\x18_sell_on_google_quantityB\x14\n\x12_max_handling_timeB\x14\n\x12_min_handling_timeB\x11\n\x0f_shipping_labelB\x15\n\x13_transit_time_labelB\x07\n\x05_sizeB\x0e\n\x0c_size_systemB\x0f\n\r_tax_categoryB\x1a\n\x18_energy_efficiency_classB\x1e\n\x1c_min_energy_efficiency_classB\x1e\n\x1c_max_energy_efficiency_classB\x0c\n\n_multipackB\x0f\n\r_ads_groupingB\x0f\n\r_ads_redirectB\x11\n\x0f_display_ads_idB\x14\n\x12_display_ads_titleB\x13\n\x11_display_ads_linkB\x14\n\x12_display_ads_valueB\x10\n\x0e_pickup_methodB\r\n\x0b_pickup_slaB\x10\n\x0e_link_templateB\x17\n\x15_mobile_link_templateB\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\x15\n\x13_external_seller_idB\x08\n\x06_pauseB\x15\n\x13_virtual_model_linkB\x13\n\x11_structured_titleB\x19\n\x17_structured_description\"p\n\x03Tax\x12\x0c\n\x04rate\x18\x01 \x01(\x01\x12\x0f\n\x07\x63ountry\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\t\x12\x10\n\x08tax_ship\x18\x04 \x01(\x08\x12\x13\n\x0blocation_id\x18\x05 \x01(\x03\x12\x13\n\x0bpostal_code\x18\x06 \x01(\t\"-\n\x0eShippingWeight\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"0\n\x11ShippingDimension\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"5\n\x16UnitPricingBaseMeasure\x12\r\n\x05value\x18\x01 \x01(\x03\x12\x0c\n\x04unit\x18\x02 \x01(\t\"1\n\x12UnitPricingMeasure\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x0c\n\x04unit\x18\x02 \x01(\t\"\xa4\x01\n\x10SubscriptionCost\x12L\n\x06period\x18\x01 \x01(\x0e\x32<.google.shopping.merchant.products.v1beta.SubscriptionPeriod\x12\x15\n\rperiod_length\x18\x02 \x01(\x03\x12+\n\x06\x61mount\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.Price\"\xbb\x01\n\x0bInstallment\x12\x0e\n\x06months\x18\x01 \x01(\x03\x12+\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x35\n\x0b\x64ownpayment\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x88\x01\x01\x12\x18\n\x0b\x63redit_type\x18\x04 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_downpaymentB\x0e\n\x0c_credit_type\"B\n\rLoyaltyPoints\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cpoints_value\x18\x02 \x01(\x03\x12\r\n\x05ratio\x18\x03 \x01(\x01\"\xc1\x03\n\x0eLoyaltyProgram\x12\x1a\n\rprogram_label\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ntier_label\x18\x02 \x01(\tH\x01\x88\x01\x01\x12/\n\x05price\x18\x03 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x02\x88\x01\x01\x12\x41\n\x17\x63\x61shback_for_future_use\x18\x04 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x03\x88\x01\x01\x12\x1b\n\x0eloyalty_points\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12?\n\x1bmember_price_effective_date\x18\x06 \x01(\x0b\x32\x15.google.type.IntervalH\x05\x88\x01\x01\x12\x1b\n\x0eshipping_label\x18\x07 \x01(\tH\x06\x88\x01\x01\x42\x10\n\x0e_program_labelB\r\n\x0b_tier_labelB\x08\n\x06_priceB\x1a\n\x18_cashback_for_future_useB\x11\n\x0f_loyalty_pointsB\x1e\n\x1c_member_price_effective_dateB\x11\n\x0f_shipping_label\"\x83\x03\n\x08Shipping\x12*\n\x05price\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x0f\n\x07\x63ountry\x18\x02 \x01(\t\x12\x0e\n\x06region\x18\x03 \x01(\t\x12\x0f\n\x07service\x18\x04 \x01(\t\x12\x13\n\x0blocation_id\x18\x05 \x01(\x03\x12\x1b\n\x13location_group_name\x18\x06 \x01(\t\x12\x13\n\x0bpostal_code\x18\x07 \x01(\t\x12\x1e\n\x11min_handling_time\x18\x08 \x01(\x03H\x00\x88\x01\x01\x12\x1e\n\x11max_handling_time\x18\t \x01(\x03H\x01\x88\x01\x01\x12\x1d\n\x10min_transit_time\x18\n \x01(\x03H\x02\x88\x01\x01\x12\x1d\n\x10max_transit_time\x18\x0b \x01(\x03H\x03\x88\x01\x01\x42\x14\n\x12_min_handling_timeB\x14\n\x12_max_handling_timeB\x13\n\x11_min_transit_timeB\x13\n\x11_max_transit_time\"\x88\x01\n\x15\x46reeShippingThreshold\x12\x14\n\x07\x63ountry\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x39\n\x0fprice_threshold\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x01\x88\x01\x01\x42\n\n\x08_countryB\x12\n\x10_price_threshold\"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\"\xfb\x01\n\rCertification\x12$\n\x17\x63\x65rtification_authority\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12\x63\x65rtification_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12\x63\x65rtification_code\x18\x03 \x01(\tH\x02\x88\x01\x01\x12 \n\x13\x63\x65rtification_value\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x1a\n\x18_certification_authorityB\x15\n\x13_certification_nameB\x15\n\x13_certification_codeB\x16\n\x14_certification_value\"t\n\x16ProductStructuredTitle\x12 \n\x13\x64igital_source_type\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x63ontent\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x16\n\x14_digital_source_typeB\n\n\x08_content\"z\n\x1cProductStructuredDescription\x12 \n\x13\x64igital_source_type\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07\x63ontent\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x16\n\x14_digital_source_typeB\n\n\x08_content\"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\"\xf7\x07\n\rProductStatus\x12g\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32I.google.shopping.merchant.products.v1beta.ProductStatus.DestinationStatus\x12\x61\n\x11item_level_issues\x18\x04 \x03(\x0b\x32\x46.google.shopping.merchant.products.v1beta.ProductStatus.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\xc1\x01\n\x11\x44\x65stinationStatus\x12V\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnum\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\xb0\x03\n\x0eItemLevelIssue\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x61\n\x08severity\x18\x02 \x01(\x0e\x32O.google.shopping.merchant.products.v1beta.ProductStatus.ItemLevelIssue.Severity\x12\x12\n\nresolution\x18\x03 \x01(\t\x12\x11\n\tattribute\x18\x04 \x01(\t\x12V\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnum\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\"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\"\xa5\x02\n\x1f\x43loudExportAdditionalProperties\x12\x1a\n\rproperty_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\ntext_value\x18\x02 \x03(\t\x12\x17\n\nbool_value\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12\x11\n\tint_value\x18\x04 \x03(\x03\x12\x13\n\x0b\x66loat_value\x18\x05 \x03(\x02\x12\x16\n\tmin_value\x18\x06 \x01(\x02H\x02\x88\x01\x01\x12\x16\n\tmax_value\x18\x07 \x01(\x02H\x03\x88\x01\x01\x12\x16\n\tunit_code\x18\x08 \x01(\tH\x04\x88\x01\x01\x42\x10\n\x0e_property_nameB\r\n\x0b_bool_valueB\x0c\n\n_min_valueB\x0c\n\n_max_valueB\x0c\n\n_unit_code\"\xa1\x02\n\x1eProductSustainabilityIncentive\x12-\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.PriceH\x00\x12\x14\n\npercentage\x18\x03 \x01(\x01H\x00\x12`\n\x04type\x18\x01 \x01(\x0e\x32M.google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.TypeH\x01\x88\x01\x01\"F\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rEV_TAX_CREDIT\x10\x01\x12\x15\n\x11\x45V_PRICE_DISCOUNT\x10\x02\x42\x07\n\x05valueB\x07\n\x05_type\"\xb4\x01\n\x12\x41utomatedDiscounts\x12\x30\n\x0bprior_price\x18\x01 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12<\n\x17prior_price_progressive\x18\x02 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12.\n\tgad_price\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\x95\x01\n,com.google.shopping.merchant.products.v1betaB\x13ProductsCommonProtoP\x01ZNcloud.google.com/go/shopping/merchant/products/apiv1beta/productspb;productspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Products - module V1beta - Attributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.Attributes").msgclass - Tax = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.Tax").msgclass - ShippingWeight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ShippingWeight").msgclass - ShippingDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ShippingDimension").msgclass - UnitPricingBaseMeasure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.UnitPricingBaseMeasure").msgclass - UnitPricingMeasure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.UnitPricingMeasure").msgclass - SubscriptionCost = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.SubscriptionCost").msgclass - Installment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.Installment").msgclass - LoyaltyPoints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.LoyaltyPoints").msgclass - LoyaltyProgram = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.LoyaltyProgram").msgclass - Shipping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.Shipping").msgclass - FreeShippingThreshold = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.FreeShippingThreshold").msgclass - ProductDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductDetail").msgclass - Certification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.Certification").msgclass - ProductStructuredTitle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductStructuredTitle").msgclass - ProductStructuredDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductStructuredDescription").msgclass - ProductDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductDimension").msgclass - ProductWeight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductWeight").msgclass - ProductStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductStatus").msgclass - ProductStatus::DestinationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductStatus.DestinationStatus").msgclass - ProductStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductStatus.ItemLevelIssue").msgclass - ProductStatus::ItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductStatus.ItemLevelIssue.Severity").enummodule - CloudExportAdditionalProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties").msgclass - ProductSustainabilityIncentive = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive").msgclass - ProductSustainabilityIncentive::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.Type").enummodule - AutomatedDiscounts = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.AutomatedDiscounts").msgclass - SubscriptionPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.SubscriptionPeriod").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_pb.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_pb.rb deleted file mode 100644 index e20488231365..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_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/products/v1beta/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/merchant/products/v1beta/products_common_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n7google/shopping/merchant/products/v1beta/products.proto\x12(google.shopping.merchant.products.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/merchant/products/v1beta/products_common.proto\x1a google/shopping/type/types.proto\"\x92\x05\n\x07Product\x12\x0c\n\x04name\x18\x01 \x01(\t\x12?\n\x07\x63hannel\x18\x02 \x01(\x0e\x32).google.shopping.type.Channel.ChannelEnumB\x03\xe0\x41\x03\x12\x15\n\x08offer_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63ontent_language\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nfeed_label\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x61ta_source\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12 \n\x0eversion_number\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12M\n\nattributes\x18\x08 \x01(\x0b\x32\x34.google.shopping.merchant.products.v1beta.AttributesB\x03\xe0\x41\x03\x12\x45\n\x11\x63ustom_attributes\x18\t \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x03\x12T\n\x0eproduct_status\x18\n \x01(\x0b\x32\x37.google.shopping.merchant.products.v1beta.ProductStatusB\x03\xe0\x41\x03\x12^\n\x13\x61utomated_discounts\x18\x0c \x01(\x0b\x32<.google.shopping.merchant.products.v1beta.AutomatedDiscountsB\x03\xe0\x41\x03:N\xea\x41K\n\"merchantapi.googleapis.com/Product\x12%accounts/{account}/products/{product}B\x11\n\x0f_version_number\"M\n\x11GetProductRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Product\"x\n\x13ListProductsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"merchantapi.googleapis.com/Product\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"t\n\x14ListProductsResponse\x12\x43\n\x08products\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.products.v1beta.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xe7\x03\n\x0fProductsService\x12\xba\x01\n\nGetProduct\x12;.google.shopping.merchant.products.v1beta.GetProductRequest\x1a\x31.google.shopping.merchant.products.v1beta.Product\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/products/v1beta/{name=accounts/*/products/*}\x12\xcd\x01\n\x0cListProducts\x12=.google.shopping.merchant.products.v1beta.ListProductsRequest\x1a>.google.shopping.merchant.products.v1beta.ListProductsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/products/v1beta/{parent=accounts/*}/products\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xca\x01\n,com.google.shopping.merchant.products.v1betaB\rProductsProtoP\x01ZNcloud.google.com/go/shopping/merchant/products/apiv1beta/productspb;productspb\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 Products - module V1beta - Product = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.Product").msgclass - GetProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.GetProductRequest").msgclass - ListProductsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ListProductsRequest").msgclass - ListProductsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1beta.ListProductsResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service.rb deleted file mode 100644 index 87f9782eaeef..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_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/products/v1beta/version" - -require "google/shopping/merchant/products/v1beta/products_service/credentials" -require "google/shopping/merchant/products/v1beta/products_service/paths" -require "google/shopping/merchant/products/v1beta/products_service/client" -require "google/shopping/merchant/products/v1beta/products_service/rest" - -module Google - module Shopping - module Merchant - module Products - module V1beta - ## - # Service to use Product resource. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/products/v1beta/products_service" - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/products/v1beta/products_service/rest" - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new - # - module ProductsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "products_service", "helpers.rb" -require "google/shopping/merchant/products/v1beta/products_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/client.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/client.rb deleted file mode 100644 index 9d628e10b9b8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/client.rb +++ /dev/null @@ -1,606 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/products/v1beta/products_pb" - -module Google - module Shopping - module Merchant - module Products - module V1beta - module ProductsService - ## - # Client for the ProductsService service. - # - # Service to use Product resource. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :products_service_stub - - ## - # Configure the ProductsService Client class. - # - # See {::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ProductsService clients - # ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.configure do |config| - # config.timeout = 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", "Products", "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 ProductsService Client instance. - # - # The configuration is set to the derived mode, meaning that values 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::Products::V1beta::ProductsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @products_service_stub.universe_domain - end - - ## - # Create a new ProductsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ProductsService 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/products/v1beta/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 - - @products_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @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 - @products_service_stub.logger - end - - # Service calls - - ## - # Retrieves the processed product from your Merchant 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_product(request, options = nil) - # Pass arguments to `get_product` via a request object, either of type - # {::Google::Shopping::Merchant::Products::V1beta::GetProductRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Products::V1beta::GetProductRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_product(name: nil) - # Pass arguments to `get_product` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the product to retrieve. - # Format: `accounts/{account}/products/{product}` - # where the last section `product` consists of 4 parts: - # `channel~content_language~feed_label~offer_id` - # example for product name is - # `accounts/123/products/online~en~US~sku123` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Products::V1beta::Product] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Products::V1beta::Product] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/products/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Products::V1beta::GetProductRequest.new - # - # # Call the get_product method. - # result = client.get_product request - # - # # The returned object is of type Google::Shopping::Merchant::Products::V1beta::Product. - # p result - # - def get_product request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1beta::GetProductRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_product.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Products::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_product.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_product.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @products_service_stub.call_rpc :get_product, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the processed products in your Merchant 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 product input, it may take several - # minutes before the updated processed product can be retrieved. - # - # @overload list_products(request, options = nil) - # Pass arguments to `list_products` via a request object, either of type - # {::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_products(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_products` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to list processed products for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # The maximum number of 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 products will be returned. - # @param page_token [::String] - # A page token, received from a previous `ListProducts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListProducts` 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::Products::V1beta::Product>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Products::V1beta::Product>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/products/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Products::V1beta::ListProductsRequest.new - # - # # Call the list_products method. - # result = client.list_products request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Products::V1beta::Product. - # p item - # end - # - def list_products request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_products.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Products::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_products.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_products.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @products_service_stub.call_rpc :list_products, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @products_service_stub, :list_products, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ProductsService API. - # - # This class represents the configuration for ProductsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_product to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_product.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_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::Merchant::Products::V1beta::ProductsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ProductsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_product` - # @return [::Gapic::Config::Method] - # - attr_reader :get_product - ## - # RPC-specific configuration for `list_products` - # @return [::Gapic::Config::Method] - # - attr_reader :list_products - - # @private - def initialize parent_rpcs = nil - get_product_config = parent_rpcs.get_product if parent_rpcs.respond_to? :get_product - @get_product = ::Gapic::Config::Method.new get_product_config - list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products - @list_products = ::Gapic::Config::Method.new list_products_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/credentials.rb deleted file mode 100644 index faeb5001f556..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_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 Products - module V1beta - module ProductsService - # Credentials for the ProductsService 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-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/paths.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/paths.rb deleted file mode 100644 index 4926d100d288..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_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 Products - module V1beta - module ProductsService - # Path helper methods for the ProductsService 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-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest.rb deleted file mode 100644 index f97202d7f457..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_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/products/v1beta/version" - -require "google/shopping/merchant/products/v1beta/products_service/credentials" -require "google/shopping/merchant/products/v1beta/products_service/paths" -require "google/shopping/merchant/products/v1beta/products_service/rest/client" - -module Google - module Shopping - module Merchant - module Products - module V1beta - ## - # Service to use Product resource. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/products/v1beta/products_service/rest" - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new - # - module ProductsService - # 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/products/v1beta/products_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/client.rb deleted file mode 100644 index 4f0b4b39a4f2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/client.rb +++ /dev/null @@ -1,549 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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/products/v1beta/products_pb" -require "google/shopping/merchant/products/v1beta/products_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Products - module V1beta - module ProductsService - module Rest - ## - # REST client for the ProductsService service. - # - # Service to use Product resource. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :products_service_stub - - ## - # Configure the ProductsService Client class. - # - # See {::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ProductsService clients - # ::Google::Shopping::Merchant::Products::V1beta::ProductsService::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", "Products", "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 ProductsService Client instance. - # - # The configuration is set to the derived mode, meaning that values 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::Products::V1beta::ProductsService::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 - @products_service_stub.universe_domain - end - - ## - # Create a new ProductsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ProductsService 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 - - @products_service_stub = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @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 - @products_service_stub.logger - end - - # Service calls - - ## - # Retrieves the processed product from your Merchant 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_product(request, options = nil) - # Pass arguments to `get_product` via a request object, either of type - # {::Google::Shopping::Merchant::Products::V1beta::GetProductRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Products::V1beta::GetProductRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_product(name: nil) - # Pass arguments to `get_product` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the product to retrieve. - # Format: `accounts/{account}/products/{product}` - # where the last section `product` consists of 4 parts: - # `channel~content_language~feed_label~offer_id` - # example for product name is - # `accounts/123/products/online~en~US~sku123` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Products::V1beta::Product] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Products::V1beta::Product] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/products/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Products::V1beta::GetProductRequest.new - # - # # Call the get_product method. - # result = client.get_product request - # - # # The returned object is of type Google::Shopping::Merchant::Products::V1beta::Product. - # p result - # - def get_product request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1beta::GetProductRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_product.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Products::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_product.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_product.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @products_service_stub.get_product request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the processed products in your Merchant 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 product input, it may take several - # minutes before the updated processed product can be retrieved. - # - # @overload list_products(request, options = nil) - # Pass arguments to `list_products` via a request object, either of type - # {::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_products(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_products` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The account to list processed products for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # The maximum number of 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 products will be returned. - # @param page_token [::String] - # A page token, received from a previous `ListProducts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListProducts` 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::Products::V1beta::Product>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Products::V1beta::Product>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/products/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Products::V1beta::ListProductsRequest.new - # - # # Call the list_products method. - # result = client.list_products request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Products::V1beta::Product. - # p item - # end - # - def list_products request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_products.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Products::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_products.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_products.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @products_service_stub.list_products request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @products_service_stub, :list_products, "products", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ProductsService REST API. - # - # This class represents the configuration for ProductsService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_product to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_product.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_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. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the ProductsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_product` - # @return [::Gapic::Config::Method] - # - attr_reader :get_product - ## - # RPC-specific configuration for `list_products` - # @return [::Gapic::Config::Method] - # - attr_reader :list_products - - # @private - def initialize parent_rpcs = nil - get_product_config = parent_rpcs.get_product if parent_rpcs.respond_to? :get_product - @get_product = ::Gapic::Config::Method.new get_product_config - list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products - @list_products = ::Gapic::Config::Method.new list_products_config - - 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-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/service_stub.rb deleted file mode 100644 index 5aba9aaa6400..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_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/products/v1beta/products_pb" - -module Google - module Shopping - module Merchant - module Products - module V1beta - module ProductsService - module Rest - ## - # REST service stub for the ProductsService 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_product REST call - # - # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::GetProductRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Products::V1beta::Product] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Products::V1beta::Product] - # A result object deserialized from the server's reply - def get_product request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_product_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_product", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Products::V1beta::Product.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_products REST call - # - # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Products::V1beta::ListProductsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Products::V1beta::ListProductsResponse] - # A result object deserialized from the server's reply - def list_products request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_products_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_products", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Products::V1beta::ListProductsResponse.decode_json response.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_product REST call - # - # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::GetProductRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_product_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/products/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_products REST call - # - # @param request_pb [::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_products_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/products/v1beta/{parent}/products", - 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-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_services_pb.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_services_pb.rb deleted file mode 100644 index 0d596b062d0b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_services_pb.rb +++ /dev/null @@ -1,57 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/products/v1beta/products.proto for package 'google.shopping.merchant.products.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/products/v1beta/products_pb' - -module Google - module Shopping - module Merchant - module Products - module V1beta - module ProductsService - # Service to use Product resource. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.products.v1beta.ProductsService' - - # Retrieves the processed product from your Merchant Center account. - # - # After inserting, updating, or deleting a product input, it may take several - # minutes before the updated final product can be retrieved. - rpc :GetProduct, ::Google::Shopping::Merchant::Products::V1beta::GetProductRequest, ::Google::Shopping::Merchant::Products::V1beta::Product - # Lists the processed products in your Merchant 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 product input, it may take several - # minutes before the updated processed product can be retrieved. - rpc :ListProducts, ::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest, ::Google::Shopping::Merchant::Products::V1beta::ListProductsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/rest.rb deleted file mode 100644 index f6dac740f63e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/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/products/v1beta/product_inputs_service/rest" -require "google/shopping/merchant/products/v1beta/products_service/rest" -require "google/shopping/merchant/products/v1beta/version" - -module Google - module Shopping - module Merchant - module Products - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/products/v1beta/rest" - # client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/version.rb deleted file mode 100644 index 2ec9a45fc313..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/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 Products - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/README.md deleted file mode 100644 index 03467a3756be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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. - # - # Note: This field should not be used in most cases. - 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. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # 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-products-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 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-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/productinputs.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/productinputs.rb deleted file mode 100644 index 8890f7c8a515..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/productinputs.rb +++ /dev/null @@ -1,213 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Products - module V1beta - # This resource represents input data you submit for a product, not the - # processed product that you see in Merchant Center, in Shopping ads, or - # across Google surfaces. Product inputs, rules and supplemental data source - # data are combined to create the processed - # {::Google::Shopping::Merchant::Products::V1beta::Product Product}. For more - # information, see [Manage products](/merchant/api/guides/products/overview). - # - # Required product input attributes to pass data validation checks are - # primarily defined in the [Products Data - # Specification](https://support.google.com/merchants/answer/188494). - # - # The following attributes are required: - # {::Google::Shopping::Merchant::Products::V1beta::Product#feed_label feedLabel}, - # {::Google::Shopping::Merchant::Products::V1beta::Product#content_language contentLanguage} - # and {::Google::Shopping::Merchant::Products::V1beta::Product#offer_id offerId}. - # - # After inserting, updating, or deleting a product input, it may take several - # minutes before the processed product can be retrieved. - # - # All fields in the product input and its sub-messages match the English name - # of their corresponding attribute in the [Products Data - # Specification](https://support.google.com/merchants/answer/188494) with - # [some exceptions](https://support.google.com/merchants/answer/7052112). - # The following reference documentation lists the field names in the - # **camelCase** casing style while the Products Data Specification lists the - # names in the **snake_case** casing style. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the product input. - # Format: `accounts/{account}/productInputs/{productinput}` - # where the last section `productinput` consists of 4 parts: - # `channel~content_language~feed_label~offer_id` - # example for product input name is - # `accounts/123/productInputs/online~en~US~sku123` - # @!attribute [r] product - # @return [::String] - # Output only. The name of the processed product. - # Format: `accounts/{account}/products/{product}` - # @!attribute [rw] channel - # @return [::Google::Shopping::Type::Channel::ChannelEnum] - # Immutable. The - # [channel](https://support.google.com/merchants/answer/7361332) of the - # product. - # @!attribute [rw] offer_id - # @return [::String] - # Required. Immutable. Your unique identifier for the product. This is the - # same for the product input and processed product. Leading and trailing - # whitespaces are stripped and multiple whitespaces are replaced by a single - # whitespace upon submission. See the [products data - # specification](https://support.google.com/merchants/answer/188494#id) for - # details. - # @!attribute [rw] content_language - # @return [::String] - # Required. Immutable. The two-letter [ISO - # 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the - # product. - # @!attribute [rw] feed_label - # @return [::String] - # Required. Immutable. The label that lets you categorize and identify your - # products. The maximum allowed characters are 20, and the supported - # characters are `A-Z`, `0-9`, hyphen, and underscore. The feed label must - # not include any spaces. For more information, see [Using feed - # labels](//support.google.com/merchants/answer/14994087). - # @!attribute [rw] version_number - # @return [::Integer] - # Optional. Immutable. Represents the existing version (freshness) of the - # product, which can be used to preserve the right order when multiple - # updates are done at the same time. - # - # If set, the insertion is prevented when version number is lower than - # the current version number of the existing product. Re-insertion (for - # example, product refresh after 30 days) can be performed with the current - # `version_number`. - # - # Only supported for insertions into primary data sources. - # Do not set this field for updates. - # Do not set this field for insertions into supplemental data sources. - # - # If the operation is prevented, the aborted exception will be - # thrown. - # @!attribute [rw] attributes - # @return [::Google::Shopping::Merchant::Products::V1beta::Attributes] - # Optional. A list of product attributes. - # @!attribute [rw] custom_attributes - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Optional. A list of custom (merchant-provided) attributes. It can also be - # used for submitting any attribute of the data specification in its generic - # form (for example, - # `{ "name": "size type", "value": "regular" }`). - # This is useful for submitting attributes not explicitly exposed by the - # API. - # Maximum allowed number of characters for each - # custom attribute is 10240 (represents sum of characters for name and - # value). Maximum 2500 custom attributes can be set per product, with total - # size of 102.4kB. Underscores in custom attribute names are replaced by - # spaces upon insertion. - class ProductInput - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the InsertProductInput method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account where this product will be inserted. - # Format: `accounts/{account}` - # @!attribute [rw] product_input - # @return [::Google::Shopping::Merchant::Products::V1beta::ProductInput] - # Required. The product input to insert. - # @!attribute [rw] data_source - # @return [::String] - # Required. The primary or supplemental product data source name. If the - # product already exists and data source provided is different, then the - # product will be moved to a new data source. For more information, see - # [Overview of Data sources - # sub-API](/merchant/api/guides/data-sources/overview). - # - # Only API data sources are supported. - # - # Format: `accounts/{account}/dataSources/{datasource}`. For example, - # `accounts/123456/dataSources/104628`. - class InsertProductInputRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the UpdateProductInput method. - # The product (primary input) must exist for the update to succeed. - # If the update is for a primary product input, the existing primary product - # input must be from the same data source. - # @!attribute [rw] product_input - # @return [::Google::Shopping::Merchant::Products::V1beta::ProductInput] - # Required. The product input resource to update. Information you submit will - # be applied to the processed product as well. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of 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 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 product replacement is not supported. - # @!attribute [rw] data_source - # @return [::String] - # Required. The primary or supplemental product data source where - # `data_source` name identifies the product input to be updated. - # - # Only API data sources are supported. - # - # Format: `accounts/{account}/dataSources/{datasource}`. For example, - # `accounts/123456/dataSources/104628`. - class UpdateProductInputRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteProductInput method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the product input resource to delete. - # Format: `accounts/{account}/productInputs/{product}` - # where the last section `product` consists of 4 parts: - # `channel~content_language~feed_label~offer_id` - # example for product name is - # `accounts/123/productInputs/online~en~US~sku123`. - # @!attribute [rw] data_source - # @return [::String] - # Required. The primary or supplemental data source from which the product - # input should be deleted. Format: - # `accounts/{account}/dataSources/{datasource}`. For example, - # `accounts/123456/dataSources/104628`. - class DeleteProductInputRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products.rb deleted file mode 100644 index b4d830bc43e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products.rb +++ /dev/null @@ -1,166 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Products - module V1beta - # The processed product, built from multiple [product - # inputs][google.shopping.merchant.products.v1main.ProductInput] - # after applying rules and supplemental data sources. This processed product - # matches what is shown in your Merchant Center account. Each product is built - # from exactly one primary data source product input, and multiple supplemental - # data source inputs. After inserting, updating, or deleting a product input, - # it may take several minutes before the updated processed product can be - # retrieved. - # - # All fields in the processed product and its sub-messages match the name of - # their corresponding attribute in the [Product data - # specification](https://support.google.com/merchants/answer/7052112) with some - # exceptions. - # @!attribute [rw] name - # @return [::String] - # The name of the product. - # Format: - # `accounts/{account}/products/{product}` where the last - # section `product` consists of 4 parts: - # `channel~content_language~feed_label~offer_id` - # example for product name is `accounts/123/products/online~en~US~sku123` - # @!attribute [r] channel - # @return [::Google::Shopping::Type::Channel::ChannelEnum] - # Output only. The - # [channel](https://support.google.com/merchants/answer/7361332) of the - # product. - # @!attribute [r] offer_id - # @return [::String] - # Output only. Your unique identifier for the product. This is the same for - # the product input and processed product. Leading and trailing whitespaces - # are stripped and multiple whitespaces are replaced by a single whitespace - # upon submission. See the [product data - # specification](https://support.google.com/merchants/answer/188494#id) for - # details. - # @!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 lets you categorize and identify your products. - # The maximum allowed characters is 20 and the supported characters are`A-Z`, - # `0-9`, hyphen and underscore. The feed label must not include any spaces. - # For more information, see [Using feed - # labels](//support.google.com/merchants/answer/14994087) - # @!attribute [r] data_source - # @return [::String] - # Output only. The primary data source of the product. - # @!attribute [r] version_number - # @return [::Integer] - # Output only. Represents the existing version (freshness) of the product, - # which can be used to preserve the right order when multiple updates are - # done at the same time. - # - # If set, the insertion is prevented when version number is lower than - # the current version number of the existing product. Re-insertion (for - # example, product refresh after 30 days) can be performed with the current - # `version_number`. - # - # Only supported for insertions into primary data sources. - # - # If the operation is prevented, the aborted exception will be - # thrown. - # @!attribute [r] attributes - # @return [::Google::Shopping::Merchant::Products::V1beta::Attributes] - # Output only. A list of product attributes. - # @!attribute [r] custom_attributes - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Output only. A list of custom (merchant-provided) attributes. It can also - # be used to submit any attribute of the data 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] product_status - # @return [::Google::Shopping::Merchant::Products::V1beta::ProductStatus] - # Output only. The status of a product, data validation issues, that is, - # information about a product computed asynchronously. - # @!attribute [r] automated_discounts - # @return [::Google::Shopping::Merchant::Products::V1beta::AutomatedDiscounts] - # Output only. The automated discounts information for the product. - class Product - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the GetProduct method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the product to retrieve. - # Format: `accounts/{account}/products/{product}` - # where the last section `product` consists of 4 parts: - # `channel~content_language~feed_label~offer_id` - # example for product name is - # `accounts/123/products/online~en~US~sku123` - class GetProductRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListProducts method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to list processed products for. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of 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 products will be returned. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListProducts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListProducts` must - # match the call that provided the page token. - class ListProductsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListProducts method. - # @!attribute [rw] products - # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::Product>] - # The processed products from the specified account. These are your processed - # products after applying rules and supplemental data sources. - # @!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 ListProductsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products_common.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products_common.rb deleted file mode 100644 index 3328f31f3069..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/merchant/products/v1beta/products_common.rb +++ /dev/null @@ -1,1029 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Products - module V1beta - # Attributes. - # @!attribute [rw] identifier_exists - # @return [::Boolean] - # Set this value to false when the item does not have unique product - # identifiers appropriate to its category, such as GTIN, MPN, and brand. - # Defaults to true, if not provided. - # @!attribute [rw] is_bundle - # @return [::Boolean] - # Whether the item is a business-defined sub-API. A [sub-API] - # (https://support.google.com/merchants/answer/6324449) is a custom - # grouping of different products sold by a business for a single price. - # @!attribute [rw] title - # @return [::String] - # Title of the item. - # @!attribute [rw] description - # @return [::String] - # Description of the item. - # @!attribute [rw] link - # @return [::String] - # URL directly linking to your item's page on your online store. - # @!attribute [rw] mobile_link - # @return [::String] - # URL for the mobile-optimized version of your item's landing page. - # @!attribute [rw] canonical_link - # @return [::String] - # URL for the canonical version of your item's landing page. - # @!attribute [rw] image_link - # @return [::String] - # URL of an image of the item. - # @!attribute [rw] additional_image_links - # @return [::Array<::String>] - # Additional URLs of images of the item. - # @!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. - # @!attribute [rw] disclosure_date - # @return [::Google::Protobuf::Timestamp] - # The date time when an offer becomes visible in search results across - # Google’s YouTube surfaces, in [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. - # See [Disclosure date](https://support.google.com/merchants/answer/13034208) - # for more information. - # @!attribute [rw] adult - # @return [::Boolean] - # Set to true if the item is targeted towards adults. - # @!attribute [rw] age_group - # @return [::String] - # Target [age group](https://support.google.com/merchants/answer/6324463) of - # the item. - # @!attribute [rw] availability - # @return [::String] - # [Availability](https://support.google.com/merchants/answer/6324448) status - # of the item. For example, "in_stock" or "out_of_stock". - # @!attribute [rw] availability_date - # @return [::Google::Protobuf::Timestamp] - # The day a pre-ordered product becomes available for delivery, in [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. - # @!attribute [rw] brand - # @return [::String] - # [Brand](https://support.google.com/merchants/answer/6324351) of the item. - # For example, "Google". - # @!attribute [rw] color - # @return [::String] - # [Color](https://support.google.com/merchants/answer/6324487) of the item. - # For example, "red". - # @!attribute [rw] condition - # @return [::String] - # [Condition](https://support.google.com/merchants/answer/6324469) or state - # of the item. For example, "new" or "used". - # @!attribute [rw] gender - # @return [::String] - # Target [gender](https://support.google.com/merchants/answer/6324479) of the - # item. For example, "male" or "female". - # @!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] gtin - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Array<::String>] - # Global Trade Item Numbers - # ([GTIN](https://support.google.com/merchants/answer/188494#gtin)) of the - # item. - # You can provide up to 10 GTINs. - # - # Deprecated: Use `gtins` instead. - # @!attribute [rw] gtins - # @return [::Array<::String>] - # Global Trade Item Numbers - # ([GTIN](https://support.google.com/merchants/answer/188494#gtin)) of the - # item. - # You can provide up to 10 GTINs. - # @!attribute [rw] item_group_id - # @return [::String] - # Shared identifier for all variants of the same product. - # @!attribute [rw] material - # @return [::String] - # The [material](https://support.google.com/merchants/answer/6324410) of - # which the item is made. For example, "Leather" or "Cotton". - # @!attribute [rw] mpn - # @return [::String] - # Manufacturer Part Number - # ([MPN](https://support.google.com/merchants/answer/188494#mpn)) of the - # item. - # @!attribute [rw] pattern - # @return [::String] - # The item's [pattern](https://support.google.com/merchants/answer/6324483). - # For example, polka dots. - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Price of the item. - # @!attribute [rw] maximum_retail_price - # @return [::Google::Shopping::Type::Price] - # Maximum retail price (MRP) of the item. Applicable to India only. - # @!attribute [rw] installment - # @return [::Google::Shopping::Merchant::Products::V1beta::Installment] - # Number and amount of installments to pay for an item. - # @!attribute [rw] subscription_cost - # @return [::Google::Shopping::Merchant::Products::V1beta::SubscriptionCost] - # Number of periods (months or years) and amount of payment per period - # for an item with an associated subscription contract. - # @!attribute [rw] loyalty_points - # @return [::Google::Shopping::Merchant::Products::V1beta::LoyaltyPoints] - # Loyalty points that users receive after purchasing the item. Japan only. - # @!attribute [rw] loyalty_programs - # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::LoyaltyProgram>] - # A list of loyalty program information that is used to surface loyalty - # benefits (for example, better pricing, points, etc) to the user of this - # item. - # @!attribute [rw] product_types - # @return [::Array<::String>] - # Categories of the item (formatted as in [product data - # specification](https://support.google.com/merchants/answer/7052112#product_category)). - # @!attribute [rw] sale_price - # @return [::Google::Shopping::Type::Price] - # Advertised sale price of the item. - # @!attribute [rw] sale_price_effective_date - # @return [::Google::Type::Interval] - # Date range during which the item is on sale, see [product data - # specification](https://support.google.com/merchants/answer/7052112#price_and_availability). - # @!attribute [rw] sell_on_google_quantity - # @return [::Integer] - # The quantity of the product that is available for selling on Google. - # Supported only for online products. - # @!attribute [rw] product_height - # @return [::Google::Shopping::Merchant::Products::V1beta::ProductDimension] - # The height of the product in the units provided. The value must be - # between - # 0 (exclusive) and 3000 (inclusive). - # @!attribute [rw] product_length - # @return [::Google::Shopping::Merchant::Products::V1beta::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::Merchant::Products::V1beta::ProductDimension] - # The width of the product in the units provided. The value must be between - # 0 (exclusive) and 3000 (inclusive). - # @!attribute [rw] product_weight - # @return [::Google::Shopping::Merchant::Products::V1beta::ProductWeight] - # The weight of the product in the units provided. The value must be - # between 0 (exclusive) and 2000 (inclusive). - # @!attribute [rw] shipping - # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::Shipping>] - # Shipping rules. - # @!attribute [rw] free_shipping_threshold - # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::FreeShippingThreshold>] - # Conditions to be met for a product to have free shipping. - # @!attribute [rw] shipping_weight - # @return [::Google::Shopping::Merchant::Products::V1beta::ShippingWeight] - # Weight of the item for shipping. - # @!attribute [rw] shipping_length - # @return [::Google::Shopping::Merchant::Products::V1beta::ShippingDimension] - # Length of the item for shipping. - # @!attribute [rw] shipping_width - # @return [::Google::Shopping::Merchant::Products::V1beta::ShippingDimension] - # Width of the item for shipping. - # @!attribute [rw] shipping_height - # @return [::Google::Shopping::Merchant::Products::V1beta::ShippingDimension] - # Height of the item for shipping. - # @!attribute [rw] max_handling_time - # @return [::Integer] - # Maximal product handling time (in business days). - # @!attribute [rw] min_handling_time - # @return [::Integer] - # Minimal product handling time (in business days). - # @!attribute [rw] shipping_label - # @return [::String] - # The shipping label of the product, used to group product in account-level - # shipping rules. - # @!attribute [rw] transit_time_label - # @return [::String] - # The transit time label of the product, used to group product in - # account-level transit time tables. - # @!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 - # [Size](https://support.google.com/merchants/answer/6324492). - # @!attribute [rw] size_system - # @return [::String] - # System in which the size is specified. Recommended for apparel items. - # For example, "US", "UK", "DE". - # For more information, see - # [Size system](https://support.google.com/merchants/answer/6324502). - # @!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). - # For example, "petite", "plus size". - # @!attribute [rw] taxes - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::Tax>] - # Tax information. - # @!attribute [rw] tax_category - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # The [tax category](https://support.google.com/merchants/answer/7569847) of - # the product. - # @!attribute [rw] energy_efficiency_class - # @return [::String] - # The energy efficiency class as defined in EU directive 2010/30/EU. - # @!attribute [rw] min_energy_efficiency_class - # @return [::String] - # The energy efficiency class as defined in EU directive 2010/30/EU. - # @!attribute [rw] max_energy_efficiency_class - # @return [::String] - # The energy efficiency class as defined in EU directive 2010/30/EU. - # @!attribute [rw] unit_pricing_measure - # @return [::Google::Shopping::Merchant::Products::V1beta::UnitPricingMeasure] - # The measure and dimension of an item. - # @!attribute [rw] unit_pricing_base_measure - # @return [::Google::Shopping::Merchant::Products::V1beta::UnitPricingBaseMeasure] - # The preference of the denominator of the unit price. - # @!attribute [rw] multipack - # @return [::Integer] - # The number of identical products in a business-defined multipack. - # @!attribute [rw] ads_grouping - # @return [::String] - # Used to group items in an arbitrary way. Only for CPA%, discouraged - # otherwise. For more information, see - # [Display ads - # attribute](https://support.google.com/merchants/answer/6069387). - # @!attribute [rw] ads_labels - # @return [::Array<::String>] - # Similar to ads_grouping, but only works on CPC. - # @!attribute [rw] ads_redirect - # @return [::String] - # Allows advertisers to override the item URL when the product is shown - # within the context of Product ads. - # @!attribute [rw] cost_of_goods_sold - # @return [::Google::Shopping::Type::Price] - # Cost of goods sold. Used for gross profit reporting. - # @!attribute [rw] product_details - # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::ProductDetail>] - # Technical specification or additional product details. - # @!attribute [rw] product_highlights - # @return [::Array<::String>] - # Bullet points describing the most relevant [product - # highlights](https://support.google.com/merchants/answer/9216100). - # @!attribute [rw] display_ads_id - # @return [::String] - # An identifier for an item for dynamic remarketing campaigns. - # @!attribute [rw] display_ads_similar_ids - # @return [::Array<::String>] - # Advertiser-specified recommendations. For more information, see - # [Display ads attribute - # specification](https://support.google.com/merchants/answer/6069387). - # @!attribute [rw] display_ads_title - # @return [::String] - # Title of an item for dynamic remarketing campaigns. - # @!attribute [rw] display_ads_link - # @return [::String] - # URL directly to your item's landing page for dynamic remarketing - # campaigns. - # @!attribute [rw] display_ads_value - # @return [::Float] - # Offer margin for dynamic remarketing campaigns. For more information, see - # [Display ads - # attribute](https://support.google.com/merchants/answer/6069387). - # @!attribute [rw] promotion_ids - # @return [::Array<::String>] - # The unique ID of a promotion. - # @!attribute [rw] pickup_method - # @return [::String] - # The [pickup](https://support.google.com/merchants/answer/14634021) option - # for the item. - # @!attribute [rw] pickup_sla - # @return [::String] - # Item store pickup timeline. For more information, see - # [Pickup SLA](https://support.google.com/merchants/answer/14635400). - # @!attribute [rw] link_template - # @return [::String] - # [Link template](https://support.google.com/merchants/answer/13871172) for - # business hosted local storefront. - # @!attribute [rw] mobile_link_template - # @return [::String] - # [Link template](https://support.google.com/merchants/answer/13870216) for - # business hosted local storefront optimized for mobile - # devices. - # @!attribute [rw] custom_label_0 - # @return [::String] - # [Custom label 0](https://support.google.com/merchants/answer/6324473) for - # custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_1 - # @return [::String] - # [Custom label 1](https://support.google.com/merchants/answer/6324473) - # for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_2 - # @return [::String] - # [Custom label 2](https://support.google.com/merchants/answer/6324473) - # for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_3 - # @return [::String] - # [Custom label 3](https://support.google.com/merchants/answer/6324473) - # for custom grouping of items in a Shopping campaign. - # @!attribute [rw] custom_label_4 - # @return [::String] - # [Custom label 4](https://support.google.com/merchants/answer/6324473) for - # custom grouping of items in a Shopping campaign. - # @!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`. - # - # For more information, see - # [Included - # destination](https://support.google.com/merchants/answer/7501026). - # - # Note: We recommend setting destinations on datasources level for most use - # cases. Use this field within products to only setup exceptions. - # @!attribute [rw] excluded_destinations - # @return [::Array<::String>] - # The list of destinations to exclude for this target (corresponds to - # unchecked check boxes in Merchant Center). - # - # For more information, see - # [Excluded - # destination](https://support.google.com/merchants/answer/6324486). - # - # Note: We recommend setting destinations on datasources level for most use - # cases. Use this field within products to only setup exceptions. - # @!attribute [rw] shopping_ads_excluded_countries - # @return [::Array<::String>] - # List of country codes [(ISO 3166-1 - # alpha-2)](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) to exclude the - # offer from Shopping Ads destination. Countries from this list are removed - # from countries configured in data source settings. - # @!attribute [rw] external_seller_id - # @return [::String] - # Required for multi-seller accounts. Use this attribute if you're a - # marketplace uploading products for various sellers to your multi-seller - # account. - # @!attribute [rw] pause - # @return [::String] - # Publication of this item will be temporarily - # [paused](https://support.google.com/merchants/answer/11909930). - # @!attribute [rw] lifestyle_image_links - # @return [::Array<::String>] - # Additional URLs of lifestyle images of the item, used to explicitly - # identify images that showcase your item in a real-world context. See the - # [Help Center article](https://support.google.com/merchants/answer/9103186) - # for more information. - # @!attribute [rw] cloud_export_additional_properties - # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::CloudExportAdditionalProperties>] - # Extra fields to export to the Cloud Retail program. - # @!attribute [rw] virtual_model_link - # @return [::String] - # URL of the 3D image of the item. See the - # [Help Center article](https://support.google.com/merchants/answer/13674896) - # for more information. - # @!attribute [rw] certifications - # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::Certification>] - # Product Certifications, for example for energy efficiency labeling of - # products recorded in the [EU EPREL](https://eprel.ec.europa.eu/screen/home) - # database. See the [Help - # Center](https://support.google.com/merchants/answer/13528839) - # article for more information. - # @!attribute [rw] structured_title - # @return [::Google::Shopping::Merchant::Products::V1beta::ProductStructuredTitle] - # Structured title, for algorithmically (AI)-generated titles. - # @!attribute [rw] structured_description - # @return [::Google::Shopping::Merchant::Products::V1beta::ProductStructuredDescription] - # Structured description, for algorithmically (AI)-generated descriptions. - # @!attribute [rw] auto_pricing_min_price - # @return [::Google::Shopping::Type::Price] - # A safeguard in the [automated discounts] - # (https://support.google.com/merchants/answer/10295759) and - # "Dynamic Promotions" - # (https://support.google.com/merchants/answer/13949249) projects, - # ensuring that discounts on business offers do not fall below this value, - # thereby preserving the offer's value and profitability. - # @!attribute [rw] sustainability_incentives - # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::ProductSustainabilityIncentive>] - # The list of sustainability incentive programs. - class Attributes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Tax of the product. - # @!attribute [rw] rate - # @return [::Float] - # The percentage of tax rate that applies to the item price. - # @!attribute [rw] country - # @return [::String] - # The country within which the item is taxed, specified as a [CLDR - # territory - # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml). - # @!attribute [rw] region - # @return [::String] - # The geographic region to which the tax rate applies. - # @!attribute [rw] tax_ship - # @return [::Boolean] - # Set to true if tax is charged on shipping. - # @!attribute [rw] location_id - # @return [::Integer] - # The numeric ID of a location that the tax rate applies to as defined in - # the [AdWords - # API](https://developers.google.com/adwords/api/docs/appendix/geotargeting). - # @!attribute [rw] postal_code - # @return [::String] - # The postal code range that the tax rate applies to, represented by - # a ZIP code, a ZIP code prefix using * wildcard, a range between two ZIP - # codes or two ZIP code prefixes of equal length. - # Examples: 94114, 94*, 94002-95460, 94*-95*. - class Tax - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The ShippingWeight of the product. - # @!attribute [rw] value - # @return [::Float] - # The weight of the product used to calculate the shipping cost of the - # item. - # @!attribute [rw] unit - # @return [::String] - # The unit of value. - class ShippingWeight - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The ShippingDimension of the product. - # @!attribute [rw] value - # @return [::Float] - # The dimension of the product used to calculate the shipping cost of the - # item. - # @!attribute [rw] unit - # @return [::String] - # The unit of value. - class ShippingDimension - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The UnitPricingBaseMeasure of the product. - # @!attribute [rw] value - # @return [::Integer] - # The denominator of the unit price. - # @!attribute [rw] unit - # @return [::String] - # The unit of the denominator. - class UnitPricingBaseMeasure - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The UnitPricingMeasure of the product. - # @!attribute [rw] value - # @return [::Float] - # The measure of an item. - # @!attribute [rw] unit - # @return [::String] - # The unit of the measure. - class UnitPricingMeasure - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The SubscriptionCost of the product. - # @!attribute [rw] period - # @return [::Google::Shopping::Merchant::Products::V1beta::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 SubscriptionCost - 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. - # @!attribute [rw] credit_type - # @return [::String] - # Type of installment payments. - # Supported values are: - # * "`finance`" - # * "`lease`" - class Installment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents loyalty points. - # @!attribute [rw] name - # @return [::String] - # Name of loyalty points program. It is recommended to limit the name to - # 12 full-width characters or 24 Roman characters. - # @!attribute [rw] points_value - # @return [::Integer] - # The retailer's loyalty points in absolute value. - # @!attribute [rw] ratio - # @return [::Float] - # The ratio of a point when converted to currency. Google assumes currency - # based on Merchant Center settings. If ratio is left out, it defaults to - # 1.0. - class LoyaltyPoints - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message that represents loyalty program. - # @!attribute [rw] program_label - # @return [::String] - # The label of the loyalty program. This is an internal label that uniquely - # identifies the relationship between a business entity and a loyalty - # program entity. The label must be provided so that the system can associate - # the assets below (for example, price and points) with a business. The - # corresponding program must be linked to the Merchant Center account. - # @!attribute [rw] tier_label - # @return [::String] - # The label of the tier within the loyalty program. - # Must match one of the labels within the program. - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # The price for members of the given tier, that is, the instant discount - # price. Must be smaller or equal to the regular price. - # @!attribute [rw] cashback_for_future_use - # @return [::Google::Shopping::Type::Price] - # The cashback that can be used for future purchases. - # @!attribute [rw] loyalty_points - # @return [::Integer] - # The amount of loyalty points earned on a purchase. - # @!attribute [rw] member_price_effective_date - # @return [::Google::Type::Interval] - # A date range during which the item is eligible for member price. If not - # specified, the member price is always applicable. The date range is - # represented by a pair of ISO 8601 dates separated by a space, - # comma, or slash. - # @!attribute [rw] shipping_label - # @return [::String] - # The label of the shipping benefit. If the field has value, this offer has - # loyalty shipping benefit. If the field value isn't provided, the item is - # not eligible for loyalty shipping for the given loyalty tier. - class LoyaltyProgram - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Shipping of the product. - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Fixed shipping price, represented as a number. - # @!attribute [rw] country - # @return [::String] - # The [CLDR territory - # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - # of the country to which an item will ship. - # @!attribute [rw] region - # @return [::String] - # The geographic region to which a shipping rate applies. - # See [region](https://support.google.com/merchants/answer/6324484) for more - # information. - # @!attribute [rw] service - # @return [::String] - # A free-form description of the service class or delivery speed. - # @!attribute [rw] location_id - # @return [::Integer] - # The numeric ID of a location that the shipping rate applies to as - # defined in the [AdWords - # API](https://developers.google.com/adwords/api/docs/appendix/geotargeting). - # @!attribute [rw] location_group_name - # @return [::String] - # The location where the shipping is applicable, represented by a - # location group name. - # @!attribute [rw] postal_code - # @return [::String] - # The postal code range that the shipping rate applies to, represented by - # a postal code, a postal code prefix followed by a * wildcard, a range - # between two postal codes or two postal code prefixes of equal length. - # @!attribute [rw] min_handling_time - # @return [::Integer] - # Minimum handling time (inclusive) between when the order is received and - # shipped in business days. 0 means that the order is shipped on the same - # day as it is received if it happens before the cut-off time. - # {::Google::Shopping::Merchant::Products::V1beta::Shipping#min_handling_time minHandlingTime} - # can only be present together with - # {::Google::Shopping::Merchant::Products::V1beta::Shipping#max_handling_time maxHandlingTime}; - # but it is not required if - # {::Google::Shopping::Merchant::Products::V1beta::Shipping#max_handling_time maxHandlingTime} - # is present. - # @!attribute [rw] max_handling_time - # @return [::Integer] - # Maximum handling time (inclusive) between when the order is received and - # shipped in business days. 0 means that the order is shipped on the same - # day as it is received if it happens before the cut-off time. Both - # {::Google::Shopping::Merchant::Products::V1beta::Shipping#max_handling_time maxHandlingTime} - # and - # {::Google::Shopping::Merchant::Products::V1beta::Shipping#max_transit_time maxTransitTime} - # are required if providing shipping speeds. - # {::Google::Shopping::Merchant::Products::V1beta::Shipping#min_handling_time minHandlingTime} - # is optional if - # {::Google::Shopping::Merchant::Products::V1beta::Shipping#max_handling_time maxHandlingTime} - # is present. - # @!attribute [rw] min_transit_time - # @return [::Integer] - # Minimum transit time (inclusive) between when the order has shipped and - # when it is delivered in business days. 0 means that the order is - # delivered on the same day as it ships. - # {::Google::Shopping::Merchant::Products::V1beta::Shipping#min_transit_time minTransitTime} - # can only be present together with - # {::Google::Shopping::Merchant::Products::V1beta::Shipping#max_transit_time maxTransitTime}; - # but it is not required if - # {::Google::Shopping::Merchant::Products::V1beta::Shipping#max_transit_time maxTransitTime} - # is present. - # @!attribute [rw] max_transit_time - # @return [::Integer] - # Maximum transit time (inclusive) between when the order has shipped and - # when it is delivered in business days. 0 means that the order is - # delivered on the same day as it ships. Both - # {::Google::Shopping::Merchant::Products::V1beta::Shipping#max_handling_time maxHandlingTime} - # and - # {::Google::Shopping::Merchant::Products::V1beta::Shipping#max_transit_time maxTransitTime} - # are required if providing shipping speeds. - # {::Google::Shopping::Merchant::Products::V1beta::Shipping#min_transit_time minTransitTime} - # is optional if - # {::Google::Shopping::Merchant::Products::V1beta::Shipping#max_transit_time maxTransitTime} - # is present. - class Shipping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Conditions to be met for a product to have free shipping. - # @!attribute [rw] country - # @return [::String] - # The [CLDR territory - # code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) - # of the country to which an item will ship. - # @!attribute [rw] price_threshold - # @return [::Google::Shopping::Type::Price] - # The minimum product price for the shipping cost to become free. Represented - # as a number. - class FreeShippingThreshold - 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 - - # Product - # [certification](https://support.google.com/merchants/answer/13528839), - # initially introduced for EU energy efficiency labeling compliance using the - # EU EPREL database. - # @!attribute [rw] certification_authority - # @return [::String] - # The certification authority, for example "European_Commission". - # Maximum length is 2000 characters. - # @!attribute [rw] certification_name - # @return [::String] - # The name of the certification, for example "EPREL". - # Maximum length is 2000 characters. - # @!attribute [rw] certification_code - # @return [::String] - # The certification code. - # Maximum length is 2000 characters. - # @!attribute [rw] certification_value - # @return [::String] - # The certification value (also known as class, level or grade), for example - # "A+", "C", "gold". - # Maximum length is 2000 characters. - class Certification - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Structured title, for algorithmically (AI)-generated titles. - # @!attribute [rw] digital_source_type - # @return [::String] - # The digital source type, for example "trained_algorithmic_media". - # Following [IPTC](https://cv.iptc.org/newscodes/digitalsourcetype). - # Maximum length is 40 characters. - # @!attribute [rw] content - # @return [::String] - # The title text - # Maximum length is 150 characters - class ProductStructuredTitle - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Structured description, for algorithmically (AI)-generated descriptions. - # @!attribute [rw] digital_source_type - # @return [::String] - # The digital source type, for example "trained_algorithmic_media". - # Following [IPTC](https://cv.iptc.org/newscodes/digitalsourcetype). - # Maximum length is 40 characters. - # @!attribute [rw] content - # @return [::String] - # The description text - # Maximum length is 5000 characters - class ProductStructuredDescription - 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 a product, data validation issues, that is, information about - # a product computed asynchronously. - # @!attribute [rw] destination_statuses - # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::ProductStatus::DestinationStatus>] - # The intended destinations for the product. - # @!attribute [rw] item_level_issues - # @return [::Array<::Google::Shopping::Merchant::Products::V1beta::ProductStatus::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 ProductStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The destination status of the product status. - # @!attribute [rw] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # The name of the reporting context. - # @!attribute [rw] approved_countries - # @return [::Array<::String>] - # List of country codes (ISO 3166-1 alpha-2) where the offer is approved. - # @!attribute [rw] pending_countries - # @return [::Array<::String>] - # List of country codes (ISO 3166-1 alpha-2) where the offer is pending - # approval. - # @!attribute [rw] disapproved_countries - # @return [::Array<::String>] - # List of country codes (ISO 3166-1 alpha-2) where the offer 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] severity - # @return [::Google::Shopping::Merchant::Products::V1beta::ProductStatus::ItemLevelIssue::Severity] - # How this issue affects serving of the offer. - # @!attribute [rw] resolution - # @return [::String] - # Whether the issue can be resolved by the business. - # @!attribute [rw] attribute - # @return [::String] - # The attribute's name, if the issue is caused by a single attribute. - # @!attribute [rw] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # The reporting context 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 - # offer. - 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 - end - end - - # Product property for the Cloud Retail API. - # For example, properties for a TV product could be "Screen-Resolution" or - # "Screen-Size". - # @!attribute [rw] property_name - # @return [::String] - # Name of the given property. For example, - # "Screen-Resolution" for a TV product. Maximum string size is 256 - # characters. - # @!attribute [rw] text_value - # @return [::Array<::String>] - # Text value of the given property. For example, - # "8K(UHD)" could be a text value for a TV product. Maximum - # repeatedness of this value is 400. Values are stored in an arbitrary but - # consistent order. Maximum string size is 256 characters. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Boolean value of the given property. For example for a TV product, - # "True" or "False" if the screen is UHD. - # @!attribute [rw] int_value - # @return [::Array<::Integer>] - # Integer values of the given property. For example, 1080 for a TV - # product's Screen Resolution. Maximum repeatedness of this value - # is 400. Values are stored in an arbitrary but consistent order. - # @!attribute [rw] float_value - # @return [::Array<::Float>] - # Float values of the given property. For example for a TV product - # 1.2345. Maximum repeatedness of this value is 400. Values - # are stored in an arbitrary but consistent order. - # @!attribute [rw] min_value - # @return [::Float] - # Minimum float value of the given property. For example for a TV - # product 1.00. - # @!attribute [rw] max_value - # @return [::Float] - # Maximum float value of the given property. For example for a TV - # product 100.00. - # @!attribute [rw] unit_code - # @return [::String] - # Unit of the given property. For example, "Pixels" for a TV product. Maximum - # string size is 256B. - class CloudExportAdditionalProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information regarding sustainability-related incentive programs such as - # rebates or tax relief. - # @!attribute [rw] amount - # @return [::Google::Shopping::Type::Price] - # The fixed amount of the incentive. - # - # Note: The following fields are mutually exclusive: `amount`, `percentage`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] percentage - # @return [::Float] - # The percentage of the sale price that the incentive is applied to. - # - # Note: The following fields are mutually exclusive: `percentage`, `amount`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::Products::V1beta::ProductSustainabilityIncentive::Type] - # Sustainability incentive program. - class ProductSustainabilityIncentive - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Types of supported sustainability incentive programs. - module Type - # Unspecified or unknown sustainability incentive type. - TYPE_UNSPECIFIED = 0 - - # Program offering tax liability reductions for electric vehicles and, in - # some countries, plug-in hybrids. These reductions can be based on a - # specific amount or a percentage of the sale price. - EV_TAX_CREDIT = 1 - - # A subsidy program, often called an environmental bonus, provides a - # purchase grant for electric vehicles and, in some countries, plug-in - # hybrids. The grant amount may be a fixed sum or a percentage of the sale - # price. - EV_PRICE_DISCOUNT = 2 - end - end - - # Information regarding Automated Discounts. - # @!attribute [rw] prior_price - # @return [::Google::Shopping::Type::Price] - # The price prior to the application of the first price reduction. - # Absent if the information about the prior price of the product is not - # available. - # @!attribute [rw] prior_price_progressive - # @return [::Google::Shopping::Type::Price] - # The price prior to the application of consecutive price reductions. - # Absent if the information about the prior price of the product is not - # available. - # @!attribute [rw] gad_price - # @return [::Google::Shopping::Type::Price] - # The current sale price for products with a price optimized using Google - # Automated Discounts (GAD). Absent if the information about the GAD_price of - # the product is not available. - class AutomatedDiscounts - 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 -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/proto_docs/google/type/interval.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/type/interval.rb deleted file mode 100644 index 9350ca479005..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/Gemfile deleted file mode 100644 index be3d65c4c73d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-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-products-v1beta", path: "../" -else - gem "google-shopping-merchant-products-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-products-v1beta/snippets/product_inputs_service/delete_product_input.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/delete_product_input.rb deleted file mode 100644 index 4680cd8ecdd3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/delete_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 merchantapi_v1beta_generated_ProductInputsService_DeleteProductInput_sync] -require "google/shopping/merchant/products/v1beta" - -## -# Snippet for the delete_product_input call in the ProductInputsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client#delete_product_input. -# -def delete_product_input - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest.new - - # Call the delete_product_input method. - result = client.delete_product_input request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_ProductInputsService_DeleteProductInput_sync] diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/insert_product_input.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/insert_product_input.rb deleted file mode 100644 index c4d92ec01316..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/insert_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 merchantapi_v1beta_generated_ProductInputsService_InsertProductInput_sync] -require "google/shopping/merchant/products/v1beta" - -## -# Snippet for the insert_product_input call in the ProductInputsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client#insert_product_input. -# -def insert_product_input - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest.new - - # Call the insert_product_input method. - result = client.insert_product_input request - - # The returned object is of type Google::Shopping::Merchant::Products::V1beta::ProductInput. - p result -end -# [END merchantapi_v1beta_generated_ProductInputsService_InsertProductInput_sync] diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/update_product_input.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/update_product_input.rb deleted file mode 100644 index 3e96af7855cb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/product_inputs_service/update_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 merchantapi_v1beta_generated_ProductInputsService_UpdateProductInput_sync] -require "google/shopping/merchant/products/v1beta" - -## -# Snippet for the update_product_input call in the ProductInputsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client#update_product_input. -# -def update_product_input - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest.new - - # Call the update_product_input method. - result = client.update_product_input request - - # The returned object is of type Google::Shopping::Merchant::Products::V1beta::ProductInput. - p result -end -# [END merchantapi_v1beta_generated_ProductInputsService_UpdateProductInput_sync] diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/products_service/get_product.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/products_service/get_product.rb deleted file mode 100644 index 0e9287abfa14..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/products_service/get_product.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ProductsService_GetProduct_sync] -require "google/shopping/merchant/products/v1beta" - -## -# Snippet for the get_product call in the ProductsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Products::V1beta::ProductsService::Client#get_product. -# -def get_product - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Products::V1beta::GetProductRequest.new - - # Call the get_product method. - result = client.get_product request - - # The returned object is of type Google::Shopping::Merchant::Products::V1beta::Product. - p result -end -# [END merchantapi_v1beta_generated_ProductsService_GetProduct_sync] diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/products_service/list_products.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/products_service/list_products.rb deleted file mode 100644 index 14ee55d1e87e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/products_service/list_products.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_ProductsService_ListProducts_sync] -require "google/shopping/merchant/products/v1beta" - -## -# Snippet for the list_products call in the ProductsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Products::V1beta::ProductsService::Client#list_products. -# -def list_products - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Products::V1beta::ListProductsRequest.new - - # Call the list_products method. - result = client.list_products request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Products::V1beta::Product. - p item - end -end -# [END merchantapi_v1beta_generated_ProductsService_ListProducts_sync] diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/snippet_metadata_google.shopping.merchant.products.v1beta.json b/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/snippet_metadata_google.shopping.merchant.products.v1beta.json deleted file mode 100644 index 9ac9d76892ec..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/snippets/snippet_metadata_google.shopping.merchant.products.v1beta.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-products-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.products.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_ProductInputsService_InsertProductInput_sync", - "title": "Snippet for the insert_product_input call in the ProductInputsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client#insert_product_input.", - "file": "product_inputs_service/insert_product_input.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_product_input", - "full_name": "::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client#insert_product_input", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Products::V1beta::ProductInput", - "client": { - "short_name": "ProductInputsService::Client", - "full_name": "::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client" - }, - "method": { - "short_name": "InsertProductInput", - "full_name": "google.shopping.merchant.products.v1beta.ProductInputsService.InsertProductInput", - "service": { - "short_name": "ProductInputsService", - "full_name": "google.shopping.merchant.products.v1beta.ProductInputsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ProductInputsService_UpdateProductInput_sync", - "title": "Snippet for the update_product_input call in the ProductInputsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client#update_product_input.", - "file": "product_inputs_service/update_product_input.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_product_input", - "full_name": "::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client#update_product_input", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Products::V1beta::ProductInput", - "client": { - "short_name": "ProductInputsService::Client", - "full_name": "::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client" - }, - "method": { - "short_name": "UpdateProductInput", - "full_name": "google.shopping.merchant.products.v1beta.ProductInputsService.UpdateProductInput", - "service": { - "short_name": "ProductInputsService", - "full_name": "google.shopping.merchant.products.v1beta.ProductInputsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ProductInputsService_DeleteProductInput_sync", - "title": "Snippet for the delete_product_input call in the ProductInputsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client#delete_product_input.", - "file": "product_inputs_service/delete_product_input.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_product_input", - "full_name": "::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client#delete_product_input", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ProductInputsService::Client", - "full_name": "::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client" - }, - "method": { - "short_name": "DeleteProductInput", - "full_name": "google.shopping.merchant.products.v1beta.ProductInputsService.DeleteProductInput", - "service": { - "short_name": "ProductInputsService", - "full_name": "google.shopping.merchant.products.v1beta.ProductInputsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ProductsService_GetProduct_sync", - "title": "Snippet for the get_product call in the ProductsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1beta::ProductsService::Client#get_product.", - "file": "products_service/get_product.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_product", - "full_name": "::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client#get_product", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Products::V1beta::GetProductRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Products::V1beta::Product", - "client": { - "short_name": "ProductsService::Client", - "full_name": "::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client" - }, - "method": { - "short_name": "GetProduct", - "full_name": "google.shopping.merchant.products.v1beta.ProductsService.GetProduct", - "service": { - "short_name": "ProductsService", - "full_name": "google.shopping.merchant.products.v1beta.ProductsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ProductsService_ListProducts_sync", - "title": "Snippet for the list_products call in the ProductsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Products::V1beta::ProductsService::Client#list_products.", - "file": "products_service/list_products.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_products", - "full_name": "::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client#list_products", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Products::V1beta::ListProductsResponse", - "client": { - "short_name": "ProductsService::Client", - "full_name": "::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client" - }, - "method": { - "short_name": "ListProducts", - "full_name": "google.shopping.merchant.products.v1beta.ProductsService.ListProducts", - "service": { - "short_name": "ProductsService", - "full_name": "google.shopping.merchant.products.v1beta.ProductsService" - } - } - }, - "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-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_paths_test.rb deleted file mode 100644 index af09f148b6e3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/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/merchant/products/v1beta/product_inputs_service" - -class ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::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::Products::V1beta::ProductInputsService::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_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::Merchant::Products::V1beta::ProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.product_input_path account: "value0", productinput: "value1" - assert_equal "accounts/value0/productInputs/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_rest_test.rb deleted file mode 100644 index ff1f33b0759b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_rest_test.rb +++ /dev/null @@ -1,266 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/products/v1beta/productinputs_pb" -require "google/shopping/merchant/products/v1beta/product_inputs_service/rest" - - -class ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::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_product_input - # Create test objects. - client_result = ::Google::Shopping::Merchant::Products::V1beta::ProductInput.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - product_input = {} - data_source = "hello world" - - insert_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::Merchant::Products::V1beta::ProductInputsService::Rest::ServiceStub.stub :transcode_insert_product_input_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_product_input_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.insert_product_input({ parent: parent, product_input: product_input, data_source: data_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.insert_product_input parent: parent, product_input: product_input, data_source: data_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.insert_product_input ::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest.new(parent: parent, product_input: product_input, data_source: data_source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.insert_product_input({ parent: parent, product_input: product_input, data_source: data_source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.insert_product_input(::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest.new(parent: parent, product_input: product_input, data_source: data_source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_product_input_client_stub.call_count - end - end - end - - def test_update_product_input - # Create test objects. - client_result = ::Google::Shopping::Merchant::Products::V1beta::ProductInput.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - product_input = {} - update_mask = {} - data_source = "hello world" - - update_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::Merchant::Products::V1beta::ProductInputsService::Rest::ServiceStub.stub :transcode_update_product_input_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_product_input_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_product_input({ product_input: product_input, update_mask: update_mask, data_source: data_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_product_input product_input: product_input, update_mask: update_mask, data_source: data_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_product_input ::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest.new(product_input: product_input, update_mask: update_mask, data_source: data_source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_product_input({ product_input: product_input, update_mask: update_mask, data_source: data_source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_product_input(::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest.new(product_input: product_input, update_mask: update_mask, data_source: data_source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_product_input_client_stub.call_count - end - end - end - - def test_delete_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" - data_source = "hello world" - - delete_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::Merchant::Products::V1beta::ProductInputsService::Rest::ServiceStub.stub :transcode_delete_product_input_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_product_input_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_product_input({ name: name, data_source: data_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_product_input name: name, data_source: data_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_product_input ::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest.new(name: name, data_source: data_source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_product_input({ name: name, data_source: data_source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_product_input(::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest.new(name: name, data_source: data_source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_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::Merchant::Products::V1beta::ProductInputsService::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::Products::V1beta::ProductInputsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_test.rb deleted file mode 100644 index 2d9d0fa554f2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/product_inputs_service_test.rb +++ /dev/null @@ -1,288 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/products/v1beta/productinputs_pb" -require "google/shopping/merchant/products/v1beta/product_inputs_service" - -class ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::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_product_input - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Products::V1beta::ProductInput.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - product_input = {} - data_source = "hello world" - - insert_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_product_input, name - assert_kind_of ::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Products::V1beta::ProductInput), request["product_input"] - assert_equal "hello world", request["data_source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_product_input_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.insert_product_input({ parent: parent, product_input: product_input, data_source: data_source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.insert_product_input parent: parent, product_input: product_input, data_source: data_source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.insert_product_input ::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest.new(parent: parent, product_input: product_input, data_source: data_source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.insert_product_input({ parent: parent, product_input: product_input, 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 - c.insert_product_input(::Google::Shopping::Merchant::Products::V1beta::InsertProductInputRequest.new(parent: parent, product_input: product_input, 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, insert_product_input_client_stub.call_rpc_count - end - end - - def test_update_product_input - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Products::V1beta::ProductInput.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - product_input = {} - update_mask = {} - data_source = "hello world" - - update_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_product_input, name - assert_kind_of ::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Products::V1beta::ProductInput), request["product_input"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal "hello world", request["data_source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_product_input_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_product_input({ product_input: product_input, update_mask: update_mask, data_source: data_source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_product_input product_input: product_input, update_mask: update_mask, data_source: data_source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_product_input ::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest.new(product_input: product_input, update_mask: update_mask, data_source: data_source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_product_input({ product_input: product_input, update_mask: update_mask, 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 - c.update_product_input(::Google::Shopping::Merchant::Products::V1beta::UpdateProductInputRequest.new(product_input: product_input, update_mask: update_mask, 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, update_product_input_client_stub.call_rpc_count - end - end - - def test_delete_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" - data_source = "hello world" - - delete_product_input_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_product_input, name - assert_kind_of ::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["data_source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_product_input_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_product_input({ name: name, data_source: data_source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_product_input name: name, data_source: data_source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_product_input ::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest.new(name: name, data_source: data_source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_product_input({ name: name, 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 - c.delete_product_input(::Google::Shopping::Merchant::Products::V1beta::DeleteProductInputRequest.new(name: name, 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, delete_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::Merchant::Products::V1beta::ProductInputsService::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::Products::V1beta::ProductInputsService::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::Products::V1beta::ProductInputsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_paths_test.rb deleted file mode 100644 index d31f0e886202..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/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/merchant/products/v1beta/products_service" - -class ::Google::Shopping::Merchant::Products::V1beta::ProductsService::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::Products::V1beta::ProductsService::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::Products::V1beta::ProductsService::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-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_rest_test.rb deleted file mode 100644 index 32479d72f2ef..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/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/merchant/products/v1beta/products_pb" -require "google/shopping/merchant/products/v1beta/products_service/rest" - - -class ::Google::Shopping::Merchant::Products::V1beta::ProductsService::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_product - # Create test objects. - client_result = ::Google::Shopping::Merchant::Products::V1beta::Product.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_product_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::ServiceStub.stub :transcode_get_product_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_product_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_product({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_product name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_product ::Google::Shopping::Merchant::Products::V1beta::GetProductRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_product({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_product(::Google::Shopping::Merchant::Products::V1beta::GetProductRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_product_client_stub.call_count - end - end - end - - def test_list_products - # Create test objects. - client_result = ::Google::Shopping::Merchant::Products::V1beta::ListProductsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_products_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::ServiceStub.stub :transcode_list_products_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_products_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_products({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_products parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_products ::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_products({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_products(::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_products_client_stub.call_count - end - end - end - - def test_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::Products::V1beta::ProductsService::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::Products::V1beta::ProductsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_test.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/products_service_test.rb deleted file mode 100644 index 5b33d88e7918..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/google/shopping/merchant/products/v1beta/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/merchant/products/v1beta/products_pb" -require "google/shopping/merchant/products/v1beta/products_service" - -class ::Google::Shopping::Merchant::Products::V1beta::ProductsService::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_product - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Products::V1beta::Product.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_product, name - assert_kind_of ::Google::Shopping::Merchant::Products::V1beta::GetProductRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_product_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_product({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_product name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_product ::Google::Shopping::Merchant::Products::V1beta::GetProductRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_product({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_product(::Google::Shopping::Merchant::Products::V1beta::GetProductRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_product_client_stub.call_rpc_count - end - end - - def test_list_products - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Products::V1beta::ListProductsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_products_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_products, name - assert_kind_of ::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_products_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_products({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_products parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_products ::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_products({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_products(::Google::Shopping::Merchant::Products::V1beta::ListProductsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_products_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::Products::V1beta::ProductsService::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::Products::V1beta::ProductsService::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::Products::V1beta::ProductsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -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-promotions-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-promotions-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -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-promotions-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-promotions-v1/.repo-metadata.json deleted file mode 100644 index 84693936bf05..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1", - "distribution_name": "google-shopping-merchant-promotions-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-promotions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-promotions 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-promotions-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-promotions-v1/.rubocop.yml deleted file mode 100644 index 2b674ecd7332..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-promotions-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-promotions-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-promotions-v1/.yardopts deleted file mode 100644 index dc7bbc10ae29..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-promotions-v1/AUTHENTICATION.md deleted file mode 100644 index 24ed851eb83d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-promotions-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-promotions-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/promotions/v1" - -client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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/promotions/v1" - -::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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-promotions-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/promotions/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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-promotions-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-promotions-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-promotions-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/Gemfile +++ /dev/null @@ -1,15 +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-reporters", "~> 1.8.0", require: false -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-promotions-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-promotions-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1/README.md b/owl-bot-staging/google-shopping-merchant-promotions-v1/README.md deleted file mode 100644 index 90b261148cb2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions](https://rubygems.org/gems/google-shopping-merchant-promotions). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-promotions-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/promotions/v1" - -client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new -request = ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new # (request fields as keyword arguments...) -response = client.insert_promotion request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-promotions-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/promotions/v1" -require "logger" - -client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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.2+. - -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-promotions`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-promotions-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-promotions`. -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-promotions-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-promotions-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-promotions-v1/Rakefile deleted file mode 100644 index d98f692bf19e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-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/promotions/v1/promotions_service/credentials" - ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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-promotions-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-promotions-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-promotions-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-promotions-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-promotions-v1" - header "google-shopping-merchant-promotions-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-promotions-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-promotions-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-promotions-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-promotions-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-promotions-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-promotions-v1/gapic_metadata.json deleted file mode 100644 index 314936333345..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/gapic_metadata.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.promotions.v1", - "libraryPackage": "::Google::Shopping::Merchant::Promotions::V1", - "services": { - "PromotionsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client", - "rpcs": { - "InsertPromotion": { - "methods": [ - "insert_promotion" - ] - }, - "GetPromotion": { - "methods": [ - "get_promotion" - ] - }, - "ListPromotions": { - "methods": [ - "list_promotions" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/google-shopping-merchant-promotions-v1.gemspec b/owl-bot-staging/google-shopping-merchant-promotions-v1/google-shopping-merchant-promotions-v1.gemspec deleted file mode 100644 index 119d81012113..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/google-shopping-merchant-promotions-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/promotions/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-promotions-v1" - gem.version = Google::Shopping::Merchant::Promotions::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-promotions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-promotions 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.3" - 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-promotions-v1/lib/google-shopping-merchant-promotions-v1.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google-shopping-merchant-promotions-v1.rb deleted file mode 100644 index 7520fa752e8c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google-shopping-merchant-promotions-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/promotions/v1" diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1.rb deleted file mode 100644 index f3a70c6d9348..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/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/promotions/v1/promotions_service" -require "google/shopping/merchant/promotions/v1/version" - -module Google - module Shopping - module Merchant - module Promotions - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/promotions/v1" - # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/promotions/v1" - # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/shopping/merchant/promotions/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_common_pb.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_common_pb.rb deleted file mode 100644 index 53b9c43188ec..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_common_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/promotions/v1/promotions_common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' -require 'google/shopping/type/types_pb' -require 'google/type/interval_pb' - - -descriptor_data = "\n>google/shopping/merchant/promotions/v1/promotions_common.proto\x12&google.shopping.merchant.promotions.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/interval.proto\"\xc5\x0b\n\nAttributes\x12`\n\x15product_applicability\x18\x01 \x01(\x0e\x32<.google.shopping.merchant.promotions.v1.ProductApplicabilityB\x03\xe0\x41\x02\x12J\n\noffer_type\x18\x02 \x01(\x0e\x32\x31.google.shopping.merchant.promotions.v1.OfferTypeB\x03\xe0\x41\x02\x12$\n\x17generic_redemption_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nlong_title\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12W\n\x11\x63oupon_value_type\x18\x05 \x01(\x0e\x32\x37.google.shopping.merchant.promotions.v1.CouponValueTypeB\x03\xe0\x41\x02\x12V\n\x16promotion_destinations\x18\x06 \x03(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnumB\x03\xe0\x41\x02\x12\x1e\n\x11item_id_inclusion\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62rand_inclusion\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12$\n\x17item_group_id_inclusion\x18\t \x03(\tB\x03\xe0\x41\x01\x12#\n\x16product_type_inclusion\x18\n \x03(\tB\x03\xe0\x41\x01\x12\x1e\n\x11item_id_exclusion\x18\x0b \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62rand_exclusion\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12$\n\x17item_group_id_exclusion\x18\r \x03(\tB\x03\xe0\x41\x01\x12#\n\x16product_type_exclusion\x18\x0e \x03(\tB\x03\xe0\x41\x01\x12\x41\n\x17minimum_purchase_amount\x18\x0f \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12&\n\x19minimum_purchase_quantity\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1b\n\x0elimit_quantity\x18\x11 \x01(\x03\x42\x03\xe0\x41\x01\x12\x35\n\x0blimit_value\x18\x12 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\x18\n\x0bpercent_off\x18\x13 \x01(\x03\x42\x03\xe0\x41\x01\x12:\n\x10money_off_amount\x18\x14 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12)\n\x1cget_this_quantity_discounted\x18\x15 \x01(\x03\x42\x03\xe0\x41\x01\x12\x39\n\x0f\x66ree_gift_value\x18\x16 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\"\n\x15\x66ree_gift_description\x18\x17 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x66ree_gift_item_id\x18\x18 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x1fpromotion_effective_time_period\x18\x19 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x02\x12\x41\n\x1dpromotion_display_time_period\x18\x1a \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\x12\\\n\x13store_applicability\x18\x1c \x01(\x0e\x32:.google.shopping.merchant.promotions.v1.StoreApplicabilityB\x03\xe0\x41\x01\x12\"\n\x15store_codes_inclusion\x18\x1d \x03(\tB\x03\xe0\x41\x01\x12\"\n\x15store_codes_exclusion\x18\x1e \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\rpromotion_url\x18\x1f \x01(\tB\x03\xe0\x41\x01\"\x81\t\n\x0fPromotionStatus\x12l\n\x14\x64\x65stination_statuses\x18\x01 \x03(\x0b\x32I.google.shopping.merchant.promotions.v1.PromotionStatus.DestinationStatusB\x03\xe0\x41\x03\x12\x66\n\x11item_level_issues\x18\x02 \x03(\x0b\x32\x46.google.shopping.merchant.promotions.v1.PromotionStatus.ItemLevelIssueB\x03\xe0\x41\x03\x12\x36\n\rcreation_date\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_update_date\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\xc4\x02\n\x11\x44\x65stinationStatus\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x12\x64\n\x06status\x18\x02 \x01(\x0e\x32O.google.shopping.merchant.promotions.v1.PromotionStatus.DestinationStatus.StateB\x03\xe0\x41\x03\"l\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tIN_REVIEW\x10\x01\x12\x0c\n\x08REJECTED\x10\x02\x12\x08\n\x04LIVE\x10\x03\x12\x0b\n\x07STOPPED\x10\x04\x12\x0b\n\x07\x45XPIRED\x10\x05\x12\x0b\n\x07PENDING\x10\x06\x1a\xdd\x03\n\x0eItemLevelIssue\x12\x11\n\x04\x63ode\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x66\n\x08severity\x18\x02 \x01(\x0e\x32O.google.shopping.merchant.promotions.v1.PromotionStatus.ItemLevelIssue.SeverityB\x03\xe0\x41\x03\x12\x17\n\nresolution\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tattribute\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12[\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rdocumentation\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12!\n\x14\x61pplicable_countries\x18\t \x03(\tB\x03\xe0\x41\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*f\n\x14ProductApplicability\x12%\n!PRODUCT_APPLICABILITY_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41LL_PRODUCTS\x10\x01\x12\x15\n\x11SPECIFIC_PRODUCTS\x10\x02*^\n\x12StoreApplicability\x12#\n\x1fSTORE_APPLICABILITY_UNSPECIFIED\x10\x00\x12\x0e\n\nALL_STORES\x10\x01\x12\x13\n\x0fSPECIFIC_STORES\x10\x02*F\n\tOfferType\x12\x1a\n\x16OFFER_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NO_CODE\x10\x01\x12\x10\n\x0cGENERIC_CODE\x10\x02*Q\n\x11RedemptionChannel\x12\"\n\x1eREDEMPTION_CHANNEL_UNSPECIFIED\x10\x00\x12\x0c\n\x08IN_STORE\x10\x01\x12\n\n\x06ONLINE\x10\x02*\xd9\x02\n\x0f\x43ouponValueType\x12!\n\x1d\x43OUPON_VALUE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tMONEY_OFF\x10\x01\x12\x0f\n\x0bPERCENT_OFF\x10\x02\x12\x19\n\x15\x42UY_M_GET_N_MONEY_OFF\x10\x03\x12\x1b\n\x17\x42UY_M_GET_N_PERCENT_OFF\x10\x04\x12\x17\n\x13\x42UY_M_GET_MONEY_OFF\x10\x05\x12\x19\n\x15\x42UY_M_GET_PERCENT_OFF\x10\x06\x12\r\n\tFREE_GIFT\x10\x07\x12\x18\n\x14\x46REE_GIFT_WITH_VALUE\x10\x08\x12\x1a\n\x16\x46REE_GIFT_WITH_ITEM_ID\x10\t\x12\x1a\n\x16\x46REE_SHIPPING_STANDARD\x10\n\x12\x1b\n\x17\x46REE_SHIPPING_OVERNIGHT\x10\x0b\x12\x19\n\x15\x46REE_SHIPPING_TWO_DAY\x10\x0c\x42\x96\x02\n*com.google.shopping.merchant.promotions.v1B\x15PromotionsCommonProtoP\x01ZPcloud.google.com/go/shopping/merchant/promotions/apiv1/promotionspb;promotionspb\xaa\x02&Google.Shopping.Merchant.Promotions.V1\xca\x02&Google\\Shopping\\Merchant\\Promotions\\V1\xea\x02*Google::Shopping::Merchant::Promotions::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Promotions - module V1 - Attributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.Attributes").msgclass - PromotionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.PromotionStatus").msgclass - PromotionStatus::DestinationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.PromotionStatus.DestinationStatus").msgclass - PromotionStatus::DestinationStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.PromotionStatus.DestinationStatus.State").enummodule - PromotionStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.PromotionStatus.ItemLevelIssue").msgclass - PromotionStatus::ItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.PromotionStatus.ItemLevelIssue.Severity").enummodule - ProductApplicability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.ProductApplicability").enummodule - StoreApplicability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.StoreApplicability").enummodule - OfferType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.OfferType").enummodule - RedemptionChannel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.RedemptionChannel").enummodule - CouponValueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.CouponValueType").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_pb.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_pb.rb deleted file mode 100644 index 5f5fd4e0a390..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_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/promotions/v1/promotions.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/promotions/v1/promotions_common_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n7google/shopping/merchant/promotions/v1/promotions.proto\x12&google.shopping.merchant.promotions.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/promotions/v1/promotions_common.proto\x1a google/shopping/type/types.proto\"\xf9\x04\n\tPromotion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0cpromotion_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0etarget_country\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x12redemption_channel\x18\x05 \x03(\x0e\x32\x39.google.shopping.merchant.promotions.v1.RedemptionChannelB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12K\n\nattributes\x18\x07 \x01(\x0b\x32\x32.google.shopping.merchant.promotions.v1.AttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\x08 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01\x12V\n\x10promotion_status\x18\t \x01(\x0b\x32\x37.google.shopping.merchant.promotions.v1.PromotionStatusB\x03\xe0\x41\x03\x12 \n\x0eversion_number\x18\n \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01:k\xea\x41h\n$merchantapi.googleapis.com/Promotion\x12)accounts/{account}/promotions/{promotion}*\npromotions2\tpromotionB\x11\n\x0f_version_number\"\x92\x01\n\x16InsertPromotionRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12I\n\tpromotion\x18\x02 \x01(\x0b\x32\x31.google.shopping.merchant.promotions.v1.PromotionB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"Q\n\x13GetPromotionRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$merchantapi.googleapis.com/Promotion\"]\n\x15ListPromotionsRequest\x12\x13\n\x06parent\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\"x\n\x16ListPromotionsResponse\x12\x45\n\npromotions\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.promotions.v1.Promotion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xb5\x05\n\x11PromotionsService\x12\xc5\x01\n\x0fInsertPromotion\x12>.google.shopping.merchant.promotions.v1.InsertPromotionRequest\x1a\x31.google.shopping.merchant.promotions.v1.Promotion\"?\x82\xd3\xe4\x93\x02\x39\"4/promotions/v1/{parent=accounts/*}/promotions:insert:\x01*\x12\xbc\x01\n\x0cGetPromotion\x12;.google.shopping.merchant.promotions.v1.GetPromotionRequest\x1a\x31.google.shopping.merchant.promotions.v1.Promotion\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/promotions/v1/{name=accounts/*/promotions/*}\x12\xcf\x01\n\x0eListPromotions\x12=.google.shopping.merchant.promotions.v1.ListPromotionsRequest\x1a>.google.shopping.merchant.promotions.v1.ListPromotionsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/promotions/v1/{parent=accounts/*}/promotions\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xcb\x02\n*com.google.shopping.merchant.promotions.v1B\x0fPromotionsProtoP\x01ZPcloud.google.com/go/shopping/merchant/promotions/apiv1/promotionspb;promotionspb\xaa\x02&Google.Shopping.Merchant.Promotions.V1\xca\x02&Google\\Shopping\\Merchant\\Promotions\\V1\xea\x02*Google::Shopping::Merchant::Promotions::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 Promotions - module V1 - Promotion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.Promotion").msgclass - InsertPromotionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.InsertPromotionRequest").msgclass - GetPromotionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.GetPromotionRequest").msgclass - ListPromotionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.ListPromotionsRequest").msgclass - ListPromotionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1.ListPromotionsResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service.rb deleted file mode 100644 index 19dae04d8d12..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_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/promotions/v1/version" - -require "google/shopping/merchant/promotions/v1/promotions_service/credentials" -require "google/shopping/merchant/promotions/v1/promotions_service/paths" -require "google/shopping/merchant/promotions/v1/promotions_service/client" -require "google/shopping/merchant/promotions/v1/promotions_service/rest" - -module Google - module Shopping - module Merchant - module Promotions - module V1 - ## - # Service to manage promotions for products. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/promotions/v1/promotions_service" - # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/promotions/v1/promotions_service/rest" - # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new - # - module PromotionsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "promotions_service", "helpers.rb" -require "google/shopping/merchant/promotions/v1/promotions_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/client.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/client.rb deleted file mode 100644 index 5a1247691c4c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/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/promotions/v1/promotions_pb" - -module Google - module Shopping - module Merchant - module Promotions - module V1 - module PromotionsService - ## - # Client for the PromotionsService service. - # - # Service to manage promotions for products. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :promotions_service_stub - - ## - # Configure the PromotionsService Client class. - # - # See {::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PromotionsService clients - # ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.configure do |config| - # config.timeout = 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", "Promotions", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.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 PromotionsService Client instance. - # - # The configuration is set to the derived mode, meaning that values 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::Promotions::V1::PromotionsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @promotions_service_stub.universe_domain - end - - ## - # Create a new PromotionsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PromotionsService 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/promotions/v1/promotions_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 - - @promotions_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @promotions_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 - @promotions_service_stub.logger - end - - # Service calls - - ## - # Inserts a promotion for your Merchant Center account. If the promotion - # already exists, then it updates the promotion instead. - # - # @overload insert_promotion(request, options = nil) - # Pass arguments to `insert_promotion` via a request object, either of type - # {::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_promotion(parent: nil, promotion: nil, data_source: nil) - # Pass arguments to `insert_promotion` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 the promotion will be inserted. - # Format: accounts/\\{account} - # @param promotion [::Google::Shopping::Merchant::Promotions::V1::Promotion, ::Hash] - # Required. The promotion to insert. - # @param data_source [::String] - # Required. The data source of the - # [promotion](https://support.google.com/merchants/answer/6396268?sjid=5155774230887277618-NC) - # Format: - # `accounts/{account}/dataSources/{datasource}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Promotions::V1::Promotion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/promotions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new - # - # # Call the insert_promotion method. - # result = client.insert_promotion request - # - # # The returned object is of type Google::Shopping::Merchant::Promotions::V1::Promotion. - # p result - # - def insert_promotion request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest - - # Converts hash and nil to 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_promotion.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Promotions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_promotion.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_promotion.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @promotions_service_stub.call_rpc :insert_promotion, request, 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 promotion from your Merchant Center account. - # - # After inserting or updating a promotion input, it may take several - # minutes before the updated promotion can be retrieved. - # - # @overload get_promotion(request, options = nil) - # Pass arguments to `get_promotion` via a request object, either of type - # {::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_promotion(name: nil) - # Pass arguments to `get_promotion` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the promotion to retrieve. - # Format: `accounts/{account}/promotions/{promotions}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Promotions::V1::Promotion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/promotions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.new - # - # # Call the get_promotion method. - # result = client.get_promotion request - # - # # The returned object is of type Google::Shopping::Merchant::Promotions::V1::Promotion. - # p result - # - def get_promotion request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_promotion.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Promotions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_promotion.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_promotion.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @promotions_service_stub.call_rpc :get_promotion, request, 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 promotions in your Merchant 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 or updating a promotion, it may take several minutes before - # the updated processed promotion can be retrieved. - # - # @overload list_promotions(request, options = nil) - # Pass arguments to `list_promotions` via a request object, either of type - # {::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_promotions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_promotions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 processed promotions for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of promotions to return. The service may - # return fewer than this value. The maximum value is 250; values above 250 - # will be coerced to 250. If unspecified, the maximum number of promotions - # will be returned. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListPromotions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPromotions` 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::Promotions::V1::Promotion>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Promotions::V1::Promotion>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/promotions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.new - # - # # Call the list_promotions method. - # result = client.list_promotions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can 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::Promotions::V1::Promotion. - # p item - # end - # - def list_promotions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_promotions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Promotions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_promotions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_promotions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @promotions_service_stub.call_rpc :list_promotions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @promotions_service_stub, :list_promotions, request, response, 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 PromotionsService API. - # - # This class represents the configuration for PromotionsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_promotion to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_promotion.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_promotion.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::Promotions::V1::PromotionsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the PromotionsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `insert_promotion` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_promotion - ## - # RPC-specific configuration for `get_promotion` - # @return [::Gapic::Config::Method] - # - attr_reader :get_promotion - ## - # RPC-specific configuration for `list_promotions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_promotions - - # @private - def initialize parent_rpcs = nil - insert_promotion_config = parent_rpcs.insert_promotion if parent_rpcs.respond_to? :insert_promotion - @insert_promotion = ::Gapic::Config::Method.new insert_promotion_config - get_promotion_config = parent_rpcs.get_promotion if parent_rpcs.respond_to? :get_promotion - @get_promotion = ::Gapic::Config::Method.new get_promotion_config - list_promotions_config = parent_rpcs.list_promotions if parent_rpcs.respond_to? :list_promotions - @list_promotions = ::Gapic::Config::Method.new list_promotions_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-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/credentials.rb deleted file mode 100644 index 581e95d2481a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_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 Promotions - module V1 - module PromotionsService - # Credentials for the PromotionsService 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-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/paths.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/paths.rb deleted file mode 100644 index 5872c917bb52..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_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 Promotions - module V1 - module PromotionsService - # Path helper methods for the PromotionsService API. - module Paths - ## - # Create a fully-qualified Promotion resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/promotions/{promotion}` - # - # @param account [String] - # @param promotion [String] - # - # @return [::String] - def promotion_path account:, promotion: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/promotions/#{promotion}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest.rb deleted file mode 100644 index e3a39d2bf44d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_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/promotions/v1/version" - -require "google/shopping/merchant/promotions/v1/promotions_service/credentials" -require "google/shopping/merchant/promotions/v1/promotions_service/paths" -require "google/shopping/merchant/promotions/v1/promotions_service/rest/client" - -module Google - module Shopping - module Merchant - module Promotions - module V1 - ## - # Service to manage promotions for products. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/promotions/v1/promotions_service/rest" - # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new - # - module PromotionsService - # 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/promotions/v1/promotions_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/client.rb deleted file mode 100644 index a09a9749a05e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/client.rb +++ /dev/null @@ -1,639 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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/promotions/v1/promotions_pb" -require "google/shopping/merchant/promotions/v1/promotions_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Promotions - module V1 - module PromotionsService - module Rest - ## - # REST client for the PromotionsService service. - # - # Service to manage promotions for products. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :promotions_service_stub - - ## - # Configure the PromotionsService Client class. - # - # See {::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PromotionsService clients - # ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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", "Promotions", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.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 PromotionsService Client instance. - # - # The configuration is set to the derived mode, meaning that values 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::Promotions::V1::PromotionsService::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 - @promotions_service_stub.universe_domain - end - - ## - # Create a new PromotionsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PromotionsService 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 - - @promotions_service_stub = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @promotions_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 - @promotions_service_stub.logger - end - - # Service calls - - ## - # Inserts a promotion for your Merchant Center account. If the promotion - # already exists, then it updates the promotion instead. - # - # @overload insert_promotion(request, options = nil) - # Pass arguments to `insert_promotion` via a request object, either of type - # {::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_promotion(parent: nil, promotion: nil, data_source: nil) - # Pass arguments to `insert_promotion` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 the promotion will be inserted. - # Format: accounts/\\{account} - # @param promotion [::Google::Shopping::Merchant::Promotions::V1::Promotion, ::Hash] - # Required. The promotion to insert. - # @param data_source [::String] - # Required. The data source of the - # [promotion](https://support.google.com/merchants/answer/6396268?sjid=5155774230887277618-NC) - # Format: - # `accounts/{account}/dataSources/{datasource}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1::Promotion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/promotions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new - # - # # Call the insert_promotion method. - # result = client.insert_promotion request - # - # # The returned object is of type Google::Shopping::Merchant::Promotions::V1::Promotion. - # p result - # - def insert_promotion request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest - - # Converts hash and nil to an 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_promotion.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Promotions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_promotion.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_promotion.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @promotions_service_stub.insert_promotion request, 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 promotion from your Merchant Center account. - # - # After inserting or updating a promotion input, it may take several - # minutes before the updated promotion can be retrieved. - # - # @overload get_promotion(request, options = nil) - # Pass arguments to `get_promotion` via a request object, either of type - # {::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_promotion(name: nil) - # Pass arguments to `get_promotion` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the promotion to retrieve. - # Format: `accounts/{account}/promotions/{promotions}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1::Promotion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/promotions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.new - # - # # Call the get_promotion method. - # result = client.get_promotion request - # - # # The returned object is of type Google::Shopping::Merchant::Promotions::V1::Promotion. - # p result - # - def get_promotion request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_promotion.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Promotions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_promotion.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_promotion.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @promotions_service_stub.get_promotion request, 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 promotions in your Merchant 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 or updating a promotion, it may take several minutes before - # the updated processed promotion can be retrieved. - # - # @overload list_promotions(request, options = nil) - # Pass arguments to `list_promotions` via a request object, either of type - # {::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_promotions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_promotions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 processed promotions for. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of promotions to return. The service may - # return fewer than this value. The maximum value is 250; values above 250 - # will be coerced to 250. If unspecified, the maximum number of promotions - # will be returned. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListPromotions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPromotions` 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::Promotions::V1::Promotion>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Promotions::V1::Promotion>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/promotions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.new - # - # # Call the list_promotions method. - # result = client.list_promotions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can 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::Promotions::V1::Promotion. - # p item - # end - # - def list_promotions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_promotions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Promotions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_promotions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_promotions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @promotions_service_stub.list_promotions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @promotions_service_stub, :list_promotions, "promotions", request, result, 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 PromotionsService REST API. - # - # This class represents the configuration for PromotionsService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_promotion to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_promotion.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_promotion.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the PromotionsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `insert_promotion` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_promotion - ## - # RPC-specific configuration for `get_promotion` - # @return [::Gapic::Config::Method] - # - attr_reader :get_promotion - ## - # RPC-specific configuration for `list_promotions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_promotions - - # @private - def initialize parent_rpcs = nil - insert_promotion_config = parent_rpcs.insert_promotion if parent_rpcs.respond_to? :insert_promotion - @insert_promotion = ::Gapic::Config::Method.new insert_promotion_config - get_promotion_config = parent_rpcs.get_promotion if parent_rpcs.respond_to? :get_promotion - @get_promotion = ::Gapic::Config::Method.new get_promotion_config - list_promotions_config = parent_rpcs.list_promotions if parent_rpcs.respond_to? :list_promotions - @list_promotions = ::Gapic::Config::Method.new list_promotions_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-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/service_stub.rb deleted file mode 100644 index 269bd4f2e60c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_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/promotions/v1/promotions_pb" - -module Google - module Shopping - module Merchant - module Promotions - module V1 - module PromotionsService - module Rest - ## - # REST service stub for the PromotionsService 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_promotion REST call - # - # @param request_pb [::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1::Promotion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] - # A result object deserialized from the server's reply - def insert_promotion request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_promotion_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_promotion", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Promotions::V1::Promotion.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_promotion REST call - # - # @param request_pb [::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1::Promotion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] - # A result object deserialized from the server's reply - def get_promotion request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_promotion_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_promotion", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Promotions::V1::Promotion.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_promotions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1::ListPromotionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Promotions::V1::ListPromotionsResponse] - # A result object deserialized from the server's reply - def list_promotions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_promotions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_promotions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsResponse.decode_json response.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_promotion REST call - # - # @param request_pb [::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest] - # 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_promotion_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/promotions/v1/{parent}/promotions:insert", - body: "*", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_promotion REST call - # - # @param request_pb [::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_promotion_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/promotions/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/promotions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_promotions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_promotions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/promotions/v1/{parent}/promotions", - 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-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_services_pb.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_services_pb.rb deleted file mode 100644 index 31e15dab4727..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_services_pb.rb +++ /dev/null @@ -1,60 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/promotions/v1/promotions.proto for package 'Google.Shopping.Merchant.Promotions.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/promotions/v1/promotions_pb' - -module Google - module Shopping - module Merchant - module Promotions - module V1 - module PromotionsService - # Service to manage promotions for products. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.promotions.v1.PromotionsService' - - # Inserts a promotion for your Merchant Center account. If the promotion - # already exists, then it updates the promotion instead. - rpc :InsertPromotion, ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest, ::Google::Shopping::Merchant::Promotions::V1::Promotion - # Retrieves the promotion from your Merchant Center account. - # - # After inserting or updating a promotion input, it may take several - # minutes before the updated promotion can be retrieved. - rpc :GetPromotion, ::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest, ::Google::Shopping::Merchant::Promotions::V1::Promotion - # Lists the promotions in your Merchant 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 or updating a promotion, it may take several minutes before - # the updated processed promotion can be retrieved. - rpc :ListPromotions, ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest, ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/rest.rb deleted file mode 100644 index 56dbf26b54f7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/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/promotions/v1/promotions_service/rest" -require "google/shopping/merchant/promotions/v1/version" - -module Google - module Shopping - module Merchant - module Promotions - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/promotions/v1/rest" - # client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/version.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/version.rb deleted file mode 100644 index 6317b950bb8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/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 Promotions - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/README.md deleted file mode 100644 index 110adc2cf42e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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. - # - # Note: This field should not be used in most cases. - 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. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # 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-promotions-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 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-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions.rb deleted file mode 100644 index feb8f7c2dc11..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions.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 Promotions - module V1 - # Represents a promotion. See the following articles for more details. - # - # Required promotion input attributes to pass data validation checks are - # primarily defined below: - # - # * [Promotions data - # specification](https://support.google.com/merchants/answer/2906014) - # * [Local promotions data - # specification](https://support.google.com/merchants/answer/10146130) - # - # After inserting, updating a promotion input, it may take several minutes - # before the final promotion can be retrieved. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the promotion. - # Format: `accounts/{account}/promotions/{promotion}` - # @!attribute [rw] promotion_id - # @return [::String] - # Required. The user provided promotion ID to uniquely identify the - # promotion. Follow [minimum - # requirements](https://support.google.com/merchants/answer/7050148?ref_topic=7322920&sjid=871860036916537104-NC#minimum_requirements) - # to prevent promotion disapprovals. - # @!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 - # promotion. - # - # Promotions is only for [selected - # languages](https://support.google.com/merchants/answer/4588281?ref_topic=6396150&sjid=18314938579342094533-NC#option3&zippy=). - # @!attribute [rw] target_country - # @return [::String] - # Required. 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, [Free Listings and Shopping - # ads](https://support.google.com/merchants/answer/4588460) [Local Inventory - # ads](https://support.google.com/merchants/answer/10146326) - # @!attribute [rw] redemption_channel - # @return [::Array<::Google::Shopping::Merchant::Promotions::V1::RedemptionChannel>] - # Required. [Redemption - # channel](https://support.google.com/merchants/answer/13837674?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. At least one channel is required. - # @!attribute [r] data_source - # @return [::String] - # Output only. The primary data source of the promotion. - # @!attribute [rw] attributes - # @return [::Google::Shopping::Merchant::Promotions::V1::Attributes] - # Optional. A list of promotion attributes. - # @!attribute [rw] custom_attributes - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Optional. A list of custom (merchant-provided) attributes. It can also be - # used for submitting any attribute of the data specification in its generic - # form (for example, - # `{ "name": "size type", "value": "regular" }`). - # This is useful for submitting attributes not explicitly exposed by the - # API. - # @!attribute [r] promotion_status - # @return [::Google::Shopping::Merchant::Promotions::V1::PromotionStatus] - # Output only. The [status of a - # promotion](https://support.google.com/merchants/answer/3398326?ref_topic=7322924&sjid=5155774230887277618-NC), - # data validation issues, that is, information about a promotion computed - # asynchronously. - # @!attribute [rw] version_number - # @return [::Integer] - # Optional. Represents the existing version (freshness) of the promotion, - # which can be used to preserve the right order when multiple updates are - # done at the same time. - # - # If set, the insertion is prevented when version number is lower than - # the current version number of the existing promotion. Re-insertion (for - # example, promotion refresh after 30 days) can be performed with the current - # `version_number`. - # - # If the operation is prevented, the aborted exception will be - # thrown. - class Promotion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `InsertPromotion` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account where the promotion will be inserted. - # Format: accounts/\\{account} - # @!attribute [rw] promotion - # @return [::Google::Shopping::Merchant::Promotions::V1::Promotion] - # Required. The promotion to insert. - # @!attribute [rw] data_source - # @return [::String] - # Required. The data source of the - # [promotion](https://support.google.com/merchants/answer/6396268?sjid=5155774230887277618-NC) - # Format: - # `accounts/{account}/dataSources/{datasource}`. - class InsertPromotionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetPromotion` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the promotion to retrieve. - # Format: `accounts/{account}/promotions/{promotions}` - class GetPromotionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListPromotions` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to list processed promotions for. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of promotions to return. The service may - # return fewer than this value. The maximum value is 250; values above 250 - # will be coerced to 250. If unspecified, the maximum number of promotions - # will be returned. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListPromotions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPromotions` must - # match the call that provided the page token. - class ListPromotionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListPromotions` method. - # @!attribute [rw] promotions - # @return [::Array<::Google::Shopping::Merchant::Promotions::V1::Promotion>] - # The processed promotions 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 ListPromotionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions_common.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions_common.rb deleted file mode 100644 index eecbe0f7dc25..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/merchant/promotions/v1/promotions_common.rb +++ /dev/null @@ -1,446 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Promotions - module V1 - # Attributes. - # @!attribute [rw] product_applicability - # @return [::Google::Shopping::Merchant::Promotions::V1::ProductApplicability] - # Required. Applicability of the promotion to either all products or - # [only specific - # products](https://support.google.com/merchants/answer/6396257?ref_topic=6396150&sjid=17642868584668136159-NC). - # @!attribute [rw] offer_type - # @return [::Google::Shopping::Merchant::Promotions::V1::OfferType] - # Required. - # [Type](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC) - # of the promotion. Use this attribute to indicate whether or not customers - # need a coupon code to redeem your promotion. - # @!attribute [rw] generic_redemption_code - # @return [::String] - # Optional. Generic redemption code for the promotion. To be used with the - # `offerType` field and must meet the [minimum - # requirements](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC). - # @!attribute [rw] long_title - # @return [::String] - # Required. [Long - # title](https://support.google.com/merchants/answer/13838102?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. - # @!attribute [rw] coupon_value_type - # @return [::Google::Shopping::Merchant::Promotions::V1::CouponValueType] - # Required. The [coupon value type] - # (https://support.google.com/merchants/answer/13861986?ref_topic=13773355&sjid=17642868584668136159-NC) - # attribute to signal the type of promotion that you are running. Depending - # on type of the selected coupon value [some attributes are - # required](https://support.google.com/merchants/answer/6393006?ref_topic=7322920). - # @!attribute [rw] promotion_destinations - # @return [::Array<::Google::Shopping::Type::Destination::DestinationEnum>] - # Required. The list of destinations (also known as [Marketing - # methods](https://support.google.com/merchants/answer/15130232)) where the - # promotion applies to. If you don't specify a destination by including a - # supported value in your data source, your promotion will display in - # Shopping ads and free listings by default. - # - # You may have previously submitted the following values as destinations for - # your products: Shopping Actions, Surfaces across Google, Local surfaces - # across Google. To represent these values use `FREE_LISTINGS`, - # `FREE_LOCAL_LISTINGS`, `LOCAL_INVENTORY_ADS`. For more details see - # [Promotion - # destination](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC) - # @!attribute [rw] item_id_inclusion - # @return [::Array<::String>] - # Optional. Product filter by [item - # ID](https://support.google.com/merchants/answer/13861565?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. The product filter attributes only applies when the - # products eligible for promotion product applicability - # `product_applicability` attribute is set to - # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). - # @!attribute [rw] brand_inclusion - # @return [::Array<::String>] - # Optional. Product filter by brand for the promotion. The product filter - # attributes only applies when the products eligible for promotion product - # applicability `product_applicability` attribute is set to - # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). - # @!attribute [rw] item_group_id_inclusion - # @return [::Array<::String>] - # Optional. Product filter by item group ID for the promotion. The product - # filter attributes only applies when the products eligible for promotion - # product applicability [product_applicability] attribute is set to - # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). - # @!attribute [rw] product_type_inclusion - # @return [::Array<::String>] - # Optional. Product filter by product type for the promotion. The product - # filter attributes only applies when the products eligible for promotion - # product applicability `product_applicability` attribute is set to - # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). - # @!attribute [rw] item_id_exclusion - # @return [::Array<::String>] - # Optional. Product filter by [item ID - # exclusion](https://support.google.com/merchants/answer/13863524?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. The product filter attributes only applies when the - # products eligible for promotion product applicability - # `product_applicability` attribute is set to - # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). - # @!attribute [rw] brand_exclusion - # @return [::Array<::String>] - # Optional. Product filter by [brand - # exclusion](https://support.google.com/merchants/answer/13861679?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. The product filter attributes only applies when the - # products eligible for promotion product applicability - # `product_applicability` attribute is set to - # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). - # @!attribute [rw] item_group_id_exclusion - # @return [::Array<::String>] - # Optional. Product filter by [item group - # ID](https://support.google.com/merchants/answer/13837298?ref_topic=13773355&sjid=17642868584668136159-NC). - # The product filter attributes only applies when the products eligible for - # promotion product applicability `product_applicability` attribute is set to - # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). - # exclusion for the promotion. - # @!attribute [rw] product_type_exclusion - # @return [::Array<::String>] - # Optional. Product filter by [product type - # exclusion](https://support.google.com/merchants/answer/13863746?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. The product filter attributes only applies when the - # products eligible for promotion product applicability - # `product_applicability` attribute is set to - # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). - # @!attribute [rw] minimum_purchase_amount - # @return [::Google::Shopping::Type::Price] - # Optional. [Minimum purchase - # amount](https://support.google.com/merchants/answer/13837705?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. - # @!attribute [rw] minimum_purchase_quantity - # @return [::Integer] - # @!attribute [rw] limit_quantity - # @return [::Integer] - # Optional. [Maximum purchase - # quantity](https://support.google.com/merchants/answer/13861564?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. - # @!attribute [rw] limit_value - # @return [::Google::Shopping::Type::Price] - # Optional. [Maximum product - # price](https://support.google.com/merchants/answer/2906014) for - # promotion. - # @!attribute [rw] percent_off - # @return [::Integer] - # Optional. The [percentage - # discount](https://support.google.com/merchants/answer/13837404?sjid=17642868584668136159-NC) - # offered in the promotion. - # @!attribute [rw] money_off_amount - # @return [::Google::Shopping::Type::Price] - # Optional. The [money off - # amount](https://support.google.com/merchants/answer/13838101?ref_topic=13773355&sjid=17642868584668136159-NC) - # offered in the promotion. - # @!attribute [rw] get_this_quantity_discounted - # @return [::Integer] - # Optional. The number of items discounted in the promotion. The attribute is - # set when `couponValueType` is equal to `buy_m_get_n_money_off` or - # `buy_m_get_n_percent_off`. - # @!attribute [rw] free_gift_value - # @return [::Google::Shopping::Type::Price] - # Optional. [Free gift - # value](https://support.google.com/merchants/answer/13844477?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. - # @!attribute [rw] free_gift_description - # @return [::String] - # Optional. [Free gift - # description](https://support.google.com/merchants/answer/13847245?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. - # @!attribute [rw] free_gift_item_id - # @return [::String] - # Optional. [Free gift item - # ID](https://support.google.com/merchants/answer/13857152?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. - # @!attribute [rw] promotion_effective_time_period - # @return [::Google::Type::Interval] - # Required. `TimePeriod` representation of the promotion's effective dates. - # This attribute specifies that the promotion can be tested on your online - # store during this time period. - # @!attribute [rw] promotion_display_time_period - # @return [::Google::Type::Interval] - # Optional. `TimePeriod` representation of the promotion's display dates. - # This attribute specifies the date and time frame when the promotion will be - # live on Google.com and Shopping ads. If the display time period for - # promotion `promotion_display_time_period` attribute is not specified, the - # promotion effective time period `promotion_effective_time_period` - # determines the date and time frame when the promotion will be live on - # Google.com and Shopping ads. - # @!attribute [rw] store_applicability - # @return [::Google::Shopping::Merchant::Promotions::V1::StoreApplicability] - # Optional. Whether the promotion applies to [all stores, or only specified - # stores](https://support.google.com/merchants/answer/13857563?sjid=17642868584668136159-NC). - # Local Inventory ads promotions throw an error if no store applicability is - # included. An `INVALID_ARGUMENT` error is thrown if `store_applicability` is - # set to `ALL_STORES` and `store_codes_inclusion` or `score_code_exclusion` - # is set to a value. - # @!attribute [rw] store_codes_inclusion - # @return [::Array<::String>] - # Optional. [Store codes to - # include](https://support.google.com/merchants/answer/13857470?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. The store filter attributes only applies when the - # `store_applicability` attribute is set to - # [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC). - # - # 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] store_codes_exclusion - # @return [::Array<::String>] - # Optional. [Store codes to - # exclude](https://support.google.com/merchants/answer/13859586?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. The store filter attributes only applies when the - # `store_applicability` attribute is set to - # [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC). - # @!attribute [rw] promotion_url - # @return [::String] - # Optional. URL to the page on the merchant's site where the promotion shows. - # Local Inventory ads promotions throw an error if no `promotion_url` is - # included. URL is used to confirm that the promotion is valid and can be - # redeemed. - class Attributes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The status of the promotion. - # @!attribute [r] destination_statuses - # @return [::Array<::Google::Shopping::Merchant::Promotions::V1::PromotionStatus::DestinationStatus>] - # Output only. The intended destinations for the promotion. - # @!attribute [r] item_level_issues - # @return [::Array<::Google::Shopping::Merchant::Promotions::V1::PromotionStatus::ItemLevelIssue>] - # Output only. A list of issues associated with the promotion. - # @!attribute [r] creation_date - # @return [::Google::Protobuf::Timestamp] - # Output only. Date on which the promotion has been created - # in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, - # and offset, for example `2020-01-02T09:00:00+01:00` or - # `2020-01-02T09:00:00Z` - # @!attribute [r] last_update_date - # @return [::Google::Protobuf::Timestamp] - # Output only. Date on which the promotion status has been last updated - # in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, - # and offset, for example `2020-01-02T09:00:00+01:00` or - # `2020-01-02T09:00:00Z` - class PromotionStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The status for the specified destination. - # @!attribute [r] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # Output only. The name of the promotion destination. - # @!attribute [r] status - # @return [::Google::Shopping::Merchant::Promotions::V1::PromotionStatus::DestinationStatus::State] - # Output only. The status for the specified destination. - class DestinationStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The current state of the promotion. - module State - # Unknown promotion state. - STATE_UNSPECIFIED = 0 - - # The promotion is under review. - IN_REVIEW = 1 - - # The promotion is disapproved. - REJECTED = 2 - - # The promotion is approved and active. - LIVE = 3 - - # The promotion is stopped by merchant. - STOPPED = 4 - - # The promotion is no longer active. - EXPIRED = 5 - - # The promotion is not stopped, and all reviews are approved, but the - # active date is in the future. - PENDING = 6 - end - end - - # The issue associated with the promotion. - # @!attribute [r] code - # @return [::String] - # Output only. The error code of the issue. - # @!attribute [r] severity - # @return [::Google::Shopping::Merchant::Promotions::V1::PromotionStatus::ItemLevelIssue::Severity] - # Output only. How this issue affects serving of the promotion. - # @!attribute [r] resolution - # @return [::String] - # Output only. Whether the issue can be resolved by the merchant. - # @!attribute [r] attribute - # @return [::String] - # Output only. The attribute's name, if the issue is caused by a single - # attribute. - # @!attribute [r] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # Output only. The destination the issue applies to. - # @!attribute [r] description - # @return [::String] - # Output only. A short issue description in English. - # @!attribute [r] detail - # @return [::String] - # Output only. A detailed issue description in English. - # @!attribute [r] documentation - # @return [::String] - # Output only. The URL of a web page to help with resolving this issue. - # @!attribute [r] applicable_countries - # @return [::Array<::String>] - # Output only. List of country codes (ISO 3166-1 alpha-2) where issue - # applies to the offer. - class ItemLevelIssue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The severity of the issue. - module Severity - # Not specified. - SEVERITY_UNSPECIFIED = 0 - - # This issue represents a warning and does not have a direct affect - # on the promotion. - NOT_IMPACTED = 1 - - # The promotion is demoted and most likely have limited performance - # in search results - DEMOTED = 2 - - # Issue disapproves the promotion. - DISAPPROVED = 3 - end - end - end - - # Which product or list of products the promotion applies to. - module ProductApplicability - # Which products the promotion applies to is unknown. - PRODUCT_APPLICABILITY_UNSPECIFIED = 0 - - # Applicable to all products. - ALL_PRODUCTS = 1 - - # Applicable to only a single product or list of products. - SPECIFIC_PRODUCTS = 2 - end - - # Store codes or list of store codes the promotion applies to. Only for - # Local inventory ads promotions. - module StoreApplicability - # Which store codes the promotion applies to is unknown. - STORE_APPLICABILITY_UNSPECIFIED = 0 - - # Promotion applies to all stores. - ALL_STORES = 1 - - # Promotion applies to only the specified stores. - SPECIFIC_STORES = 2 - end - - # Offer type of a promotion. - module OfferType - # Unknown offer type. - OFFER_TYPE_UNSPECIFIED = 0 - - # Offer type without a code. - NO_CODE = 1 - - # Offer type with a code. Generic redemption code for the promotion is - # required when `offerType` = `GENERIC_CODE`. - GENERIC_CODE = 2 - end - - # Channel of a promotion. - module RedemptionChannel - # Indicates that the channel is unspecified. - REDEMPTION_CHANNEL_UNSPECIFIED = 0 - - # Indicates that the channel is in store. - # This is same as `local` channel used for `products`. - IN_STORE = 1 - - # Indicates that the channel is online. - ONLINE = 2 - end - - # [Coupon value - # type](https://support.google.com/merchants/answer/13861986) - # of a promotion. - module CouponValueType - # Indicates that the coupon value type is unspecified. - COUPON_VALUE_TYPE_UNSPECIFIED = 0 - - # Money off coupon value type. - MONEY_OFF = 1 - - # Percent off coupon value type. - PERCENT_OFF = 2 - - # Buy M quantity, get N money off coupon value type. - # `minimum_purchase_quantity` and `get_this_quantity_discounted` must be - # present. `money_off_amount` must also be present. - BUY_M_GET_N_MONEY_OFF = 3 - - # Buy M quantity, get N percent off coupon value type. - # `minimum_purchase_quantity` and `get_this_quantity_discounted` must be - # present. `percent_off_percentage` must also be present. - BUY_M_GET_N_PERCENT_OFF = 4 - - # Buy M quantity, get money off. `minimum_purchase_quantity` and - # `money_off_amount` must be present. - BUY_M_GET_MONEY_OFF = 5 - - # Buy M quantity, get money off. `minimum_purchase_quantity` and - # `percent_off_percentage` must be present. - BUY_M_GET_PERCENT_OFF = 6 - - # Free gift with description only. - FREE_GIFT = 7 - - # Free gift with monetary value. - FREE_GIFT_WITH_VALUE = 8 - - # Free gift with item ID. - FREE_GIFT_WITH_ITEM_ID = 9 - - # Standard free shipping coupon value type. Only available for online - # promotions. - FREE_SHIPPING_STANDARD = 10 - - # Overnight free shipping coupon value type. Only available for online - # promotions. - FREE_SHIPPING_OVERNIGHT = 11 - - # Two day free shipping coupon value type. Only available for online - # promotions. - FREE_SHIPPING_TWO_DAY = 12 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1/proto_docs/google/type/interval.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/type/interval.rb deleted file mode 100644 index 9350ca479005..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/Gemfile deleted file mode 100644 index 17fb138bc4f5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1", path: "../" -else - gem "google-shopping-merchant-promotions-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-promotions-v1/snippets/promotions_service/get_promotion.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/get_promotion.rb deleted file mode 100644 index b1c409c4e3f9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/get_promotion.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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_PromotionsService_GetPromotion_sync] -require "google/shopping/merchant/promotions/v1" - -## -# Snippet for the get_promotion call in the PromotionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#get_promotion. -# -def get_promotion - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.new - - # Call the get_promotion method. - result = client.get_promotion request - - # The returned object is of type Google::Shopping::Merchant::Promotions::V1::Promotion. - p result -end -# [END merchantapi_v1_generated_PromotionsService_GetPromotion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/insert_promotion.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/insert_promotion.rb deleted file mode 100644 index 542d86aa9afd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/insert_promotion.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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_PromotionsService_InsertPromotion_sync] -require "google/shopping/merchant/promotions/v1" - -## -# Snippet for the insert_promotion call in the PromotionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#insert_promotion. -# -def insert_promotion - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new - - # Call the insert_promotion method. - result = client.insert_promotion request - - # The returned object is of type Google::Shopping::Merchant::Promotions::V1::Promotion. - p result -end -# [END merchantapi_v1_generated_PromotionsService_InsertPromotion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/list_promotions.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/list_promotions.rb deleted file mode 100644 index 4a4bfe6a3cc5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/promotions_service/list_promotions.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_PromotionsService_ListPromotions_sync] -require "google/shopping/merchant/promotions/v1" - -## -# Snippet for the list_promotions call in the PromotionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#list_promotions. -# -def list_promotions - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.new - - # Call the list_promotions method. - result = client.list_promotions request - - # The returned object is of type Gapic::PagedEnumerable. You can 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::Promotions::V1::Promotion. - p item - end -end -# [END merchantapi_v1_generated_PromotionsService_ListPromotions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/snippet_metadata_google.shopping.merchant.promotions.v1.json b/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/snippet_metadata_google.shopping.merchant.promotions.v1.json deleted file mode 100644 index a8848c79a929..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/snippets/snippet_metadata_google.shopping.merchant.promotions.v1.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-promotions-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.promotions.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1_generated_PromotionsService_InsertPromotion_sync", - "title": "Snippet for the insert_promotion call in the PromotionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#insert_promotion.", - "file": "promotions_service/insert_promotion.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_promotion", - "full_name": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#insert_promotion", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Promotions::V1::Promotion", - "client": { - "short_name": "PromotionsService::Client", - "full_name": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client" - }, - "method": { - "short_name": "InsertPromotion", - "full_name": "google.shopping.merchant.promotions.v1.PromotionsService.InsertPromotion", - "service": { - "short_name": "PromotionsService", - "full_name": "google.shopping.merchant.promotions.v1.PromotionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_PromotionsService_GetPromotion_sync", - "title": "Snippet for the get_promotion call in the PromotionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#get_promotion.", - "file": "promotions_service/get_promotion.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_promotion", - "full_name": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#get_promotion", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Promotions::V1::Promotion", - "client": { - "short_name": "PromotionsService::Client", - "full_name": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client" - }, - "method": { - "short_name": "GetPromotion", - "full_name": "google.shopping.merchant.promotions.v1.PromotionsService.GetPromotion", - "service": { - "short_name": "PromotionsService", - "full_name": "google.shopping.merchant.promotions.v1.PromotionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_PromotionsService_ListPromotions_sync", - "title": "Snippet for the list_promotions call in the PromotionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#list_promotions.", - "file": "promotions_service/list_promotions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_promotions", - "full_name": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client#list_promotions", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Promotions::V1::ListPromotionsResponse", - "client": { - "short_name": "PromotionsService::Client", - "full_name": "::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client" - }, - "method": { - "short_name": "ListPromotions", - "full_name": "google.shopping.merchant.promotions.v1.PromotionsService.ListPromotions", - "service": { - "short_name": "PromotionsService", - "full_name": "google.shopping.merchant.promotions.v1.PromotionsService" - } - } - }, - "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-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_paths_test.rb deleted file mode 100644 index a6226b082804..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_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/promotions/v1/promotions_service" - -class ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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_promotion_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::Promotions::V1::PromotionsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.promotion_path account: "value0", promotion: "value1" - assert_equal "accounts/value0/promotions/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_rest_test.rb deleted file mode 100644 index 873f2adddb0c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_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/merchant/promotions/v1/promotions_pb" -require "google/shopping/merchant/promotions/v1/promotions_service/rest" - - -class ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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_promotion - # Create test objects. - client_result = ::Google::Shopping::Merchant::Promotions::V1::Promotion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - promotion = {} - data_source = "hello world" - - insert_promotion_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::ServiceStub.stub :transcode_insert_promotion_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_promotion_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.insert_promotion({ parent: parent, promotion: promotion, data_source: data_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.insert_promotion parent: parent, promotion: promotion, data_source: data_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.insert_promotion ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new(parent: parent, promotion: promotion, data_source: data_source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.insert_promotion({ parent: parent, promotion: promotion, data_source: data_source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.insert_promotion(::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new(parent: parent, promotion: promotion, data_source: data_source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_promotion_client_stub.call_count - end - end - end - - def test_get_promotion - # Create test objects. - client_result = ::Google::Shopping::Merchant::Promotions::V1::Promotion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_promotion_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::ServiceStub.stub :transcode_get_promotion_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_promotion_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_promotion({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_promotion name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_promotion ::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_promotion({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_promotion(::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_promotion_client_stub.call_count - end - end - end - - def test_list_promotions - # Create test objects. - client_result = ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsResponse.new - http_response = OpenStruct.new 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_promotions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::ServiceStub.stub :transcode_list_promotions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_promotions_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_promotions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_promotions parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_promotions ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.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 - c.list_promotions({ 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 - c.list_promotions(::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.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_promotions_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::Promotions::V1::PromotionsService::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::Promotions::V1::PromotionsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_test.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_test.rb deleted file mode 100644 index 448c5a90531c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/test/google/shopping/merchant/promotions/v1/promotions_service_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/promotions/v1/promotions_pb" -require "google/shopping/merchant/promotions/v1/promotions_service" - -class ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::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_promotion - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Promotions::V1::Promotion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - promotion = {} - data_source = "hello world" - - insert_promotion_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_promotion, name - assert_kind_of ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Promotions::V1::Promotion), request["promotion"] - assert_equal "hello world", request["data_source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_promotion_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.insert_promotion({ parent: parent, promotion: promotion, data_source: data_source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.insert_promotion parent: parent, promotion: promotion, data_source: data_source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.insert_promotion ::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new(parent: parent, promotion: promotion, data_source: data_source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.insert_promotion({ parent: parent, promotion: promotion, 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 - c.insert_promotion(::Google::Shopping::Merchant::Promotions::V1::InsertPromotionRequest.new(parent: parent, promotion: promotion, 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, insert_promotion_client_stub.call_rpc_count - end - end - - def test_get_promotion - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Promotions::V1::Promotion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_promotion_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_promotion, name - assert_kind_of ::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_promotion_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_promotion({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_promotion name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_promotion ::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_promotion({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_promotion(::Google::Shopping::Merchant::Promotions::V1::GetPromotionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_promotion_client_stub.call_rpc_count - end - end - - def test_list_promotions - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_promotions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_promotions, name - assert_kind_of ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest, 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_promotions_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_promotions({ parent: parent, page_size: page_size, page_token: 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 - c.list_promotions parent: parent, page_size: page_size, page_token: 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 - c.list_promotions ::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.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 - c.list_promotions({ 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 - c.list_promotions(::Google::Shopping::Merchant::Promotions::V1::ListPromotionsRequest.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_promotions_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::Promotions::V1::PromotionsService::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::Promotions::V1::PromotionsService::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::Promotions::V1::PromotionsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -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-promotions-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -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-promotions-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.repo-metadata.json deleted file mode 100644 index 2fa9cbe28259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta", - "distribution_name": "google-shopping-merchant-promotions-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-promotions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-promotions 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-promotions-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.rubocop.yml deleted file mode 100644 index ce1351ccf70b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-promotions-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-promotions-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/AUTHENTICATION.md deleted file mode 100644 index a022c9c4d685..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-promotions-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-promotions-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/promotions/v1beta" - -client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::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/promotions/v1beta" - -::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::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-promotions-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/promotions/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::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-promotions-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/Gemfile +++ /dev/null @@ -1,15 +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-reporters", "~> 1.8.0", require: false -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-promotions-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/README.md deleted file mode 100644 index ebf83aefe16e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions](https://rubygems.org/gems/google-shopping-merchant-promotions). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-promotions-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/promotions/v1beta" - -client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new -request = ::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest.new # (request fields as keyword arguments...) -response = client.insert_promotion request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-promotions-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/promotions/v1beta" -require "logger" - -client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::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.2+. - -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-promotions`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-promotions-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-promotions`. -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-promotions-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-promotions-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/Rakefile deleted file mode 100644 index e317bc9466c7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-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/promotions/v1beta/promotions_service/credentials" - ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::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-promotions-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-promotions-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-promotions-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-promotions-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-promotions-v1beta" - header "google-shopping-merchant-promotions-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-promotions-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-promotions-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-promotions-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-promotions-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-promotions-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/gapic_metadata.json deleted file mode 100644 index 2b4a40a14e12..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/gapic_metadata.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.promotions.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::Promotions::V1beta", - "services": { - "PromotionsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client", - "rpcs": { - "InsertPromotion": { - "methods": [ - "insert_promotion" - ] - }, - "GetPromotion": { - "methods": [ - "get_promotion" - ] - }, - "ListPromotions": { - "methods": [ - "list_promotions" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/google-shopping-merchant-promotions-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/google-shopping-merchant-promotions-v1beta.gemspec deleted file mode 100644 index a7410133a2e3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/google-shopping-merchant-promotions-v1beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/promotions/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-promotions-v1beta" - gem.version = Google::Shopping::Merchant::Promotions::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-promotions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-promotions 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.3" - 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-promotions-v1beta/lib/google-shopping-merchant-promotions-v1beta.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google-shopping-merchant-promotions-v1beta.rb deleted file mode 100644 index c10f79fc005e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google-shopping-merchant-promotions-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/promotions/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta.rb deleted file mode 100644 index dfaeefd3dd24..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/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/promotions/v1beta/promotions_service" -require "google/shopping/merchant/promotions/v1beta/version" - -module Google - module Shopping - module Merchant - module Promotions - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/promotions/v1beta" - # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/promotions/v1beta" - # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/promotions/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_common_pb.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_common_pb.rb deleted file mode 100644 index 655f3c9d98c3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_common_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/promotions/v1beta/promotions_common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' -require 'google/shopping/type/types_pb' -require 'google/type/interval_pb' - - -descriptor_data = "\nBgoogle/shopping/merchant/promotions/v1beta/promotions_common.proto\x12*google.shopping.merchant.promotions.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/interval.proto\"\xd5\x0b\n\nAttributes\x12\x64\n\x15product_applicability\x18\x01 \x01(\x0e\x32@.google.shopping.merchant.promotions.v1beta.ProductApplicabilityB\x03\xe0\x41\x02\x12N\n\noffer_type\x18\x02 \x01(\x0e\x32\x35.google.shopping.merchant.promotions.v1beta.OfferTypeB\x03\xe0\x41\x02\x12$\n\x17generic_redemption_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nlong_title\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12[\n\x11\x63oupon_value_type\x18\x05 \x01(\x0e\x32;.google.shopping.merchant.promotions.v1beta.CouponValueTypeB\x03\xe0\x41\x02\x12V\n\x16promotion_destinations\x18\x06 \x03(\x0e\x32\x31.google.shopping.type.Destination.DestinationEnumB\x03\xe0\x41\x02\x12\x1e\n\x11item_id_inclusion\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62rand_inclusion\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12$\n\x17item_group_id_inclusion\x18\t \x03(\tB\x03\xe0\x41\x01\x12#\n\x16product_type_inclusion\x18\n \x03(\tB\x03\xe0\x41\x01\x12\x1e\n\x11item_id_exclusion\x18\x0b \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62rand_exclusion\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12$\n\x17item_group_id_exclusion\x18\r \x03(\tB\x03\xe0\x41\x01\x12#\n\x16product_type_exclusion\x18\x0e \x03(\tB\x03\xe0\x41\x01\x12\x41\n\x17minimum_purchase_amount\x18\x0f \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12&\n\x19minimum_purchase_quantity\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1b\n\x0elimit_quantity\x18\x11 \x01(\x03\x42\x03\xe0\x41\x01\x12\x35\n\x0blimit_value\x18\x12 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\x18\n\x0bpercent_off\x18\x13 \x01(\x03\x42\x03\xe0\x41\x01\x12:\n\x10money_off_amount\x18\x14 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12)\n\x1cget_this_quantity_discounted\x18\x15 \x01(\x03\x42\x03\xe0\x41\x01\x12\x39\n\x0f\x66ree_gift_value\x18\x16 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01\x12\"\n\x15\x66ree_gift_description\x18\x17 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x66ree_gift_item_id\x18\x18 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x1fpromotion_effective_time_period\x18\x19 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x02\x12\x41\n\x1dpromotion_display_time_period\x18\x1a \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\x12`\n\x13store_applicability\x18\x1c \x01(\x0e\x32>.google.shopping.merchant.promotions.v1beta.StoreApplicabilityB\x03\xe0\x41\x01\x12\"\n\x15store_codes_inclusion\x18\x1d \x03(\tB\x03\xe0\x41\x01\x12\"\n\x15store_codes_exclusion\x18\x1e \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\rpromotion_url\x18\x1f \x01(\tB\x03\xe0\x41\x01\"\x91\t\n\x0fPromotionStatus\x12p\n\x14\x64\x65stination_statuses\x18\x01 \x03(\x0b\x32M.google.shopping.merchant.promotions.v1beta.PromotionStatus.DestinationStatusB\x03\xe0\x41\x03\x12j\n\x11item_level_issues\x18\x02 \x03(\x0b\x32J.google.shopping.merchant.promotions.v1beta.PromotionStatus.ItemLevelIssueB\x03\xe0\x41\x03\x12\x36\n\rcreation_date\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_update_date\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\xc8\x02\n\x11\x44\x65stinationStatus\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x12h\n\x06status\x18\x02 \x01(\x0e\x32S.google.shopping.merchant.promotions.v1beta.PromotionStatus.DestinationStatus.StateB\x03\xe0\x41\x03\"l\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tIN_REVIEW\x10\x01\x12\x0c\n\x08REJECTED\x10\x02\x12\x08\n\x04LIVE\x10\x03\x12\x0b\n\x07STOPPED\x10\x04\x12\x0b\n\x07\x45XPIRED\x10\x05\x12\x0b\n\x07PENDING\x10\x06\x1a\xe1\x03\n\x0eItemLevelIssue\x12\x11\n\x04\x63ode\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12j\n\x08severity\x18\x02 \x01(\x0e\x32S.google.shopping.merchant.promotions.v1beta.PromotionStatus.ItemLevelIssue.SeverityB\x03\xe0\x41\x03\x12\x17\n\nresolution\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tattribute\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12[\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rdocumentation\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12!\n\x14\x61pplicable_countries\x18\t \x03(\tB\x03\xe0\x41\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*f\n\x14ProductApplicability\x12%\n!PRODUCT_APPLICABILITY_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41LL_PRODUCTS\x10\x01\x12\x15\n\x11SPECIFIC_PRODUCTS\x10\x02*^\n\x12StoreApplicability\x12#\n\x1fSTORE_APPLICABILITY_UNSPECIFIED\x10\x00\x12\x0e\n\nALL_STORES\x10\x01\x12\x13\n\x0fSPECIFIC_STORES\x10\x02*F\n\tOfferType\x12\x1a\n\x16OFFER_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07NO_CODE\x10\x01\x12\x10\n\x0cGENERIC_CODE\x10\x02*Q\n\x11RedemptionChannel\x12\"\n\x1eREDEMPTION_CHANNEL_UNSPECIFIED\x10\x00\x12\x0c\n\x08IN_STORE\x10\x01\x12\n\n\x06ONLINE\x10\x02*\xd9\x02\n\x0f\x43ouponValueType\x12!\n\x1d\x43OUPON_VALUE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tMONEY_OFF\x10\x01\x12\x0f\n\x0bPERCENT_OFF\x10\x02\x12\x19\n\x15\x42UY_M_GET_N_MONEY_OFF\x10\x03\x12\x1b\n\x17\x42UY_M_GET_N_PERCENT_OFF\x10\x04\x12\x17\n\x13\x42UY_M_GET_MONEY_OFF\x10\x05\x12\x19\n\x15\x42UY_M_GET_PERCENT_OFF\x10\x06\x12\r\n\tFREE_GIFT\x10\x07\x12\x18\n\x14\x46REE_GIFT_WITH_VALUE\x10\x08\x12\x1a\n\x16\x46REE_GIFT_WITH_ITEM_ID\x10\t\x12\x1a\n\x16\x46REE_SHIPPING_STANDARD\x10\n\x12\x1b\n\x17\x46REE_SHIPPING_OVERNIGHT\x10\x0b\x12\x19\n\x15\x46REE_SHIPPING_TWO_DAY\x10\x0c\x42\x9f\x01\n.com.google.shopping.merchant.promotions.v1betaB\x15PromotionsCommonProtoP\x01ZTcloud.google.com/go/shopping/merchant/promotions/apiv1beta/promotionspb;promotionspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Promotions - module V1beta - Attributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.Attributes").msgclass - PromotionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.PromotionStatus").msgclass - PromotionStatus::DestinationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.PromotionStatus.DestinationStatus").msgclass - PromotionStatus::DestinationStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.PromotionStatus.DestinationStatus.State").enummodule - PromotionStatus::ItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.PromotionStatus.ItemLevelIssue").msgclass - PromotionStatus::ItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.PromotionStatus.ItemLevelIssue.Severity").enummodule - ProductApplicability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.ProductApplicability").enummodule - StoreApplicability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.StoreApplicability").enummodule - OfferType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.OfferType").enummodule - RedemptionChannel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.RedemptionChannel").enummodule - CouponValueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.CouponValueType").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_pb.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_pb.rb deleted file mode 100644 index 76a9a9d3591f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_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/promotions/v1beta/promotions.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/promotions/v1beta/promotions_common_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n;google/shopping/merchant/promotions/v1beta/promotions.proto\x12*google.shopping.merchant.promotions.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x42google/shopping/merchant/promotions/v1beta/promotions_common.proto\x1a google/shopping/type/types.proto\"\x85\x05\n\tPromotion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0cpromotion_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1d\n\x10\x63ontent_language\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0etarget_country\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12^\n\x12redemption_channel\x18\x05 \x03(\x0e\x32=.google.shopping.merchant.promotions.v1beta.RedemptionChannelB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12O\n\nattributes\x18\x07 \x01(\x0b\x32\x36.google.shopping.merchant.promotions.v1beta.AttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\x08 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01\x12Z\n\x10promotion_status\x18\t \x01(\x0b\x32;.google.shopping.merchant.promotions.v1beta.PromotionStatusB\x03\xe0\x41\x03\x12 \n\x0eversion_number\x18\n \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01:k\xea\x41h\n$merchantapi.googleapis.com/Promotion\x12)accounts/{account}/promotions/{promotion}*\npromotions2\tpromotionB\x11\n\x0f_version_number\"\x96\x01\n\x16InsertPromotionRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12M\n\tpromotion\x18\x02 \x01(\x0b\x32\x35.google.shopping.merchant.promotions.v1beta.PromotionB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"Q\n\x13GetPromotionRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$merchantapi.googleapis.com/Promotion\"]\n\x15ListPromotionsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x03\"|\n\x16ListPromotionsResponse\x12I\n\npromotions\x18\x01 \x03(\x0b\x32\x35.google.shopping.merchant.promotions.v1beta.Promotion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xd9\x05\n\x11PromotionsService\x12\xd1\x01\n\x0fInsertPromotion\x12\x42.google.shopping.merchant.promotions.v1beta.InsertPromotionRequest\x1a\x35.google.shopping.merchant.promotions.v1beta.Promotion\"C\x82\xd3\xe4\x93\x02=\"8/promotions/v1beta/{parent=accounts/*}/promotions:insert:\x01*\x12\xc8\x01\n\x0cGetPromotion\x12?.google.shopping.merchant.promotions.v1beta.GetPromotionRequest\x1a\x35.google.shopping.merchant.promotions.v1beta.Promotion\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/promotions/v1beta/{name=accounts/*/promotions/*}\x12\xdb\x01\n\x0eListPromotions\x12\x41.google.shopping.merchant.promotions.v1beta.ListPromotionsRequest\x1a\x42.google.shopping.merchant.promotions.v1beta.ListPromotionsResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/promotions/v1beta/{parent=accounts/*}/promotions\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xd4\x01\n.com.google.shopping.merchant.promotions.v1betaB\x0fPromotionsProtoP\x01ZTcloud.google.com/go/shopping/merchant/promotions/apiv1beta/promotionspb;promotionspb\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 Promotions - module V1beta - Promotion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.Promotion").msgclass - InsertPromotionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.InsertPromotionRequest").msgclass - GetPromotionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.GetPromotionRequest").msgclass - ListPromotionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.ListPromotionsRequest").msgclass - ListPromotionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.promotions.v1beta.ListPromotionsResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service.rb deleted file mode 100644 index 5228821b12f3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_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/promotions/v1beta/version" - -require "google/shopping/merchant/promotions/v1beta/promotions_service/credentials" -require "google/shopping/merchant/promotions/v1beta/promotions_service/paths" -require "google/shopping/merchant/promotions/v1beta/promotions_service/client" -require "google/shopping/merchant/promotions/v1beta/promotions_service/rest" - -module Google - module Shopping - module Merchant - module Promotions - module V1beta - ## - # Service to manage promotions for products. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/promotions/v1beta/promotions_service" - # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/promotions/v1beta/promotions_service/rest" - # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new - # - module PromotionsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "promotions_service", "helpers.rb" -require "google/shopping/merchant/promotions/v1beta/promotions_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/client.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/client.rb deleted file mode 100644 index f1d506169661..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/client.rb +++ /dev/null @@ -1,692 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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/promotions/v1beta/promotions_pb" - -module Google - module Shopping - module Merchant - module Promotions - module V1beta - module PromotionsService - ## - # Client for the PromotionsService service. - # - # Service to manage promotions for products. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :promotions_service_stub - - ## - # Configure the PromotionsService Client class. - # - # See {::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PromotionsService clients - # ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.configure do |config| - # config.timeout = 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", "Promotions", "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 PromotionsService Client instance. - # - # The configuration is set to the derived mode, meaning that values 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::Promotions::V1beta::PromotionsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @promotions_service_stub.universe_domain - end - - ## - # Create a new PromotionsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PromotionsService 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/promotions/v1beta/promotions_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 - - @promotions_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @promotions_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 - @promotions_service_stub.logger - end - - # Service calls - - ## - # Inserts a promotion for your Merchant Center account. If the promotion - # already exists, then it updates the promotion instead. - # - # @overload insert_promotion(request, options = nil) - # Pass arguments to `insert_promotion` via a request object, either of type - # {::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_promotion(parent: nil, promotion: nil, data_source: nil) - # Pass arguments to `insert_promotion` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 the promotion will be inserted. - # Format: accounts/\\{account} - # @param promotion [::Google::Shopping::Merchant::Promotions::V1beta::Promotion, ::Hash] - # Required. The promotion to insert. - # @param data_source [::String] - # Required. The data source of the - # [promotion](https://support.google.com/merchants/answer/6396268?sjid=5155774230887277618-NC) - # Format: - # `accounts/{account}/dataSources/{datasource}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/promotions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest.new - # - # # Call the insert_promotion method. - # result = client.insert_promotion request - # - # # The returned object is of type Google::Shopping::Merchant::Promotions::V1beta::Promotion. - # p result - # - def insert_promotion request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest - - # Converts hash and nil to 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_promotion.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Promotions::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_promotion.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_promotion.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @promotions_service_stub.call_rpc :insert_promotion, request, 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 promotion from your Merchant Center account. - # - # After inserting or updating a promotion input, it may take several - # minutes before the updated promotion can be retrieved. - # - # @overload get_promotion(request, options = nil) - # Pass arguments to `get_promotion` via a request object, either of type - # {::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_promotion(name: nil) - # Pass arguments to `get_promotion` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the promotion to retrieve. - # Format: `accounts/{account}/promotions/{promotions}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/promotions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest.new - # - # # Call the get_promotion method. - # result = client.get_promotion request - # - # # The returned object is of type Google::Shopping::Merchant::Promotions::V1beta::Promotion. - # p result - # - def get_promotion request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_promotion.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Promotions::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_promotion.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_promotion.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @promotions_service_stub.call_rpc :get_promotion, request, 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 promotions in your Merchant 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 or updating a promotion, it may take several minutes before - # the updated processed promotion can be retrieved. - # - # @overload list_promotions(request, options = nil) - # Pass arguments to `list_promotions` via a request object, either of type - # {::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_promotions(parent: nil) - # Pass arguments to `list_promotions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 processed promotions for. - # Format: `accounts/{account}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Promotions::V1beta::Promotion>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Promotions::V1beta::Promotion>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/promotions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest.new - # - # # Call the list_promotions method. - # result = client.list_promotions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can 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::Promotions::V1beta::Promotion. - # p item - # end - # - def list_promotions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_promotions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Promotions::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_promotions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_promotions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @promotions_service_stub.call_rpc :list_promotions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @promotions_service_stub, :list_promotions, request, response, 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 PromotionsService API. - # - # This class represents the configuration for PromotionsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_promotion to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_promotion.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_promotion.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::Promotions::V1beta::PromotionsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the PromotionsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `insert_promotion` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_promotion - ## - # RPC-specific configuration for `get_promotion` - # @return [::Gapic::Config::Method] - # - attr_reader :get_promotion - ## - # RPC-specific configuration for `list_promotions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_promotions - - # @private - def initialize parent_rpcs = nil - insert_promotion_config = parent_rpcs.insert_promotion if parent_rpcs.respond_to? :insert_promotion - @insert_promotion = ::Gapic::Config::Method.new insert_promotion_config - get_promotion_config = parent_rpcs.get_promotion if parent_rpcs.respond_to? :get_promotion - @get_promotion = ::Gapic::Config::Method.new get_promotion_config - list_promotions_config = parent_rpcs.list_promotions if parent_rpcs.respond_to? :list_promotions - @list_promotions = ::Gapic::Config::Method.new list_promotions_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-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/credentials.rb deleted file mode 100644 index eebde160342e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_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 Promotions - module V1beta - module PromotionsService - # Credentials for the PromotionsService 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-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/paths.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/paths.rb deleted file mode 100644 index 19c1177beb9f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_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 Promotions - module V1beta - module PromotionsService - # Path helper methods for the PromotionsService API. - module Paths - ## - # Create a fully-qualified Promotion resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/promotions/{promotion}` - # - # @param account [String] - # @param promotion [String] - # - # @return [::String] - def promotion_path account:, promotion: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/promotions/#{promotion}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest.rb deleted file mode 100644 index 3877791112d1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_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/promotions/v1beta/version" - -require "google/shopping/merchant/promotions/v1beta/promotions_service/credentials" -require "google/shopping/merchant/promotions/v1beta/promotions_service/paths" -require "google/shopping/merchant/promotions/v1beta/promotions_service/rest/client" - -module Google - module Shopping - module Merchant - module Promotions - module V1beta - ## - # Service to manage promotions for products. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/promotions/v1beta/promotions_service/rest" - # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new - # - module PromotionsService - # 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/promotions/v1beta/promotions_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/client.rb deleted file mode 100644 index ae1bd17618d9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/client.rb +++ /dev/null @@ -1,628 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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/promotions/v1beta/promotions_pb" -require "google/shopping/merchant/promotions/v1beta/promotions_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Promotions - module V1beta - module PromotionsService - module Rest - ## - # REST client for the PromotionsService service. - # - # Service to manage promotions for products. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :promotions_service_stub - - ## - # Configure the PromotionsService Client class. - # - # See {::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PromotionsService clients - # ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::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", "Promotions", "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 PromotionsService Client instance. - # - # The configuration is set to the derived mode, meaning that values 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::Promotions::V1beta::PromotionsService::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 - @promotions_service_stub.universe_domain - end - - ## - # Create a new PromotionsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PromotionsService 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 - - @promotions_service_stub = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @promotions_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 - @promotions_service_stub.logger - end - - # Service calls - - ## - # Inserts a promotion for your Merchant Center account. If the promotion - # already exists, then it updates the promotion instead. - # - # @overload insert_promotion(request, options = nil) - # Pass arguments to `insert_promotion` via a request object, either of type - # {::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_promotion(parent: nil, promotion: nil, data_source: nil) - # Pass arguments to `insert_promotion` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 the promotion will be inserted. - # Format: accounts/\\{account} - # @param promotion [::Google::Shopping::Merchant::Promotions::V1beta::Promotion, ::Hash] - # Required. The promotion to insert. - # @param data_source [::String] - # Required. The data source of the - # [promotion](https://support.google.com/merchants/answer/6396268?sjid=5155774230887277618-NC) - # Format: - # `accounts/{account}/dataSources/{datasource}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/promotions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest.new - # - # # Call the insert_promotion method. - # result = client.insert_promotion request - # - # # The returned object is of type Google::Shopping::Merchant::Promotions::V1beta::Promotion. - # p result - # - def insert_promotion request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest - - # Converts hash and nil to an 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_promotion.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Promotions::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_promotion.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_promotion.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @promotions_service_stub.insert_promotion request, 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 promotion from your Merchant Center account. - # - # After inserting or updating a promotion input, it may take several - # minutes before the updated promotion can be retrieved. - # - # @overload get_promotion(request, options = nil) - # Pass arguments to `get_promotion` via a request object, either of type - # {::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_promotion(name: nil) - # Pass arguments to `get_promotion` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the promotion to retrieve. - # Format: `accounts/{account}/promotions/{promotions}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/promotions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest.new - # - # # Call the get_promotion method. - # result = client.get_promotion request - # - # # The returned object is of type Google::Shopping::Merchant::Promotions::V1beta::Promotion. - # p result - # - def get_promotion request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_promotion.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Promotions::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_promotion.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_promotion.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @promotions_service_stub.get_promotion request, 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 promotions in your Merchant 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 or updating a promotion, it may take several minutes before - # the updated processed promotion can be retrieved. - # - # @overload list_promotions(request, options = nil) - # Pass arguments to `list_promotions` via a request object, either of type - # {::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_promotions(parent: nil) - # Pass arguments to `list_promotions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 processed promotions for. - # Format: `accounts/{account}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Promotions::V1beta::Promotion>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Promotions::V1beta::Promotion>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/promotions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest.new - # - # # Call the list_promotions method. - # result = client.list_promotions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can 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::Promotions::V1beta::Promotion. - # p item - # end - # - def list_promotions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_promotions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Promotions::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_promotions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_promotions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @promotions_service_stub.list_promotions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @promotions_service_stub, :list_promotions, "promotions", request, result, 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 PromotionsService REST API. - # - # This class represents the configuration for PromotionsService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_promotion to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.insert_promotion.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.insert_promotion.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the PromotionsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `insert_promotion` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_promotion - ## - # RPC-specific configuration for `get_promotion` - # @return [::Gapic::Config::Method] - # - attr_reader :get_promotion - ## - # RPC-specific configuration for `list_promotions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_promotions - - # @private - def initialize parent_rpcs = nil - insert_promotion_config = parent_rpcs.insert_promotion if parent_rpcs.respond_to? :insert_promotion - @insert_promotion = ::Gapic::Config::Method.new insert_promotion_config - get_promotion_config = parent_rpcs.get_promotion if parent_rpcs.respond_to? :get_promotion - @get_promotion = ::Gapic::Config::Method.new get_promotion_config - list_promotions_config = parent_rpcs.list_promotions if parent_rpcs.respond_to? :list_promotions - @list_promotions = ::Gapic::Config::Method.new list_promotions_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-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/service_stub.rb deleted file mode 100644 index 8219c8fdf658..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_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/promotions/v1beta/promotions_pb" - -module Google - module Shopping - module Merchant - module Promotions - module V1beta - module PromotionsService - module Rest - ## - # REST service stub for the PromotionsService 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_promotion REST call - # - # @param request_pb [::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] - # A result object deserialized from the server's reply - def insert_promotion request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_promotion_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_promotion", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Promotions::V1beta::Promotion.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_promotion REST call - # - # @param request_pb [::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] - # A result object deserialized from the server's reply - def get_promotion request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_promotion_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_promotion", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Promotions::V1beta::Promotion.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_promotions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsResponse] - # A result object deserialized from the server's reply - def list_promotions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_promotions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_promotions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsResponse.decode_json response.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_promotion REST call - # - # @param request_pb [::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest] - # 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_promotion_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/promotions/v1beta/{parent}/promotions:insert", - body: "*", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_promotion REST call - # - # @param request_pb [::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_promotion_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/promotions/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/promotions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_promotions REST call - # - # @param request_pb [::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_promotions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/promotions/v1beta/{parent}/promotions", - 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-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_services_pb.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_services_pb.rb deleted file mode 100644 index 5065716b05be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_services_pb.rb +++ /dev/null @@ -1,60 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/promotions/v1beta/promotions.proto for package 'google.shopping.merchant.promotions.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/promotions/v1beta/promotions_pb' - -module Google - module Shopping - module Merchant - module Promotions - module V1beta - module PromotionsService - # Service to manage promotions for products. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.promotions.v1beta.PromotionsService' - - # Inserts a promotion for your Merchant Center account. If the promotion - # already exists, then it updates the promotion instead. - rpc :InsertPromotion, ::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest, ::Google::Shopping::Merchant::Promotions::V1beta::Promotion - # Retrieves the promotion from your Merchant Center account. - # - # After inserting or updating a promotion input, it may take several - # minutes before the updated promotion can be retrieved. - rpc :GetPromotion, ::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest, ::Google::Shopping::Merchant::Promotions::V1beta::Promotion - # Lists the promotions in your Merchant 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 or updating a promotion, it may take several minutes before - # the updated processed promotion can be retrieved. - rpc :ListPromotions, ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest, ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/rest.rb deleted file mode 100644 index ddbc997c4bc8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/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/promotions/v1beta/promotions_service/rest" -require "google/shopping/merchant/promotions/v1beta/version" - -module Google - module Shopping - module Merchant - module Promotions - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/promotions/v1beta/rest" - # client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/version.rb deleted file mode 100644 index 13c0b3364c69..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/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 Promotions - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/README.md deleted file mode 100644 index 03467a3756be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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. - # - # Note: This field should not be used in most cases. - 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. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # 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-promotions-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 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-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions.rb deleted file mode 100644 index 5589a80a6d2c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions.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 Promotions - module V1beta - # Represents a promotion. See the following articles for more details. - # - # Required promotion input attributes to pass data validation checks are - # primarily defined below: - # - # * [Promotions data - # specification](https://support.google.com/merchants/answer/2906014) - # * [Local promotions data - # specification](https://support.google.com/merchants/answer/10146130) - # - # After inserting, updating a promotion input, it may take several minutes - # before the final promotion can be retrieved. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the promotion. - # Format: `accounts/{account}/promotions/{promotion}` - # @!attribute [rw] promotion_id - # @return [::String] - # Required. The user provided promotion ID to uniquely identify the - # promotion. Follow [minimum - # requirements](https://support.google.com/merchants/answer/7050148?ref_topic=7322920&sjid=871860036916537104-NC#minimum_requirements) - # to prevent promotion disapprovals. - # @!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 - # promotion. - # - # Promotions is only for [selected - # languages](https://support.google.com/merchants/answer/4588281?ref_topic=6396150&sjid=18314938579342094533-NC#option3&zippy=). - # @!attribute [rw] target_country - # @return [::String] - # Required. 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, [Free Listings and Shopping - # ads](https://support.google.com/merchants/answer/4588460) [Local Inventory - # ads](https://support.google.com/merchants/answer/10146326) - # @!attribute [rw] redemption_channel - # @return [::Array<::Google::Shopping::Merchant::Promotions::V1beta::RedemptionChannel>] - # Required. [Redemption - # channel](https://support.google.com/merchants/answer/13837674?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. At least one channel is required. - # @!attribute [r] data_source - # @return [::String] - # Output only. The primary data source of the promotion. - # @!attribute [rw] attributes - # @return [::Google::Shopping::Merchant::Promotions::V1beta::Attributes] - # Optional. A list of promotion attributes. - # @!attribute [rw] custom_attributes - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Optional. A list of custom (merchant-provided) attributes. It can also be - # used for submitting any attribute of the data specification in its generic - # form (for example, - # `{ "name": "size type", "value": "regular" }`). - # This is useful for submitting attributes not explicitly exposed by the - # API. - # @!attribute [r] promotion_status - # @return [::Google::Shopping::Merchant::Promotions::V1beta::PromotionStatus] - # Output only. The [status of a - # promotion](https://support.google.com/merchants/answer/3398326?ref_topic=7322924&sjid=5155774230887277618-NC), - # data validation issues, that is, information about a promotion computed - # asynchronously. - # @!attribute [rw] version_number - # @return [::Integer] - # Optional. Represents the existing version (freshness) of the promotion, - # which can be used to preserve the right order when multiple updates are - # done at the same time. - # - # If set, the insertion is prevented when version number is lower than - # the current version number of the existing promotion. Re-insertion (for - # example, promotion refresh after 30 days) can be performed with the current - # `version_number`. - # - # If the operation is prevented, the aborted exception will be - # thrown. - class Promotion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `InsertPromotion` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account where the promotion will be inserted. - # Format: accounts/\\{account} - # @!attribute [rw] promotion - # @return [::Google::Shopping::Merchant::Promotions::V1beta::Promotion] - # Required. The promotion to insert. - # @!attribute [rw] data_source - # @return [::String] - # Required. The data source of the - # [promotion](https://support.google.com/merchants/answer/6396268?sjid=5155774230887277618-NC) - # Format: - # `accounts/{account}/dataSources/{datasource}`. - class InsertPromotionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetPromotion` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the promotion to retrieve. - # Format: `accounts/{account}/promotions/{promotions}` - class GetPromotionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListPromotions` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to list processed promotions for. - # Format: `accounts/{account}` - # @!attribute [r] page_size - # @return [::Integer] - # Output only. The maximum number of promotions 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 promotions - # will be returned. - # @!attribute [r] page_token - # @return [::String] - # Output only. A page token, received from a previous `ListPromotions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPromotions` must - # match the call that provided the page token. - class ListPromotionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListPromotions` method. - # @!attribute [rw] promotions - # @return [::Array<::Google::Shopping::Merchant::Promotions::V1beta::Promotion>] - # The processed promotions 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 ListPromotionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions_common.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions_common.rb deleted file mode 100644 index 1020dd50edbd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/merchant/promotions/v1beta/promotions_common.rb +++ /dev/null @@ -1,445 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Promotions - module V1beta - # Attributes. - # @!attribute [rw] product_applicability - # @return [::Google::Shopping::Merchant::Promotions::V1beta::ProductApplicability] - # Required. Applicability of the promotion to either all products or - # [only specific - # products](https://support.google.com/merchants/answer/6396257?ref_topic=6396150&sjid=17642868584668136159-NC). - # @!attribute [rw] offer_type - # @return [::Google::Shopping::Merchant::Promotions::V1beta::OfferType] - # Required. - # [Type](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC) - # of the promotion. Use this attribute to indicate whether or not customers - # need a coupon code to redeem your promotion. - # @!attribute [rw] generic_redemption_code - # @return [::String] - # Optional. Generic redemption code for the promotion. To be used with the - # `offerType` field and must meet the [minimum - # requirements](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC). - # @!attribute [rw] long_title - # @return [::String] - # Required. [Long - # title](https://support.google.com/merchants/answer/13838102?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. - # @!attribute [rw] coupon_value_type - # @return [::Google::Shopping::Merchant::Promotions::V1beta::CouponValueType] - # Required. The [coupon value type] - # (https://support.google.com/merchants/answer/13861986?ref_topic=13773355&sjid=17642868584668136159-NC) - # attribute to signal the type of promotion that you are running. Depending - # on type of the selected coupon value [some attributes are - # required](https://support.google.com/merchants/answer/6393006?ref_topic=7322920). - # @!attribute [rw] promotion_destinations - # @return [::Array<::Google::Shopping::Type::Destination::DestinationEnum>] - # Required. The list of destinations where the promotion applies to. If you - # don't specify a destination by including a supported value in your data - # source, your promotion will display in Shopping ads and free listings by - # default. - # - # You may have previously submitted the following values as destinations for - # your products: Shopping Actions, Surfaces across Google, Local surfaces - # across Google. To represent these values use `FREE_LISTINGS`, - # `FREE_LOCAL_LISTINGS`, `LOCAL_INVENTORY_ADS`. For more details see - # [Promotion - # destination](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC) - # @!attribute [rw] item_id_inclusion - # @return [::Array<::String>] - # Optional. Product filter by [item - # ID](https://support.google.com/merchants/answer/13861565?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. The product filter attributes only applies when the - # products eligible for promotion product applicability - # `product_applicability` attribute is set to - # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). - # @!attribute [rw] brand_inclusion - # @return [::Array<::String>] - # Optional. Product filter by brand for the promotion. The product filter - # attributes only applies when the products eligible for promotion product - # applicability `product_applicability` attribute is set to - # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). - # @!attribute [rw] item_group_id_inclusion - # @return [::Array<::String>] - # Optional. Product filter by item group ID for the promotion. The product - # filter attributes only applies when the products eligible for promotion - # product applicability [product_applicability] attribute is set to - # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). - # @!attribute [rw] product_type_inclusion - # @return [::Array<::String>] - # Optional. Product filter by product type for the promotion. The product - # filter attributes only applies when the products eligible for promotion - # product applicability `product_applicability` attribute is set to - # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). - # @!attribute [rw] item_id_exclusion - # @return [::Array<::String>] - # Optional. Product filter by [item ID - # exclusion](https://support.google.com/merchants/answer/13863524?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. The product filter attributes only applies when the - # products eligible for promotion product applicability - # `product_applicability` attribute is set to - # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). - # @!attribute [rw] brand_exclusion - # @return [::Array<::String>] - # Optional. Product filter by [brand - # exclusion](https://support.google.com/merchants/answer/13861679?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. The product filter attributes only applies when the - # products eligible for promotion product applicability - # `product_applicability` attribute is set to - # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). - # @!attribute [rw] item_group_id_exclusion - # @return [::Array<::String>] - # Optional. Product filter by [item group - # ID](https://support.google.com/merchants/answer/13837298?ref_topic=13773355&sjid=17642868584668136159-NC). - # The product filter attributes only applies when the products eligible for - # promotion product applicability `product_applicability` attribute is set to - # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). - # exclusion for the promotion. - # @!attribute [rw] product_type_exclusion - # @return [::Array<::String>] - # Optional. Product filter by [product type - # exclusion](https://support.google.com/merchants/answer/13863746?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. The product filter attributes only applies when the - # products eligible for promotion product applicability - # `product_applicability` attribute is set to - # [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC). - # @!attribute [rw] minimum_purchase_amount - # @return [::Google::Shopping::Type::Price] - # Optional. [Minimum purchase - # amount](https://support.google.com/merchants/answer/13837705?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. - # @!attribute [rw] minimum_purchase_quantity - # @return [::Integer] - # Optional. [Minimum purchase - # quantity](https://support.google.com/merchants/answer/13838182?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. - # @!attribute [rw] limit_quantity - # @return [::Integer] - # Optional. [Maximum purchase - # quantity](https://support.google.com/merchants/answer/13861564?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. - # @!attribute [rw] limit_value - # @return [::Google::Shopping::Type::Price] - # Optional. [Maximum product - # price](https://support.google.com/merchants/answer/2906014) for - # promotion. - # @!attribute [rw] percent_off - # @return [::Integer] - # Optional. The [percentage - # discount](https://support.google.com/merchants/answer/13837404?sjid=17642868584668136159-NC) - # offered in the promotion. - # @!attribute [rw] money_off_amount - # @return [::Google::Shopping::Type::Price] - # Optional. The [money off - # amount](https://support.google.com/merchants/answer/13838101?ref_topic=13773355&sjid=17642868584668136159-NC) - # offered in the promotion. - # @!attribute [rw] get_this_quantity_discounted - # @return [::Integer] - # Optional. The number of items discounted in the promotion. The attribute is - # set when `couponValueType` is equal to `buy_m_get_n_money_off` or - # `buy_m_get_n_percent_off`. - # @!attribute [rw] free_gift_value - # @return [::Google::Shopping::Type::Price] - # Optional. [Free gift - # value](https://support.google.com/merchants/answer/13844477?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. - # @!attribute [rw] free_gift_description - # @return [::String] - # Optional. [Free gift - # description](https://support.google.com/merchants/answer/13847245?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. - # @!attribute [rw] free_gift_item_id - # @return [::String] - # Optional. [Free gift item - # ID](https://support.google.com/merchants/answer/13857152?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. - # @!attribute [rw] promotion_effective_time_period - # @return [::Google::Type::Interval] - # Required. `TimePeriod` representation of the promotion's effective dates. - # This attribute specifies that the promotion can be tested on your online - # store during this time period. - # @!attribute [rw] promotion_display_time_period - # @return [::Google::Type::Interval] - # Optional. `TimePeriod` representation of the promotion's display dates. - # This attribute specifies the date and time frame when the promotion will be - # live on Google.com and Shopping ads. If the display time period for - # promotion `promotion_display_time_period` attribute is not specified, the - # promotion effective time period `promotion_effective_time_period` - # determines the date and time frame when the promotion will be live on - # Google.com and Shopping ads. - # @!attribute [rw] store_applicability - # @return [::Google::Shopping::Merchant::Promotions::V1beta::StoreApplicability] - # Optional. Whether the promotion applies to [all stores, or only specified - # stores](https://support.google.com/merchants/answer/13857563?sjid=17642868584668136159-NC). - # Local Inventory ads promotions throw an error if no store applicability is - # included. An `INVALID_ARGUMENT` error is thrown if `store_applicability` is - # set to `ALL_STORES` and `store_codes_inclusion` or `score_code_exclusion` - # is set to a value. - # @!attribute [rw] store_codes_inclusion - # @return [::Array<::String>] - # Optional. [Store codes to - # include](https://support.google.com/merchants/answer/13857470?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. The store filter attributes only applies when the - # `store_applicability` attribute is set to - # [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC). - # - # 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] store_codes_exclusion - # @return [::Array<::String>] - # Optional. [Store codes to - # exclude](https://support.google.com/merchants/answer/13859586?ref_topic=13773355&sjid=17642868584668136159-NC) - # for the promotion. The store filter attributes only applies when the - # `store_applicability` attribute is set to - # [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC). - # @!attribute [rw] promotion_url - # @return [::String] - # Optional. URL to the page on the merchant's site where the promotion shows. - # Local Inventory ads promotions throw an error if no `promotion_url` is - # included. URL is used to confirm that the promotion is valid and can be - # redeemed. - class Attributes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The status of the promotion. - # @!attribute [r] destination_statuses - # @return [::Array<::Google::Shopping::Merchant::Promotions::V1beta::PromotionStatus::DestinationStatus>] - # Output only. The intended destinations for the promotion. - # @!attribute [r] item_level_issues - # @return [::Array<::Google::Shopping::Merchant::Promotions::V1beta::PromotionStatus::ItemLevelIssue>] - # Output only. A list of issues associated with the promotion. - # @!attribute [r] creation_date - # @return [::Google::Protobuf::Timestamp] - # Output only. Date on which the promotion has been created - # in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, - # and offset, for example `2020-01-02T09:00:00+01:00` or - # `2020-01-02T09:00:00Z` - # @!attribute [r] last_update_date - # @return [::Google::Protobuf::Timestamp] - # Output only. Date on which the promotion status has been last updated - # in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, - # and offset, for example `2020-01-02T09:00:00+01:00` or - # `2020-01-02T09:00:00Z` - class PromotionStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The status for the specified destination. - # @!attribute [r] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # Output only. The name of the promotion destination. - # @!attribute [r] status - # @return [::Google::Shopping::Merchant::Promotions::V1beta::PromotionStatus::DestinationStatus::State] - # Output only. The status for the specified destination. - class DestinationStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The current state of the promotion. - module State - # Unknown promotion state. - STATE_UNSPECIFIED = 0 - - # The promotion is under review. - IN_REVIEW = 1 - - # The promotion is disapproved. - REJECTED = 2 - - # The promotion is approved and active. - LIVE = 3 - - # The promotion is stopped by merchant. - STOPPED = 4 - - # The promotion is no longer active. - EXPIRED = 5 - - # The promotion is not stopped, and all reviews are approved, but the - # active date is in the future. - PENDING = 6 - end - end - - # The issue associated with the promotion. - # @!attribute [r] code - # @return [::String] - # Output only. The error code of the issue. - # @!attribute [r] severity - # @return [::Google::Shopping::Merchant::Promotions::V1beta::PromotionStatus::ItemLevelIssue::Severity] - # Output only. How this issue affects serving of the promotion. - # @!attribute [r] resolution - # @return [::String] - # Output only. Whether the issue can be resolved by the merchant. - # @!attribute [r] attribute - # @return [::String] - # Output only. The attribute's name, if the issue is caused by a single - # attribute. - # @!attribute [r] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # Output only. The destination the issue applies to. - # @!attribute [r] description - # @return [::String] - # Output only. A short issue description in English. - # @!attribute [r] detail - # @return [::String] - # Output only. A detailed issue description in English. - # @!attribute [r] documentation - # @return [::String] - # Output only. The URL of a web page to help with resolving this issue. - # @!attribute [r] applicable_countries - # @return [::Array<::String>] - # Output only. List of country codes (ISO 3166-1 alpha-2) where issue - # applies to the offer. - class ItemLevelIssue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The severity of the issue. - module Severity - # Not specified. - SEVERITY_UNSPECIFIED = 0 - - # This issue represents a warning and does not have a direct affect - # on the promotion. - NOT_IMPACTED = 1 - - # The promotion is demoted and most likely have limited performance - # in search results - DEMOTED = 2 - - # Issue disapproves the promotion. - DISAPPROVED = 3 - end - end - end - - # Which product or list of products the promotion applies to. - module ProductApplicability - # Which products the promotion applies to is unknown. - PRODUCT_APPLICABILITY_UNSPECIFIED = 0 - - # Applicable to all products. - ALL_PRODUCTS = 1 - - # Applicable to only a single product or list of products. - SPECIFIC_PRODUCTS = 2 - end - - # Store codes or list of store codes the promotion applies to. Only for - # Local inventory ads promotions. - module StoreApplicability - # Which store codes the promotion applies to is unknown. - STORE_APPLICABILITY_UNSPECIFIED = 0 - - # Promotion applies to all stores. - ALL_STORES = 1 - - # Promotion applies to only the specified stores. - SPECIFIC_STORES = 2 - end - - # Offer type of a promotion. - module OfferType - # Unknown offer type. - OFFER_TYPE_UNSPECIFIED = 0 - - # Offer type without a code. - NO_CODE = 1 - - # Offer type with a code. Generic redemption code for the promotion is - # required when `offerType` = `GENERIC_CODE`. - GENERIC_CODE = 2 - end - - # Channel of a promotion. - module RedemptionChannel - # Indicates that the channel is unspecified. - REDEMPTION_CHANNEL_UNSPECIFIED = 0 - - # Indicates that the channel is in store. - # This is same as `local` channel used for `products`. - IN_STORE = 1 - - # Indicates that the channel is online. - ONLINE = 2 - end - - # [Coupon value - # type](https://support.google.com/merchants/answer/13861986?ref_topic=13773355&sjid=17642868584668136159-NC) - # of a promotion. - module CouponValueType - # Indicates that the coupon value type is unspecified. - COUPON_VALUE_TYPE_UNSPECIFIED = 0 - - # Money off coupon value type. - MONEY_OFF = 1 - - # Percent off coupon value type. - PERCENT_OFF = 2 - - # Buy M quantity, get N money off coupon value type. - # `minimum_purchase_quantity` and `get_this_quantity_discounted` must be - # present. `money_off_amount` must also be present. - BUY_M_GET_N_MONEY_OFF = 3 - - # Buy M quantity, get N percent off coupon value type. - # `minimum_purchase_quantity` and `get_this_quantity_discounted` must be - # present. `percent_off_percentage` must also be present. - BUY_M_GET_N_PERCENT_OFF = 4 - - # Buy M quantity, get money off. `minimum_purchase_quantity` and - # `money_off_amount` must be present. - BUY_M_GET_MONEY_OFF = 5 - - # Buy M quantity, get money off. `minimum_purchase_quantity` and - # `percent_off_percentage` must be present. - BUY_M_GET_PERCENT_OFF = 6 - - # Free gift with description only. - FREE_GIFT = 7 - - # Free gift with monetary value. - FREE_GIFT_WITH_VALUE = 8 - - # Free gift with item ID. - FREE_GIFT_WITH_ITEM_ID = 9 - - # Standard free shipping coupon value type. - FREE_SHIPPING_STANDARD = 10 - - # Overnight free shipping coupon value type. - FREE_SHIPPING_OVERNIGHT = 11 - - # Two day free shipping coupon value type. - FREE_SHIPPING_TWO_DAY = 12 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta/proto_docs/google/type/interval.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/type/interval.rb deleted file mode 100644 index 9350ca479005..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/Gemfile deleted file mode 100644 index 1271b862a659..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-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-promotions-v1beta", path: "../" -else - gem "google-shopping-merchant-promotions-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-promotions-v1beta/snippets/promotions_service/get_promotion.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/get_promotion.rb deleted file mode 100644 index 6e9b8d3455d4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/get_promotion.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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_PromotionsService_GetPromotion_sync] -require "google/shopping/merchant/promotions/v1beta" - -## -# Snippet for the get_promotion call in the PromotionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client#get_promotion. -# -def get_promotion - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest.new - - # Call the get_promotion method. - result = client.get_promotion request - - # The returned object is of type Google::Shopping::Merchant::Promotions::V1beta::Promotion. - p result -end -# [END merchantapi_v1beta_generated_PromotionsService_GetPromotion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/insert_promotion.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/insert_promotion.rb deleted file mode 100644 index 43f6e2c19e06..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/insert_promotion.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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_PromotionsService_InsertPromotion_sync] -require "google/shopping/merchant/promotions/v1beta" - -## -# Snippet for the insert_promotion call in the PromotionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client#insert_promotion. -# -def insert_promotion - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest.new - - # Call the insert_promotion method. - result = client.insert_promotion request - - # The returned object is of type Google::Shopping::Merchant::Promotions::V1beta::Promotion. - p result -end -# [END merchantapi_v1beta_generated_PromotionsService_InsertPromotion_sync] diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/list_promotions.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/list_promotions.rb deleted file mode 100644 index 4688318ef057..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/promotions_service/list_promotions.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_PromotionsService_ListPromotions_sync] -require "google/shopping/merchant/promotions/v1beta" - -## -# Snippet for the list_promotions call in the PromotionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client#list_promotions. -# -def list_promotions - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest.new - - # Call the list_promotions method. - result = client.list_promotions request - - # The returned object is of type Gapic::PagedEnumerable. You can 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::Promotions::V1beta::Promotion. - p item - end -end -# [END merchantapi_v1beta_generated_PromotionsService_ListPromotions_sync] diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/snippet_metadata_google.shopping.merchant.promotions.v1beta.json b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/snippet_metadata_google.shopping.merchant.promotions.v1beta.json deleted file mode 100644 index a39c8da86118..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/snippets/snippet_metadata_google.shopping.merchant.promotions.v1beta.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-promotions-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.promotions.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_PromotionsService_InsertPromotion_sync", - "title": "Snippet for the insert_promotion call in the PromotionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client#insert_promotion.", - "file": "promotions_service/insert_promotion.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_promotion", - "full_name": "::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client#insert_promotion", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Promotions::V1beta::Promotion", - "client": { - "short_name": "PromotionsService::Client", - "full_name": "::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client" - }, - "method": { - "short_name": "InsertPromotion", - "full_name": "google.shopping.merchant.promotions.v1beta.PromotionsService.InsertPromotion", - "service": { - "short_name": "PromotionsService", - "full_name": "google.shopping.merchant.promotions.v1beta.PromotionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_PromotionsService_GetPromotion_sync", - "title": "Snippet for the get_promotion call in the PromotionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client#get_promotion.", - "file": "promotions_service/get_promotion.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_promotion", - "full_name": "::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client#get_promotion", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Promotions::V1beta::Promotion", - "client": { - "short_name": "PromotionsService::Client", - "full_name": "::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client" - }, - "method": { - "short_name": "GetPromotion", - "full_name": "google.shopping.merchant.promotions.v1beta.PromotionsService.GetPromotion", - "service": { - "short_name": "PromotionsService", - "full_name": "google.shopping.merchant.promotions.v1beta.PromotionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_PromotionsService_ListPromotions_sync", - "title": "Snippet for the list_promotions call in the PromotionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client#list_promotions.", - "file": "promotions_service/list_promotions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_promotions", - "full_name": "::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client#list_promotions", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsResponse", - "client": { - "short_name": "PromotionsService::Client", - "full_name": "::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client" - }, - "method": { - "short_name": "ListPromotions", - "full_name": "google.shopping.merchant.promotions.v1beta.PromotionsService.ListPromotions", - "service": { - "short_name": "PromotionsService", - "full_name": "google.shopping.merchant.promotions.v1beta.PromotionsService" - } - } - }, - "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-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_paths_test.rb deleted file mode 100644 index bbc7ea1a187e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_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/promotions/v1beta/promotions_service" - -class ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::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_promotion_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::Promotions::V1beta::PromotionsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.promotion_path account: "value0", promotion: "value1" - assert_equal "accounts/value0/promotions/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_rest_test.rb deleted file mode 100644 index 498d485cd41a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_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/merchant/promotions/v1beta/promotions_pb" -require "google/shopping/merchant/promotions/v1beta/promotions_service/rest" - - -class ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::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_promotion - # Create test objects. - client_result = ::Google::Shopping::Merchant::Promotions::V1beta::Promotion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - promotion = {} - data_source = "hello world" - - insert_promotion_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::ServiceStub.stub :transcode_insert_promotion_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_promotion_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.insert_promotion({ parent: parent, promotion: promotion, data_source: data_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.insert_promotion parent: parent, promotion: promotion, data_source: data_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.insert_promotion ::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest.new(parent: parent, promotion: promotion, data_source: data_source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.insert_promotion({ parent: parent, promotion: promotion, data_source: data_source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.insert_promotion(::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest.new(parent: parent, promotion: promotion, data_source: data_source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_promotion_client_stub.call_count - end - end - end - - def test_get_promotion - # Create test objects. - client_result = ::Google::Shopping::Merchant::Promotions::V1beta::Promotion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_promotion_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::ServiceStub.stub :transcode_get_promotion_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_promotion_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_promotion({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_promotion name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_promotion ::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_promotion({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_promotion(::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_promotion_client_stub.call_count - end - end - end - - def test_list_promotions - # Create test objects. - client_result = ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsResponse.new - http_response = OpenStruct.new 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_promotions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::ServiceStub.stub :transcode_list_promotions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_promotions_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_promotions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_promotions parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_promotions ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest.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 - c.list_promotions({ 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 - c.list_promotions(::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest.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_promotions_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::Promotions::V1beta::PromotionsService::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::Promotions::V1beta::PromotionsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_test.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_test.rb deleted file mode 100644 index a2e706899842..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/google/shopping/merchant/promotions/v1beta/promotions_service_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/promotions/v1beta/promotions_pb" -require "google/shopping/merchant/promotions/v1beta/promotions_service" - -class ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::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_promotion - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Promotions::V1beta::Promotion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - promotion = {} - data_source = "hello world" - - insert_promotion_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_promotion, name - assert_kind_of ::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Promotions::V1beta::Promotion), request["promotion"] - assert_equal "hello world", request["data_source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_promotion_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.insert_promotion({ parent: parent, promotion: promotion, data_source: data_source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.insert_promotion parent: parent, promotion: promotion, data_source: data_source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.insert_promotion ::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest.new(parent: parent, promotion: promotion, data_source: data_source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.insert_promotion({ parent: parent, promotion: promotion, 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 - c.insert_promotion(::Google::Shopping::Merchant::Promotions::V1beta::InsertPromotionRequest.new(parent: parent, promotion: promotion, 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, insert_promotion_client_stub.call_rpc_count - end - end - - def test_get_promotion - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Promotions::V1beta::Promotion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_promotion_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_promotion, name - assert_kind_of ::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_promotion_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_promotion({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_promotion name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_promotion ::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_promotion({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_promotion(::Google::Shopping::Merchant::Promotions::V1beta::GetPromotionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_promotion_client_stub.call_rpc_count - end - end - - def test_list_promotions - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_promotions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_promotions, name - assert_kind_of ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest, 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_promotions_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_promotions({ parent: parent, page_size: page_size, page_token: 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 - c.list_promotions parent: parent, page_size: page_size, page_token: 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 - c.list_promotions ::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest.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 - c.list_promotions({ 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 - c.list_promotions(::Google::Shopping::Merchant::Promotions::V1beta::ListPromotionsRequest.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_promotions_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::Promotions::V1beta::PromotionsService::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::Promotions::V1beta::PromotionsService::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::Promotions::V1beta::PromotionsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -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-reports-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-reports-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -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-reports-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-reports-v1/.repo-metadata.json deleted file mode 100644 index ddd4ab3ed6bb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1", - "distribution_name": "google-shopping-merchant-reports-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-reports-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-reports 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-reports-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-reports-v1/.rubocop.yml deleted file mode 100644 index 1f311a84c068..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-reports-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-reports-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-reports-v1/.yardopts deleted file mode 100644 index dc7bbc10ae29..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-reports-v1/AUTHENTICATION.md deleted file mode 100644 index e793e61f8914..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-reports-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-reports-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/reports/v1" - -client = ::Google::Shopping::Merchant::Reports::V1::ReportService::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/reports/v1" - -::Google::Shopping::Merchant::Reports::V1::ReportService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Reports::V1::ReportService::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-reports-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/reports/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Reports::V1::ReportService::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-reports-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-reports-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-reports-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/Gemfile +++ /dev/null @@ -1,15 +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-reporters", "~> 1.8.0", require: false -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-reports-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-reports-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1/README.md b/owl-bot-staging/google-shopping-merchant-reports-v1/README.md deleted file mode 100644 index cf84596baff8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports](https://rubygems.org/gems/google-shopping-merchant-reports). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-reports-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/reports/v1" - -client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new -request = ::Google::Shopping::Merchant::Reports::V1::SearchRequest.new # (request fields as keyword arguments...) -response = client.search request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-reports-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/reports/v1" -require "logger" - -client = ::Google::Shopping::Merchant::Reports::V1::ReportService::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.2+. - -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-reports`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-reports-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-reports`. -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-reports-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-reports-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-reports-v1/Rakefile deleted file mode 100644 index 6d4b8859d747..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-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/reports/v1/report_service/credentials" - ::Google::Shopping::Merchant::Reports::V1::ReportService::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-reports-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-reports-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-reports-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-reports-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-reports-v1" - header "google-shopping-merchant-reports-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-reports-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-reports-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-reports-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-reports-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-reports-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-reports-v1/gapic_metadata.json deleted file mode 100644 index d3bc0f3e8851..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/gapic_metadata.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.reports.v1", - "libraryPackage": "::Google::Shopping::Merchant::Reports::V1", - "services": { - "ReportService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Reports::V1::ReportService::Client", - "rpcs": { - "Search": { - "methods": [ - "search" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/google-shopping-merchant-reports-v1.gemspec b/owl-bot-staging/google-shopping-merchant-reports-v1/google-shopping-merchant-reports-v1.gemspec deleted file mode 100644 index d6e706f4efea..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/google-shopping-merchant-reports-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/reports/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-reports-v1" - gem.version = Google::Shopping::Merchant::Reports::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-reports-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-reports 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.3" - 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-reports-v1/lib/google-shopping-merchant-reports-v1.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google-shopping-merchant-reports-v1.rb deleted file mode 100644 index 519b57180416..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google-shopping-merchant-reports-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/reports/v1" diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1.rb deleted file mode 100644 index 588dc6fa4ee3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/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/reports/v1/report_service" -require "google/shopping/merchant/reports/v1/version" - -module Google - module Shopping - module Merchant - module Reports - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/reports/v1" - # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/reports/v1" - # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/shopping/merchant/reports/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service.rb deleted file mode 100644 index 88e9aced79fd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_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/reports/v1/version" - -require "google/shopping/merchant/reports/v1/report_service/credentials" -require "google/shopping/merchant/reports/v1/report_service/client" -require "google/shopping/merchant/reports/v1/report_service/rest" - -module Google - module Shopping - module Merchant - module Reports - module V1 - ## - # Service for retrieving reports and insights about your products, their - # performance, and their competitive environment on Google. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/reports/v1/report_service" - # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/reports/v1/report_service/rest" - # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new - # - module ReportService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "report_service", "helpers.rb" -require "google/shopping/merchant/reports/v1/report_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/client.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/client.rb deleted file mode 100644 index ef9288f54a3b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/client.rb +++ /dev/null @@ -1,506 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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/reports/v1/reports_pb" - -module Google - module Shopping - module Merchant - module Reports - module V1 - module ReportService - ## - # Client for the ReportService service. - # - # Service for retrieving reports and insights about your products, their - # performance, and their competitive environment on Google. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :report_service_stub - - ## - # Configure the ReportService Client class. - # - # See {::Google::Shopping::Merchant::Reports::V1::ReportService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ReportService clients - # ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.configure do |config| - # config.timeout = 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", "Reports", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.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 ReportService Client instance. - # - # The configuration is set to the derived mode, meaning that values 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::Reports::V1::ReportService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @report_service_stub.universe_domain - end - - ## - # Create a new ReportService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ReportService 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/reports/v1/reports_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 - - @report_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Reports::V1::ReportService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @report_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 - @report_service_stub.logger - end - - # Service calls - - ## - # Retrieves a report defined by a search query. The response might contain - # fewer rows than specified by `page_size`. Rely on `next_page_token` to - # determine if there are more rows to be requested. - # - # @overload search(request, options = nil) - # Pass arguments to `search` via a request object, either of type - # {::Google::Shopping::Merchant::Reports::V1::SearchRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Reports::V1::SearchRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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(parent: nil, query: nil, page_size: nil, page_token: nil) - # Pass arguments to `search` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Id of the account making the call. Must be a standalone account - # or an MCA subaccount. Format: accounts/\\{account} - # @param query [::String] - # Required. Query that defines a report to be retrieved. - # - # For details on how to construct your query, see the [Query Language - # guide](/merchant/api/guides/reports/query-language). For the full list of - # available tables and fields, see the [Available - # fields][google.shopping.merchant.reports.v1.ReportRow]. - # @param page_size [::Integer] - # Optional. Number of `ReportRows` to retrieve in a single page. Defaults to - # 1000. Values above 100,000 are coerced to 100,000. - # @param page_token [::String] - # Optional. Token of the page to retrieve. If not specified, the first page - # of results is returned. In order to request the next page of results, the - # value obtained from `next_page_token` in the previous response should be - # used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1::ReportRow>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1::ReportRow>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/reports/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Reports::V1::ReportService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Reports::V1::SearchRequest.new - # - # # Call the search method. - # result = client.search request - # - # # The returned object is of type Gapic::PagedEnumerable. You can 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::Reports::V1::ReportRow. - # p item - # end - # - def search request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reports::V1::SearchRequest - - # Converts hash and nil to 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.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Reports::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @report_service_stub.call_rpc :search, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @report_service_stub, :search, request, response, 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 ReportService API. - # - # This class represents the configuration for ReportService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Reports::V1::ReportService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # search to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.search.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.search.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::Reports::V1::ReportService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ReportService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `search` - # @return [::Gapic::Config::Method] - # - attr_reader :search - - # @private - def initialize parent_rpcs = nil - search_config = parent_rpcs.search if parent_rpcs.respond_to? :search - @search = ::Gapic::Config::Method.new search_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-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/credentials.rb deleted file mode 100644 index f1e78db705c2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_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 Reports - module V1 - module ReportService - # Credentials for the ReportService 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-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest.rb deleted file mode 100644 index f84d95a0f9f3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_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/reports/v1/version" - -require "google/shopping/merchant/reports/v1/report_service/credentials" -require "google/shopping/merchant/reports/v1/report_service/rest/client" - -module Google - module Shopping - module Merchant - module Reports - module V1 - ## - # Service for retrieving reports and insights about your products, their - # performance, and their competitive environment on Google. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/reports/v1/report_service/rest" - # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new - # - module ReportService - # 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/reports/v1/report_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/client.rb deleted file mode 100644 index 05047b77bb2f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/client.rb +++ /dev/null @@ -1,456 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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/reports/v1/reports_pb" -require "google/shopping/merchant/reports/v1/report_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Reports - module V1 - module ReportService - module Rest - ## - # REST client for the ReportService service. - # - # Service for retrieving reports and insights about your products, their - # performance, and their competitive environment on Google. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :report_service_stub - - ## - # Configure the ReportService Client class. - # - # See {::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ReportService clients - # ::Google::Shopping::Merchant::Reports::V1::ReportService::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", "Reports", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.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 ReportService Client instance. - # - # The configuration is set to the derived mode, meaning that values 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::Reports::V1::ReportService::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 - @report_service_stub.universe_domain - end - - ## - # Create a new ReportService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ReportService 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 - - @report_service_stub = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @report_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 - @report_service_stub.logger - end - - # Service calls - - ## - # Retrieves a report defined by a search query. The response might contain - # fewer rows than specified by `page_size`. Rely on `next_page_token` to - # determine if there are more rows to be requested. - # - # @overload search(request, options = nil) - # Pass arguments to `search` via a request object, either of type - # {::Google::Shopping::Merchant::Reports::V1::SearchRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Reports::V1::SearchRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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(parent: nil, query: nil, page_size: nil, page_token: nil) - # Pass arguments to `search` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Id of the account making the call. Must be a standalone account - # or an MCA subaccount. Format: accounts/\\{account} - # @param query [::String] - # Required. Query that defines a report to be retrieved. - # - # For details on how to construct your query, see the [Query Language - # guide](/merchant/api/guides/reports/query-language). For the full list of - # available tables and fields, see the [Available - # fields][google.shopping.merchant.reports.v1.ReportRow]. - # @param page_size [::Integer] - # Optional. Number of `ReportRows` to retrieve in a single page. Defaults to - # 1000. Values above 100,000 are coerced to 100,000. - # @param page_token [::String] - # Optional. Token of the page to retrieve. If not specified, the first page - # of results is returned. In order to request the next page of results, the - # value obtained from `next_page_token` in the previous response should be - # used. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1::ReportRow>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1::ReportRow>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/reports/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Reports::V1::SearchRequest.new - # - # # Call the search method. - # result = client.search request - # - # # The returned object is of type Gapic::PagedEnumerable. You can 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::Reports::V1::ReportRow. - # p item - # end - # - def search request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reports::V1::SearchRequest - - # Converts hash and nil to an 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.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Reports::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @report_service_stub.search request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @report_service_stub, :search, "results", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ReportService REST API. - # - # This class represents the configuration for ReportService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # search to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.search.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.search.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the ReportService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `search` - # @return [::Gapic::Config::Method] - # - attr_reader :search - - # @private - def initialize parent_rpcs = nil - search_config = parent_rpcs.search if parent_rpcs.respond_to? :search - @search = ::Gapic::Config::Method.new search_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-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/service_stub.rb deleted file mode 100644 index e78b6989589a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_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/reports/v1/reports_pb" - -module Google - module Shopping - module Merchant - module Reports - module V1 - module ReportService - module Rest - ## - # REST service stub for the ReportService 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 search REST call - # - # @param request_pb [::Google::Shopping::Merchant::Reports::V1::SearchRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Reports::V1::SearchResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Reports::V1::SearchResponse] - # A result object deserialized from the server's reply - def search request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Reports::V1::SearchResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the search REST call - # - # @param request_pb [::Google::Shopping::Merchant::Reports::V1::SearchRequest] - # 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_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/reports/v1/{parent}/reports:search", - 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-reports-v1/lib/google/shopping/merchant/reports/v1/reports_pb.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_pb.rb deleted file mode 100644 index b3ab43662fc7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/reports/v1/reports.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' -require 'google/shopping/type/types_pb' -require 'google/type/date_pb' - - -descriptor_data = "\n1google/shopping/merchant/reports/v1/reports.proto\x12#google.shopping.merchant.reports.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\x1a\x16google/type/date.proto\"i\n\rSearchRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"j\n\x0eSearchResponse\x12?\n\x07results\x18\x01 \x03(\x0b\x32..google.shopping.merchant.reports.v1.ReportRow\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa8\x08\n\tReportRow\x12]\n\x18product_performance_view\x18\x01 \x01(\x0b\x32;.google.shopping.merchant.reports.v1.ProductPerformanceView\x12\x64\n\x1cnon_product_performance_view\x18\x07 \x01(\x0b\x32>.google.shopping.merchant.reports.v1.NonProductPerformanceView\x12\x46\n\x0cproduct_view\x18\x02 \x01(\x0b\x32\x30.google.shopping.merchant.reports.v1.ProductView\x12p\n\"price_competitiveness_product_view\x18\x03 \x01(\x0b\x32\x44.google.shopping.merchant.reports.v1.PriceCompetitivenessProductView\x12\x62\n\x1bprice_insights_product_view\x18\x04 \x01(\x0b\x32=.google.shopping.merchant.reports.v1.PriceInsightsProductView\x12m\n!best_sellers_product_cluster_view\x18\x05 \x01(\x0b\x32\x42.google.shopping.merchant.reports.v1.BestSellersProductClusterView\x12Z\n\x17\x62\x65st_sellers_brand_view\x18\x06 \x01(\x0b\x32\x39.google.shopping.merchant.reports.v1.BestSellersBrandView\x12x\n&competitive_visibility_competitor_view\x18\x08 \x01(\x0b\x32H.google.shopping.merchant.reports.v1.CompetitiveVisibilityCompetitorView\x12{\n(competitive_visibility_top_merchant_view\x18\t \x01(\x0b\x32I.google.shopping.merchant.reports.v1.CompetitiveVisibilityTopMerchantView\x12v\n%competitive_visibility_benchmark_view\x18\n \x01(\x0b\x32G.google.shopping.merchant.reports.v1.CompetitiveVisibilityBenchmarkView\"\xa3\x0b\n\x16ProductPerformanceView\x12g\n\x10marketing_method\x18\x01 \x01(\x0e\x32H.google.shopping.merchant.reports.v1.MarketingMethod.MarketingMethodEnumH\x00\x88\x01\x01\x12\x1f\n\x04\x64\x61te\x18\x02 \x01(\x0b\x32\x11.google.type.Date\x12\x1f\n\x04week\x18\x03 \x01(\x0b\x32\x11.google.type.Date\x12\"\n\x15\x63ustomer_country_code\x18\x04 \x01(\tH\x01\x88\x01\x01\x12U\n\nstore_type\x18 \x01(\x0e\x32<.google.shopping.merchant.reports.v1.StoreType.StoreTypeEnumH\x02\x88\x01\x01\x12\x15\n\x08offer_id\x18\x05 \x01(\tH\x03\x88\x01\x01\x12\x12\n\x05title\x18\x06 \x01(\tH\x04\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x07 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x08 \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\t \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\n \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\x0b \x01(\tH\t\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\x0c \x01(\tH\n\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18\r \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18\x0e \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18\x0f \x01(\tH\r\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18\x10 \x01(\tH\x0e\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18\x11 \x01(\tH\x0f\x88\x01\x01\x12\x1a\n\rcustom_label0\x18\x12 \x01(\tH\x10\x88\x01\x01\x12\x1a\n\rcustom_label1\x18\x13 \x01(\tH\x11\x88\x01\x01\x12\x1a\n\rcustom_label2\x18\x14 \x01(\tH\x12\x88\x01\x01\x12\x1a\n\rcustom_label3\x18\x15 \x01(\tH\x13\x88\x01\x01\x12\x1a\n\rcustom_label4\x18\x16 \x01(\tH\x14\x88\x01\x01\x12\x13\n\x06\x63licks\x18\x17 \x01(\x03H\x15\x88\x01\x01\x12\x18\n\x0bimpressions\x18\x18 \x01(\x03H\x16\x88\x01\x01\x12\x1f\n\x12\x63lick_through_rate\x18\x19 \x01(\x01H\x17\x88\x01\x01\x12\x18\n\x0b\x63onversions\x18\x1a \x01(\x01H\x18\x88\x01\x01\x12\x35\n\x10\x63onversion_value\x18\x1b \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x1c\n\x0f\x63onversion_rate\x18\x1c \x01(\x01H\x19\x88\x01\x01\x42\x13\n\x11_marketing_methodB\x18\n\x16_customer_country_codeB\r\n\x0b_store_typeB\x0b\n\t_offer_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5B\x10\n\x0e_custom_label0B\x10\n\x0e_custom_label1B\x10\n\x0e_custom_label2B\x10\n\x0e_custom_label3B\x10\n\x0e_custom_label4B\t\n\x07_clicksB\x0e\n\x0c_impressionsB\x15\n\x13_click_through_rateB\x0e\n\x0c_conversionsB\x12\n\x10_conversion_rate\"\xee\x1a\n\x0bProductView\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12?\n\x07\x63hannel\x18\x1c \x01(\x0e\x32).google.shopping.type.Channel.ChannelEnumH\x01\x88\x01\x01\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tH\x02\x88\x01\x01\x12\x17\n\nfeed_label\x18\x03 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08offer_id\x18\x04 \x01(\tH\x04\x88\x01\x01\x12\x12\n\x05title\x18\x05 \x01(\tH\x05\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x06 \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x07 \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\x08 \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\t \x01(\tH\t\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\n \x01(\tH\n\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\x0b \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18\x0c \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18\r \x01(\tH\r\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18\x0e \x01(\tH\x0e\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18\x0f \x01(\tH\x0f\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18\x10 \x01(\tH\x10\x88\x01\x01\x12*\n\x05price\x18\x11 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x16\n\tcondition\x18\x12 \x01(\tH\x11\x88\x01\x01\x12\x19\n\x0c\x61vailability\x18\x13 \x01(\tH\x12\x88\x01\x01\x12\x1b\n\x0eshipping_label\x18\x14 \x01(\tH\x13\x88\x01\x01\x12\x0c\n\x04gtin\x18\x15 \x03(\t\x12\x1a\n\ritem_group_id\x18\x16 \x01(\tH\x14\x88\x01\x01\x12\x1b\n\x0ethumbnail_link\x18\x17 \x01(\tH\x15\x88\x01\x01\x12\x31\n\rcreation_time\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x0f\x65xpiration_date\x18\x19 \x01(\x0b\x32\x11.google.type.Date\x12\x83\x01\n#aggregated_reporting_context_status\x18\x1a \x01(\x0e\x32Q.google.shopping.merchant.reports.v1.ProductView.AggregatedReportingContextStatusH\x16\x88\x01\x01\x12p\n\x1cstatus_per_reporting_context\x18 \x03(\x0b\x32J.google.shopping.merchant.reports.v1.ProductView.StatusPerReportingContext\x12[\n\x11reporting_context\x18! \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x17\x88\x01\x01\x12O\n\x0bitem_issues\x18\x1b \x03(\x0b\x32:.google.shopping.merchant.reports.v1.ProductView.ItemIssue\x12X\n\x0f\x63lick_potential\x18\x1d \x01(\x0e\x32?.google.shopping.merchant.reports.v1.ProductView.ClickPotential\x12!\n\x14\x63lick_potential_rank\x18\x1e \x01(\x03H\x18\x88\x01\x01\x1a\x9f\t\n\tItemIssue\x12V\n\x04type\x18\x01 \x01(\x0b\x32H.google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueType\x12^\n\x08severity\x18\x02 \x01(\x0b\x32L.google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueSeverity\x12g\n\nresolution\x18\x03 \x01(\x0e\x32N.google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueResolutionH\x00\x88\x01\x01\x1a\x65\n\rItemIssueType\x12\x11\n\x04\x63ode\x18\x01 \x01(\tH\x00\x88\x01\x01\x12 \n\x13\x63\x61nonical_attribute\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_codeB\x16\n\x14_canonical_attribute\x1a\x8f\x05\n\x11ItemIssueSeverity\x12\x95\x01\n\x1eseverity_per_reporting_context\x18\x01 \x03(\x0b\x32m.google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext\x12\x86\x01\n\x13\x61ggregated_severity\x18\x02 \x01(\x0e\x32\x64.google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueSeverity.AggregatedIssueSeverityH\x00\x88\x01\x01\x1a\xcf\x01\n IssueSeverityPerReportingContext\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x00\x88\x01\x01\x12\x1d\n\x15\x64isapproved_countries\x18\x02 \x03(\t\x12\x19\n\x11\x64\x65moted_countries\x18\x03 \x03(\tB\x14\n\x12_reporting_context\"o\n\x17\x41ggregatedIssueSeverity\x12)\n%AGGREGATED_ISSUE_SEVERITY_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x44ISAPPROVED\x10\x01\x12\x0b\n\x07\x44\x45MOTED\x10\x02\x12\x0b\n\x07PENDING\x10\x03\x42\x16\n\x14_aggregated_severity\"i\n\x13ItemIssueResolution\x12%\n!ITEM_ISSUE_RESOLUTION_UNSPECIFIED\x10\x00\x12\x13\n\x0fMERCHANT_ACTION\x10\x01\x12\x16\n\x12PENDING_PROCESSING\x10\x02\x42\r\n\x0b_resolution\x1a\xe4\x01\n\x19StatusPerReportingContext\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x00\x88\x01\x01\x12\x1a\n\x12\x61pproved_countries\x18\x02 \x03(\t\x12\x1d\n\x15\x64isapproved_countries\x18\x03 \x03(\t\x12\x19\n\x11pending_countries\x18\x04 \x03(\tB\x14\n\x12_reporting_context\"\xa9\x01\n AggregatedReportingContextStatus\x12\x33\n/AGGREGATED_REPORTING_CONTEXT_STATUS_UNSPECIFIED\x10\x00\x12\x1f\n\x1bNOT_ELIGIBLE_OR_DISAPPROVED\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x14\n\x10\x45LIGIBLE_LIMITED\x10\x03\x12\x0c\n\x08\x45LIGIBLE\x10\x04\"P\n\x0e\x43lickPotential\x12\x1f\n\x1b\x43LICK_POTENTIAL_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x42\x05\n\x03_idB\n\n\x08_channelB\x10\n\x0e_language_codeB\r\n\x0b_feed_labelB\x0b\n\t_offer_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5B\x0c\n\n_conditionB\x0f\n\r_availabilityB\x11\n\x0f_shipping_labelB\x10\n\x0e_item_group_idB\x11\n\x0f_thumbnail_linkB&\n$_aggregated_reporting_context_statusB\x14\n\x12_reporting_contextB\x17\n\x15_click_potential_rank\"\x81\x06\n\x1fPriceCompetitivenessProductView\x12 \n\x13report_country_code\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x0f\n\x02id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x08offer_id\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x12\n\x05title\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\x07 \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\x08 \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\t \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\n \x01(\tH\t\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18\x0b \x01(\tH\n\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18\x0c \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18\r \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18\x0e \x01(\tH\r\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18\x0f \x01(\tH\x0e\x88\x01\x01\x12*\n\x05price\x18\x10 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x34\n\x0f\x62\x65nchmark_price\x18\x11 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x16\n\x14_report_country_codeB\x05\n\x03_idB\x0b\n\t_offer_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5\"\x83\t\n\x18PriceInsightsProductView\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08offer_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05title\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\x07 \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\x08 \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\t \x01(\tH\x08\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18\n \x01(\tH\t\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18\x0b \x01(\tH\n\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18\x0c \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18\r \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18\x0e \x01(\tH\r\x88\x01\x01\x12*\n\x05price\x18\x0f \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x34\n\x0fsuggested_price\x18\x10 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x32\n%predicted_impressions_change_fraction\x18\x11 \x01(\x01H\x0e\x88\x01\x01\x12-\n predicted_clicks_change_fraction\x18\x12 \x01(\x01H\x0f\x88\x01\x01\x12\x32\n%predicted_conversions_change_fraction\x18\x13 \x01(\x01H\x10\x88\x01\x01\x12\x62\n\reffectiveness\x18\x16 \x01(\x0e\x32K.google.shopping.merchant.reports.v1.PriceInsightsProductView.Effectiveness\"M\n\rEffectiveness\x12\x1d\n\x19\x45\x46\x46\x45\x43TIVENESS_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x42\x05\n\x03_idB\x0b\n\t_offer_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5B(\n&_predicted_impressions_change_fractionB#\n!_predicted_clicks_change_fractionB(\n&_predicted_conversions_change_fraction\"\xd7\x0b\n\x1d\x42\x65stSellersProductClusterView\x12&\n\x0breport_date\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12m\n\x12report_granularity\x18\x02 \x01(\x0e\x32L.google.shopping.merchant.reports.v1.ReportGranularity.ReportGranularityEnumH\x00\x88\x01\x01\x12 \n\x13report_country_code\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x04 \x01(\x03H\x02\x88\x01\x01\x12\x12\n\x05title\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x07 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\t \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\n \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\x0b \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\x0c \x01(\tH\t\x88\x01\x01\x12\x15\n\rvariant_gtins\x18\r \x03(\t\x12q\n\x10inventory_status\x18\x0e \x01(\x0e\x32R.google.shopping.merchant.reports.v1.BestSellersProductClusterView.InventoryStatusH\n\x88\x01\x01\x12w\n\x16\x62rand_inventory_status\x18\x0f \x01(\x0e\x32R.google.shopping.merchant.reports.v1.BestSellersProductClusterView.InventoryStatusH\x0b\x88\x01\x01\x12\x11\n\x04rank\x18\x10 \x01(\x03H\x0c\x88\x01\x01\x12\x1a\n\rprevious_rank\x18\x11 \x01(\x03H\r\x88\x01\x01\x12\x64\n\x0frelative_demand\x18\x12 \x01(\x0e\x32\x46.google.shopping.merchant.reports.v1.RelativeDemand.RelativeDemandEnumH\x0e\x88\x01\x01\x12m\n\x18previous_relative_demand\x18\x13 \x01(\x0e\x32\x46.google.shopping.merchant.reports.v1.RelativeDemand.RelativeDemandEnumH\x0f\x88\x01\x01\x12\x7f\n\x16relative_demand_change\x18\x14 \x01(\x0e\x32Z.google.shopping.merchant.reports.v1.RelativeDemandChangeType.RelativeDemandChangeTypeEnumH\x10\x88\x01\x01\"i\n\x0fInventoryStatus\x12 \n\x1cINVENTORY_STATUS_UNSPECIFIED\x10\x00\x12\x0c\n\x08IN_STOCK\x10\x01\x12\x10\n\x0cOUT_OF_STOCK\x10\x02\x12\x14\n\x10NOT_IN_INVENTORY\x10\x03\x42\x15\n\x13_report_granularityB\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x13\n\x11_inventory_statusB\x19\n\x17_brand_inventory_statusB\x07\n\x05_rankB\x10\n\x0e_previous_rankB\x12\n\x10_relative_demandB\x1b\n\x19_previous_relative_demandB\x19\n\x17_relative_demand_change\"\xc0\x06\n\x14\x42\x65stSellersBrandView\x12&\n\x0breport_date\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12m\n\x12report_granularity\x18\x02 \x01(\x0e\x32L.google.shopping.merchant.reports.v1.ReportGranularity.ReportGranularityEnumH\x00\x88\x01\x01\x12 \n\x13report_country_code\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x04 \x01(\x03H\x02\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x11\n\x04rank\x18\x07 \x01(\x03H\x04\x88\x01\x01\x12\x1a\n\rprevious_rank\x18\x08 \x01(\x03H\x05\x88\x01\x01\x12\x64\n\x0frelative_demand\x18\t \x01(\x0e\x32\x46.google.shopping.merchant.reports.v1.RelativeDemand.RelativeDemandEnumH\x06\x88\x01\x01\x12m\n\x18previous_relative_demand\x18\n \x01(\x0e\x32\x46.google.shopping.merchant.reports.v1.RelativeDemand.RelativeDemandEnumH\x07\x88\x01\x01\x12\x7f\n\x16relative_demand_change\x18\x0b \x01(\x0e\x32Z.google.shopping.merchant.reports.v1.RelativeDemandChangeType.RelativeDemandChangeTypeEnumH\x08\x88\x01\x01\x42\x15\n\x13_report_granularityB\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x08\n\x06_brandB\x07\n\x05_rankB\x10\n\x0e_previous_rankB\x12\n\x10_relative_demandB\x1b\n\x19_previous_relative_demandB\x19\n\x17_relative_demand_change\"\xdf\x01\n\x19NonProductPerformanceView\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12\x1f\n\x04week\x18\x02 \x01(\x0b\x32\x11.google.type.Date\x12\x13\n\x06\x63licks\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12\x18\n\x0bimpressions\x18\x04 \x01(\x03H\x01\x88\x01\x01\x12\x1f\n\x12\x63lick_through_rate\x18\x05 \x01(\x01H\x02\x88\x01\x01\x42\t\n\x07_clicksB\x0e\n\x0c_impressionsB\x15\n\x13_click_through_rate\"\xfc\x04\n#CompetitiveVisibilityCompetitorView\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12\x13\n\x06\x64omain\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0eis_your_domain\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12 \n\x13report_country_code\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12\x61\n\x0etraffic_source\x18\x06 \x01(\x0e\x32\x44.google.shopping.merchant.reports.v1.TrafficSource.TrafficSourceEnumH\x04\x88\x01\x01\x12\x11\n\x04rank\x18\x07 \x01(\x03H\x05\x88\x01\x01\x12\x1e\n\x11\x61\x64s_organic_ratio\x18\x08 \x01(\x01H\x06\x88\x01\x01\x12\x1e\n\x11page_overlap_rate\x18\t \x01(\x01H\x07\x88\x01\x01\x12!\n\x14higher_position_rate\x18\n \x01(\x01H\x08\x88\x01\x01\x12 \n\x13relative_visibility\x18\x0b \x01(\x01H\t\x88\x01\x01\x42\t\n\x07_domainB\x11\n\x0f_is_your_domainB\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x11\n\x0f_traffic_sourceB\x07\n\x05_rankB\x14\n\x12_ads_organic_ratioB\x14\n\x12_page_overlap_rateB\x17\n\x15_higher_position_rateB\x16\n\x14_relative_visibility\"\xc3\x04\n$CompetitiveVisibilityTopMerchantView\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12\x13\n\x06\x64omain\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0eis_your_domain\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12 \n\x13report_country_code\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12\x61\n\x0etraffic_source\x18\x06 \x01(\x0e\x32\x44.google.shopping.merchant.reports.v1.TrafficSource.TrafficSourceEnumH\x04\x88\x01\x01\x12\x11\n\x04rank\x18\x07 \x01(\x03H\x05\x88\x01\x01\x12\x1e\n\x11\x61\x64s_organic_ratio\x18\x08 \x01(\x01H\x06\x88\x01\x01\x12\x1e\n\x11page_overlap_rate\x18\t \x01(\x01H\x07\x88\x01\x01\x12!\n\x14higher_position_rate\x18\n \x01(\x01H\x08\x88\x01\x01\x42\t\n\x07_domainB\x11\n\x0f_is_your_domainB\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x11\n\x0f_traffic_sourceB\x07\n\x05_rankB\x14\n\x12_ads_organic_ratioB\x14\n\x12_page_overlap_rateB\x17\n\x15_higher_position_rate\"\xd3\x03\n\"CompetitiveVisibilityBenchmarkView\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12 \n\x13report_country_code\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x03 \x01(\x03H\x01\x88\x01\x01\x12\x61\n\x0etraffic_source\x18\x04 \x01(\x0e\x32\x44.google.shopping.merchant.reports.v1.TrafficSource.TrafficSourceEnumH\x02\x88\x01\x01\x12)\n\x1cyour_domain_visibility_trend\x18\x05 \x01(\x01H\x03\x88\x01\x01\x12\x30\n#category_benchmark_visibility_trend\x18\x06 \x01(\x01H\x04\x88\x01\x01\x42\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x11\n\x0f_traffic_sourceB\x1f\n\x1d_your_domain_visibility_trendB&\n$_category_benchmark_visibility_trend\"e\n\x0fMarketingMethod\"R\n\x13MarketingMethodEnum\x12%\n!MARKETING_METHOD_ENUM_UNSPECIFIED\x10\x00\x12\x0b\n\x07ORGANIC\x10\x01\x12\x07\n\x03\x41\x44S\x10\x02\"a\n\tStoreType\"T\n\rStoreTypeEnum\x12\x1f\n\x1bSTORE_TYPE_ENUM_UNSPECIFIED\x10\x00\x12\x10\n\x0cONLINE_STORE\x10\x01\x12\x10\n\x0cLOCAL_STORES\x10\x02\"n\n\x11ReportGranularity\"Y\n\x15ReportGranularityEnum\x12\'\n#REPORT_GRANULARITY_ENUM_UNSPECIFIED\x10\x00\x12\n\n\x06WEEKLY\x10\x01\x12\x0b\n\x07MONTHLY\x10\x02\"\x88\x01\n\x0eRelativeDemand\"v\n\x12RelativeDemandEnum\x12$\n RELATIVE_DEMAND_ENUM_UNSPECIFIED\x10\x00\x12\x0c\n\x08VERY_LOW\x10\n\x12\x07\n\x03LOW\x10\x14\x12\n\n\x06MEDIUM\x10\x1e\x12\x08\n\x04HIGH\x10(\x12\r\n\tVERY_HIGH\x10\x32\"\x8d\x01\n\x18RelativeDemandChangeType\"q\n\x1cRelativeDemandChangeTypeEnum\x12\x30\n,RELATIVE_DEMAND_CHANGE_TYPE_ENUM_UNSPECIFIED\x10\x00\x12\n\n\x06SINKER\x10\x01\x12\x08\n\x04\x46LAT\x10\x02\x12\t\n\x05RISER\x10\x03\"h\n\rTrafficSource\"W\n\x11TrafficSourceEnum\x12#\n\x1fTRAFFIC_SOURCE_ENUM_UNSPECIFIED\x10\x00\x12\x0b\n\x07ORGANIC\x10\x01\x12\x07\n\x03\x41\x44S\x10\x02\x12\x07\n\x03\x41LL\x10\x03\x32\x90\x02\n\rReportService\x12\xb5\x01\n\x06Search\x12\x32.google.shopping.merchant.reports.v1.SearchRequest\x1a\x33.google.shopping.merchant.reports.v1.SearchResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\"./reports/v1/{parent=accounts/*}/reports:search:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xf8\x01\n\'com.google.shopping.merchant.reports.v1B\x0cReportsProtoP\x01ZGcloud.google.com/go/shopping/merchant/reports/apiv1/reportspb;reportspb\xaa\x02#Google.Shopping.Merchant.Reports.V1\xca\x02#Google\\Shopping\\Merchant\\Reports\\V1\xea\x02\'Google::Shopping::Merchant::Reports::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Reports - module V1 - SearchRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.SearchRequest").msgclass - SearchResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.SearchResponse").msgclass - ReportRow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ReportRow").msgclass - ProductPerformanceView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductPerformanceView").msgclass - ProductView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView").msgclass - ProductView::ItemIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ItemIssue").msgclass - ProductView::ItemIssue::ItemIssueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueType").msgclass - ProductView::ItemIssue::ItemIssueSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueSeverity").msgclass - ProductView::ItemIssue::ItemIssueSeverity::IssueSeverityPerReportingContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext").msgclass - ProductView::ItemIssue::ItemIssueSeverity::AggregatedIssueSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueSeverity.AggregatedIssueSeverity").enummodule - ProductView::ItemIssue::ItemIssueResolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ItemIssue.ItemIssueResolution").enummodule - ProductView::StatusPerReportingContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.StatusPerReportingContext").msgclass - ProductView::AggregatedReportingContextStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.AggregatedReportingContextStatus").enummodule - ProductView::ClickPotential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ProductView.ClickPotential").enummodule - PriceCompetitivenessProductView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.PriceCompetitivenessProductView").msgclass - PriceInsightsProductView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.PriceInsightsProductView").msgclass - PriceInsightsProductView::Effectiveness = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.PriceInsightsProductView.Effectiveness").enummodule - BestSellersProductClusterView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.BestSellersProductClusterView").msgclass - BestSellersProductClusterView::InventoryStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.BestSellersProductClusterView.InventoryStatus").enummodule - BestSellersBrandView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.BestSellersBrandView").msgclass - NonProductPerformanceView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.NonProductPerformanceView").msgclass - CompetitiveVisibilityCompetitorView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.CompetitiveVisibilityCompetitorView").msgclass - CompetitiveVisibilityTopMerchantView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.CompetitiveVisibilityTopMerchantView").msgclass - CompetitiveVisibilityBenchmarkView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.CompetitiveVisibilityBenchmarkView").msgclass - MarketingMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.MarketingMethod").msgclass - MarketingMethod::MarketingMethodEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.MarketingMethod.MarketingMethodEnum").enummodule - StoreType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.StoreType").msgclass - StoreType::StoreTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.StoreType.StoreTypeEnum").enummodule - ReportGranularity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ReportGranularity").msgclass - ReportGranularity::ReportGranularityEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.ReportGranularity.ReportGranularityEnum").enummodule - RelativeDemand = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.RelativeDemand").msgclass - RelativeDemand::RelativeDemandEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.RelativeDemand.RelativeDemandEnum").enummodule - RelativeDemandChangeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.RelativeDemandChangeType").msgclass - RelativeDemandChangeType::RelativeDemandChangeTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.RelativeDemandChangeType.RelativeDemandChangeTypeEnum").enummodule - TrafficSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.TrafficSource").msgclass - TrafficSource::TrafficSourceEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1.TrafficSource.TrafficSourceEnum").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_services_pb.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_services_pb.rb deleted file mode 100644 index fd4268bd9362..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/reports_services_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/reports/v1/reports.proto for package 'Google.Shopping.Merchant.Reports.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/reports/v1/reports_pb' - -module Google - module Shopping - module Merchant - module Reports - module V1 - module ReportService - # Service for retrieving reports and insights about your products, their - # performance, and their competitive environment on Google. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.reports.v1.ReportService' - - # Retrieves a report defined by a search query. The response might contain - # fewer rows than specified by `page_size`. Rely on `next_page_token` to - # determine if there are more rows to be requested. - rpc :Search, ::Google::Shopping::Merchant::Reports::V1::SearchRequest, ::Google::Shopping::Merchant::Reports::V1::SearchResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/rest.rb deleted file mode 100644 index 2a235a918302..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/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/reports/v1/report_service/rest" -require "google/shopping/merchant/reports/v1/version" - -module Google - module Shopping - module Merchant - module Reports - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/reports/v1/rest" - # client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/version.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/version.rb deleted file mode 100644 index b11a31574b18..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/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 Reports - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/README.md deleted file mode 100644 index 110adc2cf42e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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. - # - # Note: This field should not be used in most cases. - 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. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # 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-reports-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 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-reports-v1/proto_docs/google/shopping/merchant/reports/v1/reports.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/shopping/merchant/reports/v1/reports.rb deleted file mode 100644 index aed6f4bb1da6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/shopping/merchant/reports/v1/reports.rb +++ /dev/null @@ -1,1382 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Reports - module V1 - # Request message for the `ReportService.Search` method. - # @!attribute [rw] parent - # @return [::String] - # Required. Id of the account making the call. Must be a standalone account - # or an MCA subaccount. Format: accounts/\\{account} - # @!attribute [rw] query - # @return [::String] - # Required. Query that defines a report to be retrieved. - # - # For details on how to construct your query, see the [Query Language - # guide](/merchant/api/guides/reports/query-language). For the full list of - # available tables and fields, see the [Available - # fields][google.shopping.merchant.reports.v1.ReportRow]. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Number of `ReportRows` to retrieve in a single page. Defaults to - # 1000. Values above 100,000 are coerced to 100,000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Token of the page to retrieve. If not specified, the first page - # of results is returned. In order to request the next page of results, the - # value obtained from `next_page_token` in the previous response should be - # used. - class SearchRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ReportService.Search` method. - # @!attribute [rw] results - # @return [::Array<::Google::Shopping::Merchant::Reports::V1::ReportRow>] - # Rows that matched the search query. - # @!attribute [rw] next_page_token - # @return [::String] - # Token which can be sent as `page_token` to retrieve the next page. If - # omitted, there are no subsequent pages. - class SearchResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Result row returned from the search query. - # - # Only the message corresponding to the queried table is populated in the - # response. Within the populated message, only the fields requested explicitly - # in the query are populated. - # @!attribute [rw] product_performance_view - # @return [::Google::Shopping::Merchant::Reports::V1::ProductPerformanceView] - # Fields available for query in `product_performance_view` table. - # @!attribute [rw] non_product_performance_view - # @return [::Google::Shopping::Merchant::Reports::V1::NonProductPerformanceView] - # Fields available for query in `non_product_performance_view` table. - # @!attribute [rw] product_view - # @return [::Google::Shopping::Merchant::Reports::V1::ProductView] - # Fields available for query in `product_view` table. - # @!attribute [rw] price_competitiveness_product_view - # @return [::Google::Shopping::Merchant::Reports::V1::PriceCompetitivenessProductView] - # Fields available for query in `price_competitiveness_product_view` table. - # @!attribute [rw] price_insights_product_view - # @return [::Google::Shopping::Merchant::Reports::V1::PriceInsightsProductView] - # Fields available for query in `price_insights_product_view` table. - # @!attribute [rw] best_sellers_product_cluster_view - # @return [::Google::Shopping::Merchant::Reports::V1::BestSellersProductClusterView] - # Fields available for query in `best_sellers_product_cluster_view` table. - # @!attribute [rw] best_sellers_brand_view - # @return [::Google::Shopping::Merchant::Reports::V1::BestSellersBrandView] - # Fields available for query in `best_sellers_brand_view` table. - # @!attribute [rw] competitive_visibility_competitor_view - # @return [::Google::Shopping::Merchant::Reports::V1::CompetitiveVisibilityCompetitorView] - # Fields available for query in `competitive_visibility_competitor_view` - # table. - # @!attribute [rw] competitive_visibility_top_merchant_view - # @return [::Google::Shopping::Merchant::Reports::V1::CompetitiveVisibilityTopMerchantView] - # Fields available for query in `competitive_visibility_top_merchant_view` - # table. - # @!attribute [rw] competitive_visibility_benchmark_view - # @return [::Google::Shopping::Merchant::Reports::V1::CompetitiveVisibilityBenchmarkView] - # Fields available for query in `competitive_visibility_benchmark_view` - # table. - class ReportRow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fields available for query in `product_performance_view` table. - # - # Product performance data for your account, including performance metrics (for - # example, `clicks`) and dimensions according to which performance metrics are - # segmented (for example, `offer_id`). Values of product dimensions, such as - # `offer_id`, reflect the state of a product at the time of the impression. - # - # Segment fields cannot be selected in queries without also selecting at least - # one metric field. - # - # Values are only set for fields requested explicitly in the request's search - # query. - # @!attribute [rw] marketing_method - # @return [::Google::Shopping::Merchant::Reports::V1::MarketingMethod::MarketingMethodEnum] - # Marketing method to which metrics apply. Segment. - # @!attribute [rw] date - # @return [::Google::Type::Date] - # Date in the merchant timezone to which metrics apply. Segment. - # - # Condition on `date` is required in the `WHERE` clause. - # @!attribute [rw] week - # @return [::Google::Type::Date] - # First day of the week (Monday) of the metrics date in the merchant - # timezone. Segment. - # @!attribute [rw] customer_country_code - # @return [::String] - # Code of the country where the customer is located at the time of the event. - # Represented in the ISO 3166 format. Segment. - # - # If the customer country cannot be determined, a special 'ZZ' code is - # returned. - # @!attribute [rw] store_type - # @return [::Google::Shopping::Merchant::Reports::V1::StoreType::StoreTypeEnum] - # Store type to which metrics apply. Can be `ONLINE_STORE` or - # `LOCAL_STORES`. Segment. - # - # For `LOCAL_STORES` store type, further segmentation by a specific store - # is not available. - # @!attribute [rw] offer_id - # @return [::String] - # Merchant-provided id of the product. Segment. - # @!attribute [rw] title - # @return [::String] - # Title of the product. Segment. - # @!attribute [rw] brand - # @return [::String] - # Brand of the product. Segment. - # @!attribute [rw] category_l1 - # @return [::String] - # [Product category (1st - # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - # in Google's product taxonomy. Segment. - # @!attribute [rw] category_l2 - # @return [::String] - # [Product category (2nd - # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - # in Google's product taxonomy. Segment. - # @!attribute [rw] category_l3 - # @return [::String] - # [Product category (3rd - # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - # in Google's product taxonomy. Segment. - # @!attribute [rw] category_l4 - # @return [::String] - # [Product category (4th - # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - # in Google's product taxonomy. Segment. - # @!attribute [rw] category_l5 - # @return [::String] - # [Product category (5th - # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - # in Google's product taxonomy. Segment. - # @!attribute [rw] product_type_l1 - # @return [::String] - # [Product type (1st - # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - # in merchant's own product taxonomy. Segment. - # @!attribute [rw] product_type_l2 - # @return [::String] - # [Product type (2nd - # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - # in merchant's own product taxonomy. Segment. - # @!attribute [rw] product_type_l3 - # @return [::String] - # [Product type (3rd - # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - # in merchant's own product taxonomy. Segment. - # @!attribute [rw] product_type_l4 - # @return [::String] - # [Product type (4th - # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - # in merchant's own product taxonomy. Segment. - # @!attribute [rw] product_type_l5 - # @return [::String] - # [Product type (5th - # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - # in merchant's own product taxonomy. Segment. - # @!attribute [rw] custom_label0 - # @return [::String] - # Custom label 0 for custom grouping of products. Segment. - # @!attribute [rw] custom_label1 - # @return [::String] - # Custom label 1 for custom grouping of products. Segment. - # @!attribute [rw] custom_label2 - # @return [::String] - # Custom label 2 for custom grouping of products. Segment. - # @!attribute [rw] custom_label3 - # @return [::String] - # Custom label 3 for custom grouping of products. Segment. - # @!attribute [rw] custom_label4 - # @return [::String] - # Custom label 4 for custom grouping of products. Segment. - # @!attribute [rw] clicks - # @return [::Integer] - # Number of clicks. Metric. - # @!attribute [rw] impressions - # @return [::Integer] - # Number of times merchant's products are shown. Metric. - # @!attribute [rw] click_through_rate - # @return [::Float] - # Click-through rate - the number of clicks merchant's products receive - # (clicks) divided by the number of times the products are shown - # (impressions). Metric. - # @!attribute [rw] conversions - # @return [::Float] - # Number of conversions attributed to the product, reported on the conversion - # date. Depending on the attribution model, a conversion might be distributed - # across multiple clicks, where each click gets its own credit assigned. This - # metric is a sum of all such credits. Metric. - # - # Available only for the `FREE` traffic source. - # @!attribute [rw] conversion_value - # @return [::Google::Shopping::Type::Price] - # Value of conversions attributed to the product, reported on the conversion - # date. Metric. - # - # Available only for the `FREE` traffic source. - # @!attribute [rw] conversion_rate - # @return [::Float] - # Number of conversions divided by the number of clicks, reported on the - # impression date. Metric. - # - # Available only for the `FREE` traffic source. - class ProductPerformanceView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fields available for query in `product_view` table. - # - # Products in the current inventory. Products in this table are the - # same as a [Product resource in Products - # sub-API](https://developers.google.com/merchant/api/reference/rest/products_v1/accounts.products) - # but not all product attributes from Products sub-API are available for query - # in this table. In contrast to Products sub-API, this table allows to filter - # the returned list of products by product attributes. To retrieve a single - # product by `id` or list all products, Products sub-API should be used. - # - # Values are only set for fields requested explicitly in the request's search - # query. - # @!attribute [rw] id - # @return [::String] - # REST ID of the product, in the form of - # `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate - # on products take this as their `name` parameter. - # - # Required in the `SELECT` clause. - # @!attribute [rw] channel - # @return [::Google::Shopping::Type::Channel::ChannelEnum] - # Channel of the product. Can be `ONLINE` or `LOCAL`. - # @!attribute [rw] language_code - # @return [::String] - # Language code of the product in BCP 47 format. - # @!attribute [rw] feed_label - # @return [::String] - # Feed label of the product. - # @!attribute [rw] offer_id - # @return [::String] - # Merchant-provided id of the product. - # @!attribute [rw] title - # @return [::String] - # Title of the product. - # @!attribute [rw] brand - # @return [::String] - # Brand of the product. - # @!attribute [rw] category_l1 - # @return [::String] - # Product category (1st level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l2 - # @return [::String] - # Product category (2nd level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l3 - # @return [::String] - # Product category (3rd level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l4 - # @return [::String] - # Product category (4th level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l5 - # @return [::String] - # Product category (5th level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] product_type_l1 - # @return [::String] - # Product type (1st level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l2 - # @return [::String] - # Product type (2nd level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l3 - # @return [::String] - # Product type (3rd level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l4 - # @return [::String] - # Product type (4th level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l5 - # @return [::String] - # Product type (5th level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Product price. Absent if the information about the price of the product is - # not available. - # @!attribute [rw] condition - # @return [::String] - # [Condition](https://support.google.com/merchants/answer/6324469) of the - # product. - # @!attribute [rw] availability - # @return [::String] - # [Availability](https://support.google.com/merchants/answer/6324448) of the - # product. - # @!attribute [rw] shipping_label - # @return [::String] - # Normalized [shipping - # label](https://support.google.com/merchants/answer/6324504) specified in - # the data source. - # @!attribute [rw] gtin - # @return [::Array<::String>] - # List of Global Trade Item Numbers (GTINs) of the product. - # @!attribute [rw] item_group_id - # @return [::String] - # Item group id provided by the merchant for grouping variants together. - # @!attribute [rw] thumbnail_link - # @return [::String] - # Link to the processed image of the product, hosted on the Google - # infrastructure. - # @!attribute [rw] creation_time - # @return [::Google::Protobuf::Timestamp] - # The time the merchant created the product in timestamp seconds. - # @!attribute [rw] expiration_date - # @return [::Google::Type::Date] - # Expiration date for the product, specified on insertion. - # @!attribute [rw] aggregated_reporting_context_status - # @return [::Google::Shopping::Merchant::Reports::V1::ProductView::AggregatedReportingContextStatus] - # Aggregated status across all reporting contexts. - # - # Reporting contexts included in the computation of the aggregated status can - # be restricted using a filter on the `reporting_context` field. - # @!attribute [rw] status_per_reporting_context - # @return [::Array<::Google::Shopping::Merchant::Reports::V1::ProductView::StatusPerReportingContext>] - # Detailed product status per reporting context. - # - # Reporting contexts included in this list can be restricted using a filter - # on the `reporting_context` field. - # - # Equivalent to - # [`ProductStatus.destination_statuses`][google.shopping.merchant.products.v1.ProductStatus] - # in Products API. - # - # **This field cannot be used for sorting or filtering the results.** - # @!attribute [rw] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # Reporting context to restrict the query to. - # - # Restricts the reporting contexts returned in `status_per_reporting_context` - # and `item_issues`, and used to compute - # `aggregated_reporting_context_status`. - # - # **This field can only be used in the `WHERE` clause and cannot be selected - # in the `SELECT` clause.** - # @!attribute [rw] item_issues - # @return [::Array<::Google::Shopping::Merchant::Reports::V1::ProductView::ItemIssue>] - # List of item issues for the product. - # - # **This field cannot be used for sorting the results.** - # - # **Only selected attributes of this field (for example, - # `item_issues.severity.aggregated_severity`) can be used for filtering the - # results.** - # @!attribute [rw] click_potential - # @return [::Google::Shopping::Merchant::Reports::V1::ProductView::ClickPotential] - # Estimated performance potential compared to highest performing products of - # the merchant. - # @!attribute [rw] click_potential_rank - # @return [::Integer] - # Normalized click potential of the product. Values range from 1 to 1000, - # where 1 is the highest click potential and 1000 is the theoretical lowest. - class ProductView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Item issue associated with the product. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::Reports::V1::ProductView::ItemIssue::ItemIssueType] - # Item issue type. - # @!attribute [rw] severity - # @return [::Google::Shopping::Merchant::Reports::V1::ProductView::ItemIssue::ItemIssueSeverity] - # Item issue severity. - # @!attribute [rw] resolution - # @return [::Google::Shopping::Merchant::Reports::V1::ProductView::ItemIssue::ItemIssueResolution] - # Item issue resolution. - class ItemIssue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Issue type. - # @!attribute [rw] code - # @return [::String] - # Error code of the issue, equivalent to the `code` of [Product - # issues](https://developers.google.com/shopping-content/guides/product-issues). - # @!attribute [rw] canonical_attribute - # @return [::String] - # Canonical attribute name for attribute-specific issues. - class ItemIssueType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # How the issue affects the serving of the product. - # @!attribute [rw] severity_per_reporting_context - # @return [::Array<::Google::Shopping::Merchant::Reports::V1::ProductView::ItemIssue::ItemIssueSeverity::IssueSeverityPerReportingContext>] - # Issue severity per reporting context. - # - # Reporting contexts included in this list can be restricted using a - # filter on the `reporting_context` field. - # @!attribute [rw] aggregated_severity - # @return [::Google::Shopping::Merchant::Reports::V1::ProductView::ItemIssue::ItemIssueSeverity::AggregatedIssueSeverity] - # Aggregated severity of the issue for all reporting contexts it affects. - # - # Reporting contexts included in the computation of the aggregated - # severity can be restricted using a filter on the `reporting_context` - # field. - # - # **This field can be used for filtering the results.** - class ItemIssueSeverity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Issue severity per reporting context. - # @!attribute [rw] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # Reporting context the issue applies to. - # @!attribute [rw] disapproved_countries - # @return [::Array<::String>] - # List of disapproved countries in the reporting context, represented - # in ISO 3166 format. - # @!attribute [rw] demoted_countries - # @return [::Array<::String>] - # List of demoted countries in the reporting context, represented in - # ISO 3166 format. - class IssueSeverityPerReportingContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Issue severity aggregated for all reporting contexts. - module AggregatedIssueSeverity - # Not specified. - AGGREGATED_ISSUE_SEVERITY_UNSPECIFIED = 0 - - # Issue disapproves the product in at least one reporting context. - DISAPPROVED = 1 - - # Issue demotes the product in all reporting contexts it affects. - DEMOTED = 2 - - # Issue resolution is `PENDING_PROCESSING`. - PENDING = 3 - end - end - - # How to resolve the issue. - module ItemIssueResolution - # Not specified. - ITEM_ISSUE_RESOLUTION_UNSPECIFIED = 0 - - # The merchant has to fix the issue. - MERCHANT_ACTION = 1 - - # The issue will be resolved automatically (for example, image crawl) or - # through a Google review. No merchant action is required now. Resolution - # might lead to another issue (for example, if crawl fails). - PENDING_PROCESSING = 2 - end - end - - # Status of the product for a specific reporting context. - # - # Equivalent to - # [`DestinationStatus`][google.shopping.merchant.products.v1.ProductStatus.DestinationStatus] - # in Products API. - # @!attribute [rw] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # Reporting context the status applies to. - # @!attribute [rw] approved_countries - # @return [::Array<::String>] - # List of approved countries in the reporting context, represented in - # [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, for - # example, `US`. - # @!attribute [rw] disapproved_countries - # @return [::Array<::String>] - # List of disapproved countries in the reporting context, represented in - # [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, for - # example, `US`. - # @!attribute [rw] pending_countries - # @return [::Array<::String>] - # List of pending countries in the reporting context, represented in - # [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, for - # example, `US`. - class StatusPerReportingContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Status of the product aggregated for all reporting contexts. - # - # Reporting contexts included in the computation of the aggregated status can - # be restricted using a filter on the `reporting_context` field. - # - # Here's an example of how the aggregated status is computed: - # - # Free listings | Shopping ads | Status - # --------------|--------------|------------------------------ - # Approved | Approved | ELIGIBLE - # Approved | Pending | ELIGIBLE - # Approved | Disapproved | ELIGIBLE_LIMITED - # Pending | Pending | PENDING - # Disapproved | Disapproved | NOT_ELIGIBLE_OR_DISAPPROVED - module AggregatedReportingContextStatus - # Not specified. - AGGREGATED_REPORTING_CONTEXT_STATUS_UNSPECIFIED = 0 - - # Product is not eligible or is disapproved for all reporting contexts and - # countries. - NOT_ELIGIBLE_OR_DISAPPROVED = 1 - - # Product's status is pending in all reporting contexts and countries. - PENDING = 2 - - # Product is eligible for some (but not all) reporting contexts and - # countries. - ELIGIBLE_LIMITED = 3 - - # Product is eligible for all reporting contexts and countries. - ELIGIBLE = 4 - end - - # A product's [click - # potential](https://support.google.com/merchants/answer/188488) estimates - # its performance potential compared to highest performing products of the - # merchant. Click potential of a product helps merchants to prioritize which - # products to fix and helps them understand how products are performing - # against their potential. - module ClickPotential - # Unknown predicted clicks impact. - CLICK_POTENTIAL_UNSPECIFIED = 0 - - # Potential to receive a low number of clicks compared to the highest - # performing products of the merchant. - LOW = 1 - - # Potential to receive a moderate number of clicks compared to the highest - # performing products of the merchant. - MEDIUM = 2 - - # Potential to receive a similar number of clicks as the highest performing - # products of the merchant. - HIGH = 3 - end - end - - # Fields available for query in `price_competitiveness_product_view` table. - # - # [Price competitiveness](https://support.google.com/merchants/answer/9626903) - # report. - # - # Values are only set for fields requested explicitly in the request's search - # query. - # @!attribute [rw] report_country_code - # @return [::String] - # Country of the price benchmark. Represented in the ISO 3166 format. - # - # Required in the `SELECT` clause. - # @!attribute [rw] id - # @return [::String] - # REST ID of the product, in the form of - # `channel~languageCode~feedLabel~offerId`. Can be used to join data with the - # `product_view` table. - # - # Required in the `SELECT` clause. - # @!attribute [rw] offer_id - # @return [::String] - # Merchant-provided id of the product. - # @!attribute [rw] title - # @return [::String] - # Title of the product. - # @!attribute [rw] brand - # @return [::String] - # Brand of the product. - # @!attribute [rw] category_l1 - # @return [::String] - # Product category (1st level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l2 - # @return [::String] - # Product category (2nd level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l3 - # @return [::String] - # Product category (3rd level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l4 - # @return [::String] - # Product category (4th level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l5 - # @return [::String] - # Product category (5th level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] product_type_l1 - # @return [::String] - # Product type (1st level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l2 - # @return [::String] - # Product type (2nd level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l3 - # @return [::String] - # Product type (3rd level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l4 - # @return [::String] - # Product type (4th level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l5 - # @return [::String] - # Product type (5th level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Current price of the product. - # @!attribute [rw] benchmark_price - # @return [::Google::Shopping::Type::Price] - # Latest available price benchmark for the product's catalog in the benchmark - # country. - class PriceCompetitivenessProductView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fields available for query in `price_insights_product_view` table. - # - # [Price insights](https://support.google.com/merchants/answer/11916926) - # report. - # - # Values are only set for fields requested explicitly in the request's search - # query. - # @!attribute [rw] id - # @return [::String] - # REST ID of the product, in the form of - # `channel~languageCode~feedLabel~offerId`. Can be used to join data with the - # `product_view` table. - # - # Required in the `SELECT` clause. - # @!attribute [rw] offer_id - # @return [::String] - # Merchant-provided id of the product. - # @!attribute [rw] title - # @return [::String] - # Title of the product. - # @!attribute [rw] brand - # @return [::String] - # Brand of the product. - # @!attribute [rw] category_l1 - # @return [::String] - # Product category (1st level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l2 - # @return [::String] - # Product category (2nd level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l3 - # @return [::String] - # Product category (3rd level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l4 - # @return [::String] - # Product category (4th level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l5 - # @return [::String] - # Product category (5th level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] product_type_l1 - # @return [::String] - # Product type (1st level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l2 - # @return [::String] - # Product type (2nd level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l3 - # @return [::String] - # Product type (3rd level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l4 - # @return [::String] - # Product type (4th level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l5 - # @return [::String] - # Product type (5th level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Current price of the product. - # @!attribute [rw] suggested_price - # @return [::Google::Shopping::Type::Price] - # Latest suggested price for the product. - # @!attribute [rw] predicted_impressions_change_fraction - # @return [::Float] - # Predicted change in impressions as a fraction after introducing the - # suggested price compared to current active price. For example, 0.05 is a 5% - # predicted increase in impressions. - # @!attribute [rw] predicted_clicks_change_fraction - # @return [::Float] - # Predicted change in clicks as a fraction after introducing the - # suggested price compared to current active price. For example, 0.05 is a 5% - # predicted increase in clicks. - # @!attribute [rw] predicted_conversions_change_fraction - # @return [::Float] - # Predicted change in conversions as a fraction after introducing the - # suggested price compared to current active price. For example, 0.05 is a 5% - # predicted increase in conversions). - # @!attribute [rw] effectiveness - # @return [::Google::Shopping::Merchant::Reports::V1::PriceInsightsProductView::Effectiveness] - # The predicted effectiveness of applying the price suggestion, bucketed. - class PriceInsightsProductView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Predicted effectiveness bucket. - # - # Effectiveness indicates which products would benefit most from price - # changes. This rating takes into consideration the performance boost - # predicted by adjusting the sale price and the difference between your - # current price and the suggested price. Price suggestions with `HIGH` - # effectiveness are predicted to drive the largest increase in performance. - module Effectiveness - # Effectiveness is unknown. - EFFECTIVENESS_UNSPECIFIED = 0 - - # Effectiveness is low. - LOW = 1 - - # Effectiveness is medium. - MEDIUM = 2 - - # Effectiveness is high. - HIGH = 3 - end - end - - # Fields available for query in `best_sellers_product_cluster_view` table. - # - # [Best sellers](https://support.google.com/merchants/answer/9488679) report - # with top product clusters. A product cluster is a grouping for different - # offers and variants that represent the same product, for example, Google - # Pixel 7. - # - # Values are only set for fields requested explicitly in the request's search - # query. - # @!attribute [rw] report_date - # @return [::Google::Type::Date] - # Report date. The value of this field can only be one of the following: - # - # * The first day of the week (Monday) for weekly reports, - # * The first day of the month for monthly reports. - # - # Required in the `SELECT` clause. If a `WHERE` condition on `report_date` is - # not specified in the query, the latest available weekly or monthly report - # is returned. - # @!attribute [rw] report_granularity - # @return [::Google::Shopping::Merchant::Reports::V1::ReportGranularity::ReportGranularityEnum] - # Granularity of the report. The ranking can be done over a week or a month - # timeframe. - # - # Required in the `SELECT` clause. Condition on `report_granularity` is - # required in the `WHERE` clause. - # @!attribute [rw] report_country_code - # @return [::String] - # Country where the ranking is calculated. Represented in the ISO 3166 - # format. - # - # Required in the `SELECT` clause. Condition on `report_country_code` is - # required in the `WHERE` clause. - # @!attribute [rw] report_category_id - # @return [::Integer] - # Google product category ID to calculate the ranking for, represented in - # [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # - # Required in the `SELECT` clause. If a `WHERE` condition on - # `report_category_id` is not specified in the query, rankings for all - # top-level categories are returned. - # @!attribute [rw] title - # @return [::String] - # Title of the product cluster. - # @!attribute [rw] brand - # @return [::String] - # Brand of the product cluster. - # @!attribute [rw] category_l1 - # @return [::String] - # Product category (1st level) of the product cluster, represented in - # [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l2 - # @return [::String] - # Product category (2nd level) of the product cluster, represented in - # [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l3 - # @return [::String] - # Product category (3rd level) of the product cluster, represented in - # [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l4 - # @return [::String] - # Product category (4th level) of the product cluster, represented in - # [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l5 - # @return [::String] - # Product category (5th level) of the product cluster, represented in - # [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] variant_gtins - # @return [::Array<::String>] - # GTINs of example variants of the product cluster. - # @!attribute [rw] inventory_status - # @return [::Google::Shopping::Merchant::Reports::V1::BestSellersProductClusterView::InventoryStatus] - # Whether the product cluster is `IN_STOCK` in your product data source in at - # least one of the countries, `OUT_OF_STOCK` in your product data source in - # all countries, or `NOT_IN_INVENTORY` at all. - # - # The field doesn't take the Best sellers report country filter into account. - # @!attribute [rw] brand_inventory_status - # @return [::Google::Shopping::Merchant::Reports::V1::BestSellersProductClusterView::InventoryStatus] - # Whether there is at least one product of the brand currently `IN_STOCK` in - # your product data source in at least one of the countries, all products are - # `OUT_OF_STOCK` in your product data source in all countries, or - # `NOT_IN_INVENTORY`. - # - # The field doesn't take the Best sellers report country filter into account. - # @!attribute [rw] rank - # @return [::Integer] - # Popularity of the product cluster on Ads and organic surfaces, in the - # selected category and country, based on the estimated number of units sold. - # @!attribute [rw] previous_rank - # @return [::Integer] - # Popularity rank in the previous week or month. - # @!attribute [rw] relative_demand - # @return [::Google::Shopping::Merchant::Reports::V1::RelativeDemand::RelativeDemandEnum] - # Estimated demand in relation to the product cluster with the highest - # popularity rank in the same category and country. - # @!attribute [rw] previous_relative_demand - # @return [::Google::Shopping::Merchant::Reports::V1::RelativeDemand::RelativeDemandEnum] - # Estimated demand in relation to the product cluster with the highest - # popularity rank in the same category and country in the previous week or - # month. - # @!attribute [rw] relative_demand_change - # @return [::Google::Shopping::Merchant::Reports::V1::RelativeDemandChangeType::RelativeDemandChangeTypeEnum] - # Change in the estimated demand. Whether it rose, sank or remained flat. - class BestSellersProductClusterView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Status of the product cluster or brand in your inventory. - module InventoryStatus - # Not specified. - INVENTORY_STATUS_UNSPECIFIED = 0 - - # You have a product for this product cluster or brand in stock. - IN_STOCK = 1 - - # You have a product for this product cluster or brand in inventory but it - # is currently out of stock. - OUT_OF_STOCK = 2 - - # You do not have a product for this product cluster or brand in inventory. - NOT_IN_INVENTORY = 3 - end - end - - # Fields available for query in `best_sellers_brand_view` table. - # - # [Best sellers](https://support.google.com/merchants/answer/9488679) report - # with top brands. - # - # Values are only set for fields requested explicitly in the request's search - # query. - # @!attribute [rw] report_date - # @return [::Google::Type::Date] - # Report date. The value of this field can only be one of the following: - # - # * The first day of the week (Monday) for weekly reports, - # * The first day of the month for monthly reports. - # - # Required in the `SELECT` clause. If a `WHERE` condition on `report_date` is - # not specified in the query, the latest available weekly or monthly report - # is returned. - # @!attribute [rw] report_granularity - # @return [::Google::Shopping::Merchant::Reports::V1::ReportGranularity::ReportGranularityEnum] - # Granularity of the report. The ranking can be done over a week or a month - # timeframe. - # - # Required in the `SELECT` clause. Condition on `report_granularity` is - # required in the `WHERE` clause. - # @!attribute [rw] report_country_code - # @return [::String] - # Country where the ranking is calculated. Represented in the ISO 3166 - # format. - # - # Required in the `SELECT` clause. Condition on `report_country_code` is - # required in the `WHERE` clause. - # @!attribute [rw] report_category_id - # @return [::Integer] - # Google product category ID to calculate the ranking for, represented in - # [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # - # Required in the `SELECT` clause. If a `WHERE` condition on - # `report_category_id` is not specified in the query, rankings for all - # top-level categories are returned. - # @!attribute [rw] brand - # @return [::String] - # Name of the brand. - # @!attribute [rw] rank - # @return [::Integer] - # Popularity of the brand on Ads and organic surfaces, in the selected - # category and country, based on the estimated number of units sold. - # @!attribute [rw] previous_rank - # @return [::Integer] - # Popularity rank in the previous week or month. - # @!attribute [rw] relative_demand - # @return [::Google::Shopping::Merchant::Reports::V1::RelativeDemand::RelativeDemandEnum] - # Estimated demand in relation to the brand with the highest popularity rank - # in the same category and country. - # @!attribute [rw] previous_relative_demand - # @return [::Google::Shopping::Merchant::Reports::V1::RelativeDemand::RelativeDemandEnum] - # Estimated demand in relation to the brand with the highest popularity rank - # in the same category and country in the previous week or month. - # @!attribute [rw] relative_demand_change - # @return [::Google::Shopping::Merchant::Reports::V1::RelativeDemandChangeType::RelativeDemandChangeTypeEnum] - # Change in the estimated demand. Whether it rose, sank or remained flat. - class BestSellersBrandView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fields available for query in `non_product_performance_view` table. - # - # Performance data on images and online store links leading to your non-product - # pages. This includes performance metrics (for example, `clicks`) - # and dimensions according to which performance metrics are segmented (for - # example, `date`). - # - # Segment fields cannot be selected in queries without also selecting at least - # one metric field. - # - # Values are only set for fields requested explicitly in the request's search - # query. - # @!attribute [rw] date - # @return [::Google::Type::Date] - # Date in the merchant timezone to which metrics apply. Segment. - # - # Condition on `date` is required in the `WHERE` clause. - # @!attribute [rw] week - # @return [::Google::Type::Date] - # First day of the week (Monday) of the metrics date in the merchant - # timezone. Segment. - # @!attribute [rw] clicks - # @return [::Integer] - # Number of clicks on images and online store links leading to your - # non-product pages. Metric. - # @!attribute [rw] impressions - # @return [::Integer] - # Number of times images and online store links leading to your non-product - # pages were shown. Metric. - # @!attribute [rw] click_through_rate - # @return [::Float] - # Click-through rate - the number of clicks (`clicks`) divided by the number - # of impressions (`impressions`) of images and online store links leading to - # your non-product pages. Metric. - class NonProductPerformanceView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fields available for query in `competitive_visibility_competitor_view` table. - # - # [Competitive - # visibility](https://support.google.com/merchants/answer/11366442) report with - # businesses with similar visibility. - # - # Values are only set for fields requested explicitly in the request's search - # query. - # @!attribute [rw] date - # @return [::Google::Type::Date] - # Date of this row. - # - # A condition on `date` is required in the `WHERE` clause. - # @!attribute [rw] domain - # @return [::String] - # Domain of your competitor or your domain, if 'is_your_domain' is true. - # - # Required in the `SELECT` clause. Cannot be filtered on in the 'WHERE' - # clause. - # @!attribute [rw] is_your_domain - # @return [::Boolean] - # True if this row contains data for your domain. - # - # Cannot be filtered on in the 'WHERE' clause. - # @!attribute [rw] report_country_code - # @return [::String] - # Country where impressions appeared. - # - # Required in the `SELECT` clause. A condition on `report_country_code` is - # required in the `WHERE` clause. - # @!attribute [rw] report_category_id - # @return [::Integer] - # Google product category ID to calculate the report for, represented in - # [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # - # Required in the `SELECT` clause. A condition on `report_category_id` is - # required in the `WHERE` clause. - # @!attribute [rw] traffic_source - # @return [::Google::Shopping::Merchant::Reports::V1::TrafficSource::TrafficSourceEnum] - # Traffic source of impressions. - # - # Required in the `SELECT` clause. - # @!attribute [rw] rank - # @return [::Integer] - # Position of the domain in the similar businesses ranking for the selected - # keys (`date`, `report_category_id`, `report_country_code`, - # `traffic_source`) based on impressions. 1 is the highest. - # - # Cannot be filtered on in the 'WHERE' clause. - # @!attribute [rw] ads_organic_ratio - # @return [::Float] - # [Ads / organic ratio] - # (https://support.google.com/merchants/answer/11366442#zippy=%2Cads-free-ratio) - # shows how often the domain receives impressions from Shopping ads compared - # to organic traffic. The number is rounded and bucketed. - # - # Cannot be filtered on in the 'WHERE' clause. - # @!attribute [rw] page_overlap_rate - # @return [::Float] - # [Page overlap rate] - # (https://support.google.com/merchants/answer/11366442#zippy=%2Cpage-overlap-rate) - # shows how frequently competing retailers’ offers are shown together with - # your offers on the same page. - # - # Cannot be filtered on in the 'WHERE' clause. - # @!attribute [rw] higher_position_rate - # @return [::Float] - # [Higher position rate] - # (https://support.google.com/merchants/answer/11366442#zippy=%2Chigher-position-rate) - # shows how often a competitor’s offer got placed in a higher position on the - # page than your offer. - # - # Cannot be filtered on in the 'WHERE' clause. - # @!attribute [rw] relative_visibility - # @return [::Float] - # [Relative visibility] - # (https://support.google.com/merchants/answer/11366442#zippy=%2Crelative-visibility) - # shows how often your competitors’ offers are shown compared to your offers. - # In other words, this is the number of displayed impressions of a competitor - # retailer divided by the number of your displayed impressions during a - # selected time range for a selected product category and country. - # - # Cannot be filtered on in the 'WHERE' clause. - class CompetitiveVisibilityCompetitorView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fields available for query in `competitive_visibility_top_merchant_view` - # table. - # - # [Competitive - # visibility](https://support.google.com/merchants/answer/11366442) report with - # business with highest visibility. - # - # Values are only set for fields requested explicitly in the request's search - # query. - # @!attribute [rw] date - # @return [::Google::Type::Date] - # Date of this row. - # - # Cannot be selected in the `SELECT` clause. A condition on `date` is - # required in the `WHERE` clause. - # @!attribute [rw] domain - # @return [::String] - # Domain of your competitor or your domain, if 'is_your_domain' is true. - # - # Required in the `SELECT` clause. Cannot be filtered on in the 'WHERE' - # clause. - # @!attribute [rw] is_your_domain - # @return [::Boolean] - # True if this row contains data for your domain. - # - # Cannot be filtered on in the 'WHERE' clause. - # @!attribute [rw] report_country_code - # @return [::String] - # Country where impressions appeared. - # - # Required in the `SELECT` clause. A condition on `report_country_code` is - # required in the `WHERE` clause. - # @!attribute [rw] report_category_id - # @return [::Integer] - # Google product category ID to calculate the report for, represented in - # [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # - # Required in the `SELECT` clause. A condition on `report_category_id` is - # required in the `WHERE` clause. - # @!attribute [rw] traffic_source - # @return [::Google::Shopping::Merchant::Reports::V1::TrafficSource::TrafficSourceEnum] - # Traffic source of impressions. - # - # Required in the `SELECT` clause. - # @!attribute [rw] rank - # @return [::Integer] - # Position of the domain in the top merchants ranking for the selected keys - # (`date`, `report_category_id`, `report_country_code`, `traffic_source`) - # based on impressions. 1 is the highest. - # - # Cannot be filtered on in the 'WHERE' clause. - # @!attribute [rw] ads_organic_ratio - # @return [::Float] - # [Ads / organic ratio] - # (https://support.google.com/merchants/answer/11366442#zippy=%2Cads-free-ratio) - # shows how often the domain receives impressions from Shopping ads compared - # to organic traffic. The number is rounded and bucketed. - # - # Cannot be filtered on in the 'WHERE' clause. - # @!attribute [rw] page_overlap_rate - # @return [::Float] - # [Page overlap rate] - # (https://support.google.com/merchants/answer/11366442#zippy=%2Cpage-overlap-rate) - # shows how frequently competing retailers’ offers are shown together with - # your offers on the same page. - # - # Cannot be filtered on in the 'WHERE' clause. - # @!attribute [rw] higher_position_rate - # @return [::Float] - # [Higher position rate] - # (https://support.google.com/merchants/answer/11366442#zippy=%2Chigher-position-rate) - # shows how often a competitor’s offer got placed in a higher position on the - # page than your offer. - # - # Cannot be filtered on in the 'WHERE' clause. - class CompetitiveVisibilityTopMerchantView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fields available for query in `competitive_visibility_benchmark_view` table. - # - # [Competitive - # visibility](https://support.google.com/merchants/answer/11366442) report with - # the category benchmark. - # - # Values are only set for fields requested explicitly in the request's search - # query. - # @!attribute [rw] date - # @return [::Google::Type::Date] - # Date of this row. - # - # Required in the `SELECT` clause. A condition on `date` is required in the - # `WHERE` clause. - # @!attribute [rw] report_country_code - # @return [::String] - # Country where impressions appeared. - # - # Required in the `SELECT` clause. A condition on `report_country_code` is - # required in the `WHERE` clause. - # @!attribute [rw] report_category_id - # @return [::Integer] - # Google product category ID to calculate the report for, represented in - # [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # - # Required in the `SELECT` clause. A condition on `report_category_id` is - # required in the `WHERE` clause. - # @!attribute [rw] traffic_source - # @return [::Google::Shopping::Merchant::Reports::V1::TrafficSource::TrafficSourceEnum] - # Traffic source of impressions. - # - # Required in the `SELECT` clause. - # @!attribute [rw] your_domain_visibility_trend - # @return [::Float] - # Change in visibility based on impressions for your domain with respect to - # the start of the selected time range (or first day with non-zero - # impressions). - # - # Cannot be filtered on in the 'WHERE' clause. - # @!attribute [rw] category_benchmark_visibility_trend - # @return [::Float] - # Change in visibility based on impressions with respect to the start of the - # selected time range (or first day with non-zero impressions) for a - # combined set of merchants with highest visibility approximating the - # market. - # - # Cannot be filtered on in the 'WHERE' clause. - class CompetitiveVisibilityBenchmarkView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Marketing method used to promote your products on Google (organic versus - # ads). - class MarketingMethod - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Marketing method values. - module MarketingMethodEnum - # Not specified. - MARKETING_METHOD_ENUM_UNSPECIFIED = 0 - - # Organic marketing. - ORGANIC = 1 - - # Ads-based marketing. - ADS = 2 - end - end - - # Store where the product is sold (online versus local stores). - class StoreType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Store types. - module StoreTypeEnum - # Not specified. - STORE_TYPE_ENUM_UNSPECIFIED = 0 - - # Online store. - ONLINE_STORE = 1 - - # Local (physical) stores. - LOCAL_STORES = 2 - end - end - - # Granularity of the Best sellers report. Best sellers reports are computed - # over a week and a month timeframe. - class ReportGranularity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Report granularity values. - module ReportGranularityEnum - # Not specified. - REPORT_GRANULARITY_ENUM_UNSPECIFIED = 0 - - # Report is computed over a week timeframe. - WEEKLY = 1 - - # Report is computed over a month timeframe. - MONTHLY = 2 - end - end - - # Relative demand of a product cluster or brand in the Best sellers report. - class RelativeDemand - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Relative demand values. - module RelativeDemandEnum - # Not specified. - RELATIVE_DEMAND_ENUM_UNSPECIFIED = 0 - - # Demand is 0-5% of the demand of the highest ranked product cluster or - # brand. - VERY_LOW = 10 - - # Demand is 6-10% of the demand of the highest ranked product cluster or - # brand. - LOW = 20 - - # Demand is 11-20% of the demand of the highest ranked product cluster or - # brand. - MEDIUM = 30 - - # Demand is 21-50% of the demand of the highest ranked product cluster or - # brand. - HIGH = 40 - - # Demand is 51-100% of the demand of the highest ranked product cluster or - # brand. - VERY_HIGH = 50 - end - end - - # Relative demand of a product cluster or brand in the Best sellers report - # compared to the previous time period. - class RelativeDemandChangeType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Relative demand change type values. - module RelativeDemandChangeTypeEnum - # Not specified. - RELATIVE_DEMAND_CHANGE_TYPE_ENUM_UNSPECIFIED = 0 - - # Relative demand is lower than the previous time period. - SINKER = 1 - - # Relative demand is equal to the previous time period. - FLAT = 2 - - # Relative demand is higher than the previous time period. - RISER = 3 - end - end - - # Traffic source of impressions in the Competitive visibility report. - class TrafficSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Traffic source values. - module TrafficSourceEnum - # Not specified. - TRAFFIC_SOURCE_ENUM_UNSPECIFIED = 0 - - # Organic traffic. - ORGANIC = 1 - - # Traffic from ads. - ADS = 2 - - # Organic and ads traffic. - ALL = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1/proto_docs/google/type/date.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/type/date.rb deleted file mode 100644 index a52275cebf89..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/type/date.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module 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, with a zero year (for example, an anniversary). - # * A year on its own, with a zero month and a zero day. - # * A year and month, with a zero day (for example, a credit card expiration - # date). - # - # Related types: - # - # * [google.type.TimeOfDay][google.type.TimeOfDay] - # * [google.type.DateTime][google.type.DateTime] - # * {::Google::Protobuf::Timestamp 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-reports-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-reports-v1/snippets/Gemfile deleted file mode 100644 index 6c1738151dcf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1", path: "../" -else - gem "google-shopping-merchant-reports-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-reports-v1/snippets/report_service/search.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/snippets/report_service/search.rb deleted file mode 100644 index 8ef0dd60d2ee..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/snippets/report_service/search.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_ReportService_Search_sync] -require "google/shopping/merchant/reports/v1" - -## -# Snippet for the search call in the ReportService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Reports::V1::ReportService::Client#search. -# -def search - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Reports::V1::ReportService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Reports::V1::SearchRequest.new - - # Call the search method. - result = client.search request - - # The returned object is of type Gapic::PagedEnumerable. You can 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::Reports::V1::ReportRow. - p item - end -end -# [END merchantapi_v1_generated_ReportService_Search_sync] diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/snippets/snippet_metadata_google.shopping.merchant.reports.v1.json b/owl-bot-staging/google-shopping-merchant-reports-v1/snippets/snippet_metadata_google.shopping.merchant.reports.v1.json deleted file mode 100644 index 7585e5455b25..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/snippets/snippet_metadata_google.shopping.merchant.reports.v1.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-reports-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.reports.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1_generated_ReportService_Search_sync", - "title": "Snippet for the search call in the ReportService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reports::V1::ReportService::Client#search.", - "file": "report_service/search.rb", - "language": "RUBY", - "client_method": { - "short_name": "search", - "full_name": "::Google::Shopping::Merchant::Reports::V1::ReportService::Client#search", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Reports::V1::SearchRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Reports::V1::SearchResponse", - "client": { - "short_name": "ReportService::Client", - "full_name": "::Google::Shopping::Merchant::Reports::V1::ReportService::Client" - }, - "method": { - "short_name": "Search", - "full_name": "google.shopping.merchant.reports.v1.ReportService.Search", - "service": { - "short_name": "ReportService", - "full_name": "google.shopping.merchant.reports.v1.ReportService" - } - } - }, - "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-reports-v1/test/google/shopping/merchant/reports/v1/report_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_rest_test.rb deleted file mode 100644 index a19467753f43..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_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/reports/v1/reports_pb" -require "google/shopping/merchant/reports/v1/report_service/rest" - - -class ::Google::Shopping::Merchant::Reports::V1::ReportService::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_search - # Create test objects. - client_result = ::Google::Shopping::Merchant::Reports::V1::SearchResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - - search_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::ServiceStub.stub :transcode_search_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search parent: parent, query: query, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search ::Google::Shopping::Merchant::Reports::V1::SearchRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search({ parent: parent, query: query, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search(::Google::Shopping::Merchant::Reports::V1::SearchRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_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::Reports::V1::ReportService::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::Reports::V1::ReportService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_test.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_service_test.rb deleted file mode 100644 index 7f5c30b2cc09..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/test/google/shopping/merchant/reports/v1/report_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/reports/v1/reports_pb" -require "google/shopping/merchant/reports/v1/report_service" - -class ::Google::Shopping::Merchant::Reports::V1::ReportService::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_search - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Reports::V1::SearchResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - - search_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search, name - assert_kind_of ::Google::Shopping::Merchant::Reports::V1::SearchRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["query"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search parent: parent, query: query, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search ::Google::Shopping::Merchant::Reports::V1::SearchRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search({ parent: parent, query: query, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search(::Google::Shopping::Merchant::Reports::V1::SearchRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::Reports::V1::ReportService::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::Reports::V1::ReportService::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::Reports::V1::ReportService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Reports::V1::ReportService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-reports-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -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-reports-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-reports-v1beta/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -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-reports-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-reports-v1beta/.repo-metadata.json deleted file mode 100644 index b92bd94847dc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta", - "distribution_name": "google-shopping-merchant-reports-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-reports-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-reports 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-reports-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-reports-v1beta/.rubocop.yml deleted file mode 100644 index 85545d4fdb3f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-reports-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-reports-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-reports-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-reports-v1beta/AUTHENTICATION.md deleted file mode 100644 index 9c435ebe08ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-reports-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-reports-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/reports/v1beta" - -client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::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/reports/v1beta" - -::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::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-reports-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/reports/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::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-reports-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-reports-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-reports-v1beta/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/Gemfile +++ /dev/null @@ -1,15 +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-reporters", "~> 1.8.0", require: false -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-reports-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-reports-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-reports-v1beta/README.md deleted file mode 100644 index 5b638c86ee7b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports](https://rubygems.org/gems/google-shopping-merchant-reports). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-reports-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/reports/v1beta" - -client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new -request = ::Google::Shopping::Merchant::Reports::V1beta::SearchRequest.new # (request fields as keyword arguments...) -response = client.search request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-reports-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/reports/v1beta" -require "logger" - -client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::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.2+. - -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-reports`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-reports-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-reports`. -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-reports-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-reports-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-reports-v1beta/Rakefile deleted file mode 100644 index 82433d3dd4c3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-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/reports/v1beta/report_service/credentials" - ::Google::Shopping::Merchant::Reports::V1beta::ReportService::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-reports-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-reports-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-reports-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-reports-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-reports-v1beta" - header "google-shopping-merchant-reports-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-reports-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-reports-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-reports-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-reports-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-reports-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-reports-v1beta/gapic_metadata.json deleted file mode 100644 index fb2ba43f41e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/gapic_metadata.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.reports.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::Reports::V1beta", - "services": { - "ReportService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client", - "rpcs": { - "Search": { - "methods": [ - "search" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/google-shopping-merchant-reports-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-reports-v1beta/google-shopping-merchant-reports-v1beta.gemspec deleted file mode 100644 index 2ce231f4da78..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/google-shopping-merchant-reports-v1beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/reports/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-reports-v1beta" - gem.version = Google::Shopping::Merchant::Reports::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-reports-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-reports 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.3" - 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-reports-v1beta/lib/google-shopping-merchant-reports-v1beta.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google-shopping-merchant-reports-v1beta.rb deleted file mode 100644 index 48b97fd3f8a8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google-shopping-merchant-reports-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/reports/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta.rb deleted file mode 100644 index 8f2e15f900dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/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/reports/v1beta/report_service" -require "google/shopping/merchant/reports/v1beta/version" - -module Google - module Shopping - module Merchant - module Reports - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/reports/v1beta" - # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/reports/v1beta" - # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/reports/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service.rb deleted file mode 100644 index 86b087e5ecff..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_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/reports/v1beta/version" - -require "google/shopping/merchant/reports/v1beta/report_service/credentials" -require "google/shopping/merchant/reports/v1beta/report_service/client" -require "google/shopping/merchant/reports/v1beta/report_service/rest" - -module Google - module Shopping - module Merchant - module Reports - module V1beta - ## - # Service for retrieving reports and insights about your products, their - # performance, and their competitive environment on Google. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/reports/v1beta/report_service" - # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/reports/v1beta/report_service/rest" - # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new - # - module ReportService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "report_service", "helpers.rb" -require "google/shopping/merchant/reports/v1beta/report_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/client.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/client.rb deleted file mode 100644 index 10901e1cdd1f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/client.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 "google/cloud/errors" -require "google/shopping/merchant/reports/v1beta/reports_pb" - -module Google - module Shopping - module Merchant - module Reports - module V1beta - module ReportService - ## - # Client for the ReportService service. - # - # Service for retrieving reports and insights about your products, their - # performance, and their competitive environment on Google. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :report_service_stub - - ## - # Configure the ReportService Client class. - # - # See {::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ReportService clients - # ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.configure do |config| - # config.timeout = 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", "Reports", "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 ReportService Client instance. - # - # The configuration is set to the derived mode, meaning that values 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::Reports::V1beta::ReportService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @report_service_stub.universe_domain - end - - ## - # Create a new ReportService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ReportService 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/reports/v1beta/reports_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 - - @report_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @report_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 - @report_service_stub.logger - end - - # Service calls - - ## - # Retrieves a report defined by a search query. The response might contain - # fewer rows than specified by `page_size`. Rely on `next_page_token` to - # determine if there are more rows to be requested. - # - # @overload search(request, options = nil) - # Pass arguments to `search` via a request object, either of type - # {::Google::Shopping::Merchant::Reports::V1beta::SearchRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Reports::V1beta::SearchRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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(parent: nil, query: nil, page_size: nil, page_token: nil) - # Pass arguments to `search` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Id of the account making the call. Must be a standalone account - # or an MCA subaccount. Format: accounts/\\{account} - # @param query [::String] - # Required. Query that defines a report to be retrieved. - # - # For details on how to construct your query, see the Query Language - # guide. For the full list of available tables and fields, see the Available - # fields. - # @param page_size [::Integer] - # Optional. Number of `ReportRows` to retrieve in a single page. Defaults to - # 1000. Values above 5000 are coerced to 5000. - # @param page_token [::String] - # Optional. Token of the page to retrieve. If not specified, the first page - # of results is returned. In order to request the next page of results, the - # value obtained from `next_page_token` in the previous response should be - # used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1beta::ReportRow>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1beta::ReportRow>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/reports/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Reports::V1beta::SearchRequest.new - # - # # Call the search method. - # result = client.search request - # - # # The returned object is of type Gapic::PagedEnumerable. You can 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::Reports::V1beta::ReportRow. - # p item - # end - # - def search request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reports::V1beta::SearchRequest - - # Converts hash and nil to 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.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Reports::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.search.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @report_service_stub.call_rpc :search, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @report_service_stub, :search, request, response, 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 ReportService API. - # - # This class represents the configuration for ReportService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # search to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.search.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.search.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::Reports::V1beta::ReportService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ReportService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `search` - # @return [::Gapic::Config::Method] - # - attr_reader :search - - # @private - def initialize parent_rpcs = nil - search_config = parent_rpcs.search if parent_rpcs.respond_to? :search - @search = ::Gapic::Config::Method.new search_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-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/credentials.rb deleted file mode 100644 index c11c7a9481d1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_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 Reports - module V1beta - module ReportService - # Credentials for the ReportService 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-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest.rb deleted file mode 100644 index 94cbe550a4c6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_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/reports/v1beta/version" - -require "google/shopping/merchant/reports/v1beta/report_service/credentials" -require "google/shopping/merchant/reports/v1beta/report_service/rest/client" - -module Google - module Shopping - module Merchant - module Reports - module V1beta - ## - # Service for retrieving reports and insights about your products, their - # performance, and their competitive environment on Google. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/reports/v1beta/report_service/rest" - # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new - # - module ReportService - # 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/reports/v1beta/report_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/client.rb deleted file mode 100644 index 3740e0847bdd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/client.rb +++ /dev/null @@ -1,455 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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/reports/v1beta/reports_pb" -require "google/shopping/merchant/reports/v1beta/report_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Reports - module V1beta - module ReportService - module Rest - ## - # REST client for the ReportService service. - # - # Service for retrieving reports and insights about your products, their - # performance, and their competitive environment on Google. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :report_service_stub - - ## - # Configure the ReportService Client class. - # - # See {::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ReportService clients - # ::Google::Shopping::Merchant::Reports::V1beta::ReportService::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", "Reports", "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 ReportService Client instance. - # - # The configuration is set to the derived mode, meaning that values 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::Reports::V1beta::ReportService::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 - @report_service_stub.universe_domain - end - - ## - # Create a new ReportService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ReportService 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 - - @report_service_stub = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @report_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 - @report_service_stub.logger - end - - # Service calls - - ## - # Retrieves a report defined by a search query. The response might contain - # fewer rows than specified by `page_size`. Rely on `next_page_token` to - # determine if there are more rows to be requested. - # - # @overload search(request, options = nil) - # Pass arguments to `search` via a request object, either of type - # {::Google::Shopping::Merchant::Reports::V1beta::SearchRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Reports::V1beta::SearchRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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(parent: nil, query: nil, page_size: nil, page_token: nil) - # Pass arguments to `search` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Id of the account making the call. Must be a standalone account - # or an MCA subaccount. Format: accounts/\\{account} - # @param query [::String] - # Required. Query that defines a report to be retrieved. - # - # For details on how to construct your query, see the Query Language - # guide. For the full list of available tables and fields, see the Available - # fields. - # @param page_size [::Integer] - # Optional. Number of `ReportRows` to retrieve in a single page. Defaults to - # 1000. Values above 5000 are coerced to 5000. - # @param page_token [::String] - # Optional. Token of the page to retrieve. If not specified, the first page - # of results is returned. In order to request the next page of results, the - # value obtained from `next_page_token` in the previous response should be - # used. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1beta::ReportRow>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Reports::V1beta::ReportRow>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/reports/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Reports::V1beta::SearchRequest.new - # - # # Call the search method. - # result = client.search request - # - # # The returned object is of type Gapic::PagedEnumerable. You can 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::Reports::V1beta::ReportRow. - # p item - # end - # - def search request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reports::V1beta::SearchRequest - - # Converts hash and nil to an 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.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Reports::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.search.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @report_service_stub.search request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @report_service_stub, :search, "results", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ReportService REST API. - # - # This class represents the configuration for ReportService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # search to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.search.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.search.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the ReportService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `search` - # @return [::Gapic::Config::Method] - # - attr_reader :search - - # @private - def initialize parent_rpcs = nil - search_config = parent_rpcs.search if parent_rpcs.respond_to? :search - @search = ::Gapic::Config::Method.new search_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-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/service_stub.rb deleted file mode 100644 index 319484db68ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_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/reports/v1beta/reports_pb" - -module Google - module Shopping - module Merchant - module Reports - module V1beta - module ReportService - module Rest - ## - # REST service stub for the ReportService 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 search REST call - # - # @param request_pb [::Google::Shopping::Merchant::Reports::V1beta::SearchRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Reports::V1beta::SearchResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Reports::V1beta::SearchResponse] - # A result object deserialized from the server's reply - def search request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Reports::V1beta::SearchResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the search REST call - # - # @param request_pb [::Google::Shopping::Merchant::Reports::V1beta::SearchRequest] - # 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_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/reports/v1beta/{parent}/reports:search", - 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-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_pb.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_pb.rb deleted file mode 100644 index e11221ebe26a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/shopping/merchant/reports/v1beta/reports.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' -require 'google/shopping/type/types_pb' -require 'google/type/date_pb' - - -descriptor_data = "\n5google/shopping/merchant/reports/v1beta/reports.proto\x12\'google.shopping.merchant.reports.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\x1a\x16google/type/date.proto\"i\n\rSearchRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"n\n\x0eSearchResponse\x12\x43\n\x07results\x18\x01 \x03(\x0b\x32\x32.google.shopping.merchant.reports.v1beta.ReportRow\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd0\x08\n\tReportRow\x12\x61\n\x18product_performance_view\x18\x01 \x01(\x0b\x32?.google.shopping.merchant.reports.v1beta.ProductPerformanceView\x12h\n\x1cnon_product_performance_view\x18\x07 \x01(\x0b\x32\x42.google.shopping.merchant.reports.v1beta.NonProductPerformanceView\x12J\n\x0cproduct_view\x18\x02 \x01(\x0b\x32\x34.google.shopping.merchant.reports.v1beta.ProductView\x12t\n\"price_competitiveness_product_view\x18\x03 \x01(\x0b\x32H.google.shopping.merchant.reports.v1beta.PriceCompetitivenessProductView\x12\x66\n\x1bprice_insights_product_view\x18\x04 \x01(\x0b\x32\x41.google.shopping.merchant.reports.v1beta.PriceInsightsProductView\x12q\n!best_sellers_product_cluster_view\x18\x05 \x01(\x0b\x32\x46.google.shopping.merchant.reports.v1beta.BestSellersProductClusterView\x12^\n\x17\x62\x65st_sellers_brand_view\x18\x06 \x01(\x0b\x32=.google.shopping.merchant.reports.v1beta.BestSellersBrandView\x12|\n&competitive_visibility_competitor_view\x18\x08 \x01(\x0b\x32L.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityCompetitorView\x12\x7f\n(competitive_visibility_top_merchant_view\x18\t \x01(\x0b\x32M.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityTopMerchantView\x12z\n%competitive_visibility_benchmark_view\x18\n \x01(\x0b\x32K.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityBenchmarkView\"\xc1\n\n\x16ProductPerformanceView\x12k\n\x10marketing_method\x18\x01 \x01(\x0e\x32L.google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnumH\x00\x88\x01\x01\x12\x1f\n\x04\x64\x61te\x18\x02 \x01(\x0b\x32\x11.google.type.Date\x12\x1f\n\x04week\x18\x03 \x01(\x0b\x32\x11.google.type.Date\x12\"\n\x15\x63ustomer_country_code\x18\x04 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x08offer_id\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x12\n\x05title\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x07 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\t \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\n \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\x0b \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\x0c \x01(\tH\t\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18\r \x01(\tH\n\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18\x0e \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18\x0f \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18\x10 \x01(\tH\r\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18\x11 \x01(\tH\x0e\x88\x01\x01\x12\x1a\n\rcustom_label0\x18\x12 \x01(\tH\x0f\x88\x01\x01\x12\x1a\n\rcustom_label1\x18\x13 \x01(\tH\x10\x88\x01\x01\x12\x1a\n\rcustom_label2\x18\x14 \x01(\tH\x11\x88\x01\x01\x12\x1a\n\rcustom_label3\x18\x15 \x01(\tH\x12\x88\x01\x01\x12\x1a\n\rcustom_label4\x18\x16 \x01(\tH\x13\x88\x01\x01\x12\x13\n\x06\x63licks\x18\x17 \x01(\x03H\x14\x88\x01\x01\x12\x18\n\x0bimpressions\x18\x18 \x01(\x03H\x15\x88\x01\x01\x12\x1f\n\x12\x63lick_through_rate\x18\x19 \x01(\x01H\x16\x88\x01\x01\x12\x18\n\x0b\x63onversions\x18\x1a \x01(\x01H\x17\x88\x01\x01\x12\x35\n\x10\x63onversion_value\x18\x1b \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x1c\n\x0f\x63onversion_rate\x18\x1c \x01(\x01H\x18\x88\x01\x01\x42\x13\n\x11_marketing_methodB\x18\n\x16_customer_country_codeB\x0b\n\t_offer_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5B\x10\n\x0e_custom_label0B\x10\n\x0e_custom_label1B\x10\n\x0e_custom_label2B\x10\n\x0e_custom_label3B\x10\n\x0e_custom_label4B\t\n\x07_clicksB\x0e\n\x0c_impressionsB\x15\n\x13_click_through_rateB\x0e\n\x0c_conversionsB\x12\n\x10_conversion_rate\"\xc2\x17\n\x0bProductView\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12?\n\x07\x63hannel\x18\x1c \x01(\x0e\x32).google.shopping.type.Channel.ChannelEnumH\x01\x88\x01\x01\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tH\x02\x88\x01\x01\x12\x17\n\nfeed_label\x18\x03 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08offer_id\x18\x04 \x01(\tH\x04\x88\x01\x01\x12\x12\n\x05title\x18\x05 \x01(\tH\x05\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x06 \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x07 \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\x08 \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\t \x01(\tH\t\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\n \x01(\tH\n\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\x0b \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18\x0c \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18\r \x01(\tH\r\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18\x0e \x01(\tH\x0e\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18\x0f \x01(\tH\x0f\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18\x10 \x01(\tH\x10\x88\x01\x01\x12*\n\x05price\x18\x11 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x16\n\tcondition\x18\x12 \x01(\tH\x11\x88\x01\x01\x12\x19\n\x0c\x61vailability\x18\x13 \x01(\tH\x12\x88\x01\x01\x12\x1b\n\x0eshipping_label\x18\x14 \x01(\tH\x13\x88\x01\x01\x12\x0c\n\x04gtin\x18\x15 \x03(\t\x12\x1a\n\ritem_group_id\x18\x16 \x01(\tH\x14\x88\x01\x01\x12\x1b\n\x0ethumbnail_link\x18\x17 \x01(\tH\x15\x88\x01\x01\x12\x31\n\rcreation_time\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x0f\x65xpiration_date\x18\x19 \x01(\x0b\x32\x11.google.type.Date\x12\x87\x01\n#aggregated_reporting_context_status\x18\x1a \x01(\x0e\x32U.google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatusH\x16\x88\x01\x01\x12S\n\x0bitem_issues\x18\x1b \x03(\x0b\x32>.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue\x12\\\n\x0f\x63lick_potential\x18\x1d \x01(\x0e\x32\x43.google.shopping.merchant.reports.v1beta.ProductView.ClickPotential\x12!\n\x14\x63lick_potential_rank\x18\x1e \x01(\x03H\x17\x88\x01\x01\x1a\xb3\t\n\tItemIssue\x12Z\n\x04type\x18\x01 \x01(\x0b\x32L.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueType\x12\x62\n\x08severity\x18\x02 \x01(\x0b\x32P.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity\x12k\n\nresolution\x18\x03 \x01(\x0e\x32R.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueResolutionH\x00\x88\x01\x01\x1a\x65\n\rItemIssueType\x12\x11\n\x04\x63ode\x18\x01 \x01(\tH\x00\x88\x01\x01\x12 \n\x13\x63\x61nonical_attribute\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_codeB\x16\n\x14_canonical_attribute\x1a\x97\x05\n\x11ItemIssueSeverity\x12\x99\x01\n\x1eseverity_per_reporting_context\x18\x01 \x03(\x0b\x32q.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext\x12\x8a\x01\n\x13\x61ggregated_severity\x18\x02 \x01(\x0e\x32h.google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.AggregatedIssueSeverityH\x00\x88\x01\x01\x1a\xcf\x01\n IssueSeverityPerReportingContext\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x00\x88\x01\x01\x12\x1d\n\x15\x64isapproved_countries\x18\x02 \x03(\t\x12\x19\n\x11\x64\x65moted_countries\x18\x03 \x03(\tB\x14\n\x12_reporting_context\"o\n\x17\x41ggregatedIssueSeverity\x12)\n%AGGREGATED_ISSUE_SEVERITY_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x44ISAPPROVED\x10\x01\x12\x0b\n\x07\x44\x45MOTED\x10\x02\x12\x0b\n\x07PENDING\x10\x03\x42\x16\n\x14_aggregated_severity\"i\n\x13ItemIssueResolution\x12%\n!ITEM_ISSUE_RESOLUTION_UNSPECIFIED\x10\x00\x12\x13\n\x0fMERCHANT_ACTION\x10\x01\x12\x16\n\x12PENDING_PROCESSING\x10\x02\x42\r\n\x0b_resolution\"\xa9\x01\n AggregatedReportingContextStatus\x12\x33\n/AGGREGATED_REPORTING_CONTEXT_STATUS_UNSPECIFIED\x10\x00\x12\x1f\n\x1bNOT_ELIGIBLE_OR_DISAPPROVED\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x14\n\x10\x45LIGIBLE_LIMITED\x10\x03\x12\x0c\n\x08\x45LIGIBLE\x10\x04\"P\n\x0e\x43lickPotential\x12\x1f\n\x1b\x43LICK_POTENTIAL_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x42\x05\n\x03_idB\n\n\x08_channelB\x10\n\x0e_language_codeB\r\n\x0b_feed_labelB\x0b\n\t_offer_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5B\x0c\n\n_conditionB\x0f\n\r_availabilityB\x11\n\x0f_shipping_labelB\x10\n\x0e_item_group_idB\x11\n\x0f_thumbnail_linkB&\n$_aggregated_reporting_context_statusB\x17\n\x15_click_potential_rank\"\x81\x06\n\x1fPriceCompetitivenessProductView\x12 \n\x13report_country_code\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x0f\n\x02id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x08offer_id\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x12\n\x05title\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\x07 \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\x08 \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\t \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\n \x01(\tH\t\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18\x0b \x01(\tH\n\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18\x0c \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18\r \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18\x0e \x01(\tH\r\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18\x0f \x01(\tH\x0e\x88\x01\x01\x12*\n\x05price\x18\x10 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x34\n\x0f\x62\x65nchmark_price\x18\x11 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x16\n\x14_report_country_codeB\x05\n\x03_idB\x0b\n\t_offer_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5\"\x87\t\n\x18PriceInsightsProductView\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08offer_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05title\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\x07 \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\x08 \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\t \x01(\tH\x08\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18\n \x01(\tH\t\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18\x0b \x01(\tH\n\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18\x0c \x01(\tH\x0b\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18\r \x01(\tH\x0c\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18\x0e \x01(\tH\r\x88\x01\x01\x12*\n\x05price\x18\x0f \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x34\n\x0fsuggested_price\x18\x10 \x01(\x0b\x32\x1b.google.shopping.type.Price\x12\x32\n%predicted_impressions_change_fraction\x18\x11 \x01(\x01H\x0e\x88\x01\x01\x12-\n predicted_clicks_change_fraction\x18\x12 \x01(\x01H\x0f\x88\x01\x01\x12\x32\n%predicted_conversions_change_fraction\x18\x13 \x01(\x01H\x10\x88\x01\x01\x12\x66\n\reffectiveness\x18\x16 \x01(\x0e\x32O.google.shopping.merchant.reports.v1beta.PriceInsightsProductView.Effectiveness\"M\n\rEffectiveness\x12\x1d\n\x19\x45\x46\x46\x45\x43TIVENESS_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x42\x05\n\x03_idB\x0b\n\t_offer_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5B(\n&_predicted_impressions_change_fractionB#\n!_predicted_clicks_change_fractionB(\n&_predicted_conversions_change_fraction\"\xf0\x0b\n\x1d\x42\x65stSellersProductClusterView\x12&\n\x0breport_date\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12q\n\x12report_granularity\x18\x02 \x01(\x0e\x32P.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnumH\x00\x88\x01\x01\x12 \n\x13report_country_code\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x04 \x01(\x03H\x02\x88\x01\x01\x12\x12\n\x05title\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x07 \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l1\x18\x08 \x01(\tH\x05\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l2\x18\t \x01(\tH\x06\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l3\x18\n \x01(\tH\x07\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l4\x18\x0b \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x63\x61tegory_l5\x18\x0c \x01(\tH\t\x88\x01\x01\x12\x15\n\rvariant_gtins\x18\r \x03(\t\x12u\n\x10inventory_status\x18\x0e \x01(\x0e\x32V.google.shopping.merchant.reports.v1beta.BestSellersProductClusterView.InventoryStatusH\n\x88\x01\x01\x12{\n\x16\x62rand_inventory_status\x18\x0f \x01(\x0e\x32V.google.shopping.merchant.reports.v1beta.BestSellersProductClusterView.InventoryStatusH\x0b\x88\x01\x01\x12\x11\n\x04rank\x18\x10 \x01(\x03H\x0c\x88\x01\x01\x12\x1a\n\rprevious_rank\x18\x11 \x01(\x03H\r\x88\x01\x01\x12h\n\x0frelative_demand\x18\x12 \x01(\x0e\x32J.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnumH\x0e\x88\x01\x01\x12q\n\x18previous_relative_demand\x18\x13 \x01(\x0e\x32J.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnumH\x0f\x88\x01\x01\x12\x83\x01\n\x16relative_demand_change\x18\x14 \x01(\x0e\x32^.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnumH\x10\x88\x01\x01\"i\n\x0fInventoryStatus\x12 \n\x1cINVENTORY_STATUS_UNSPECIFIED\x10\x00\x12\x0c\n\x08IN_STOCK\x10\x01\x12\x10\n\x0cOUT_OF_STOCK\x10\x02\x12\x14\n\x10NOT_IN_INVENTORY\x10\x03\x42\x15\n\x13_report_granularityB\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x08\n\x06_titleB\x08\n\x06_brandB\x0e\n\x0c_category_l1B\x0e\n\x0c_category_l2B\x0e\n\x0c_category_l3B\x0e\n\x0c_category_l4B\x0e\n\x0c_category_l5B\x13\n\x11_inventory_statusB\x19\n\x17_brand_inventory_statusB\x07\n\x05_rankB\x10\n\x0e_previous_rankB\x12\n\x10_relative_demandB\x1b\n\x19_previous_relative_demandB\x19\n\x17_relative_demand_change\"\xd1\x06\n\x14\x42\x65stSellersBrandView\x12&\n\x0breport_date\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12q\n\x12report_granularity\x18\x02 \x01(\x0e\x32P.google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnumH\x00\x88\x01\x01\x12 \n\x13report_country_code\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x04 \x01(\x03H\x02\x88\x01\x01\x12\x12\n\x05\x62rand\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x11\n\x04rank\x18\x07 \x01(\x03H\x04\x88\x01\x01\x12\x1a\n\rprevious_rank\x18\x08 \x01(\x03H\x05\x88\x01\x01\x12h\n\x0frelative_demand\x18\t \x01(\x0e\x32J.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnumH\x06\x88\x01\x01\x12q\n\x18previous_relative_demand\x18\n \x01(\x0e\x32J.google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnumH\x07\x88\x01\x01\x12\x83\x01\n\x16relative_demand_change\x18\x0b \x01(\x0e\x32^.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnumH\x08\x88\x01\x01\x42\x15\n\x13_report_granularityB\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x08\n\x06_brandB\x07\n\x05_rankB\x10\n\x0e_previous_rankB\x12\n\x10_relative_demandB\x1b\n\x19_previous_relative_demandB\x19\n\x17_relative_demand_change\"\xdf\x01\n\x19NonProductPerformanceView\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12\x1f\n\x04week\x18\x02 \x01(\x0b\x32\x11.google.type.Date\x12\x13\n\x06\x63licks\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12\x18\n\x0bimpressions\x18\x04 \x01(\x03H\x01\x88\x01\x01\x12\x1f\n\x12\x63lick_through_rate\x18\x05 \x01(\x01H\x02\x88\x01\x01\x42\t\n\x07_clicksB\x0e\n\x0c_impressionsB\x15\n\x13_click_through_rate\"\x80\x05\n#CompetitiveVisibilityCompetitorView\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12\x13\n\x06\x64omain\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0eis_your_domain\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12 \n\x13report_country_code\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12\x65\n\x0etraffic_source\x18\x06 \x01(\x0e\x32H.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnumH\x04\x88\x01\x01\x12\x11\n\x04rank\x18\x07 \x01(\x03H\x05\x88\x01\x01\x12\x1e\n\x11\x61\x64s_organic_ratio\x18\x08 \x01(\x01H\x06\x88\x01\x01\x12\x1e\n\x11page_overlap_rate\x18\t \x01(\x01H\x07\x88\x01\x01\x12!\n\x14higher_position_rate\x18\n \x01(\x01H\x08\x88\x01\x01\x12 \n\x13relative_visibility\x18\x0b \x01(\x01H\t\x88\x01\x01\x42\t\n\x07_domainB\x11\n\x0f_is_your_domainB\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x11\n\x0f_traffic_sourceB\x07\n\x05_rankB\x14\n\x12_ads_organic_ratioB\x14\n\x12_page_overlap_rateB\x17\n\x15_higher_position_rateB\x16\n\x14_relative_visibility\"\xc7\x04\n$CompetitiveVisibilityTopMerchantView\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12\x13\n\x06\x64omain\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0eis_your_domain\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12 \n\x13report_country_code\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12\x65\n\x0etraffic_source\x18\x06 \x01(\x0e\x32H.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnumH\x04\x88\x01\x01\x12\x11\n\x04rank\x18\x07 \x01(\x03H\x05\x88\x01\x01\x12\x1e\n\x11\x61\x64s_organic_ratio\x18\x08 \x01(\x01H\x06\x88\x01\x01\x12\x1e\n\x11page_overlap_rate\x18\t \x01(\x01H\x07\x88\x01\x01\x12!\n\x14higher_position_rate\x18\n \x01(\x01H\x08\x88\x01\x01\x42\t\n\x07_domainB\x11\n\x0f_is_your_domainB\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x11\n\x0f_traffic_sourceB\x07\n\x05_rankB\x14\n\x12_ads_organic_ratioB\x14\n\x12_page_overlap_rateB\x17\n\x15_higher_position_rate\"\xd7\x03\n\"CompetitiveVisibilityBenchmarkView\x12\x1f\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x11.google.type.Date\x12 \n\x13report_country_code\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1f\n\x12report_category_id\x18\x03 \x01(\x03H\x01\x88\x01\x01\x12\x65\n\x0etraffic_source\x18\x04 \x01(\x0e\x32H.google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnumH\x02\x88\x01\x01\x12)\n\x1cyour_domain_visibility_trend\x18\x05 \x01(\x01H\x03\x88\x01\x01\x12\x30\n#category_benchmark_visibility_trend\x18\x06 \x01(\x01H\x04\x88\x01\x01\x42\x16\n\x14_report_country_codeB\x15\n\x13_report_category_idB\x11\n\x0f_traffic_sourceB\x1f\n\x1d_your_domain_visibility_trendB&\n$_category_benchmark_visibility_trend\"e\n\x0fMarketingMethod\"R\n\x13MarketingMethodEnum\x12%\n!MARKETING_METHOD_ENUM_UNSPECIFIED\x10\x00\x12\x0b\n\x07ORGANIC\x10\x01\x12\x07\n\x03\x41\x44S\x10\x02\"n\n\x11ReportGranularity\"Y\n\x15ReportGranularityEnum\x12\'\n#REPORT_GRANULARITY_ENUM_UNSPECIFIED\x10\x00\x12\n\n\x06WEEKLY\x10\x01\x12\x0b\n\x07MONTHLY\x10\x02\"\x88\x01\n\x0eRelativeDemand\"v\n\x12RelativeDemandEnum\x12$\n RELATIVE_DEMAND_ENUM_UNSPECIFIED\x10\x00\x12\x0c\n\x08VERY_LOW\x10\n\x12\x07\n\x03LOW\x10\x14\x12\n\n\x06MEDIUM\x10\x1e\x12\x08\n\x04HIGH\x10(\x12\r\n\tVERY_HIGH\x10\x32\"\x8d\x01\n\x18RelativeDemandChangeType\"q\n\x1cRelativeDemandChangeTypeEnum\x12\x30\n,RELATIVE_DEMAND_CHANGE_TYPE_ENUM_UNSPECIFIED\x10\x00\x12\n\n\x06SINKER\x10\x01\x12\x08\n\x04\x46LAT\x10\x02\x12\t\n\x05RISER\x10\x03\"h\n\rTrafficSource\"W\n\x11TrafficSourceEnum\x12#\n\x1fTRAFFIC_SOURCE_ENUM_UNSPECIFIED\x10\x00\x12\x0b\n\x07ORGANIC\x10\x01\x12\x07\n\x03\x41\x44S\x10\x02\x12\x07\n\x03\x41LL\x10\x03\x32\x9c\x02\n\rReportService\x12\xc1\x01\n\x06Search\x12\x36.google.shopping.merchant.reports.v1beta.SearchRequest\x1a\x37.google.shopping.merchant.reports.v1beta.SearchResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\"2/reports/v1beta/{parent=accounts/*}/reports:search:\x01*\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x8a\x01\n+com.google.shopping.merchant.reports.v1betaB\x0cReportsProtoP\x01ZKcloud.google.com/go/shopping/merchant/reports/apiv1beta/reportspb;reportspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Reports - module V1beta - SearchRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.SearchRequest").msgclass - SearchResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.SearchResponse").msgclass - ReportRow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ReportRow").msgclass - ProductPerformanceView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ProductPerformanceView").msgclass - ProductView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ProductView").msgclass - ProductView::ItemIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ProductView.ItemIssue").msgclass - ProductView::ItemIssue::ItemIssueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueType").msgclass - ProductView::ItemIssue::ItemIssueSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity").msgclass - ProductView::ItemIssue::ItemIssueSeverity::IssueSeverityPerReportingContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.IssueSeverityPerReportingContext").msgclass - ProductView::ItemIssue::ItemIssueSeverity::AggregatedIssueSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueSeverity.AggregatedIssueSeverity").enummodule - ProductView::ItemIssue::ItemIssueResolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueResolution").enummodule - ProductView::AggregatedReportingContextStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ProductView.AggregatedReportingContextStatus").enummodule - ProductView::ClickPotential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ProductView.ClickPotential").enummodule - PriceCompetitivenessProductView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.PriceCompetitivenessProductView").msgclass - PriceInsightsProductView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.PriceInsightsProductView").msgclass - PriceInsightsProductView::Effectiveness = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.PriceInsightsProductView.Effectiveness").enummodule - BestSellersProductClusterView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.BestSellersProductClusterView").msgclass - BestSellersProductClusterView::InventoryStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.BestSellersProductClusterView.InventoryStatus").enummodule - BestSellersBrandView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.BestSellersBrandView").msgclass - NonProductPerformanceView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.NonProductPerformanceView").msgclass - CompetitiveVisibilityCompetitorView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.CompetitiveVisibilityCompetitorView").msgclass - CompetitiveVisibilityTopMerchantView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.CompetitiveVisibilityTopMerchantView").msgclass - CompetitiveVisibilityBenchmarkView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.CompetitiveVisibilityBenchmarkView").msgclass - MarketingMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.MarketingMethod").msgclass - MarketingMethod::MarketingMethodEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum").enummodule - ReportGranularity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ReportGranularity").msgclass - ReportGranularity::ReportGranularityEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.ReportGranularity.ReportGranularityEnum").enummodule - RelativeDemand = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.RelativeDemand").msgclass - RelativeDemand::RelativeDemandEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.RelativeDemand.RelativeDemandEnum").enummodule - RelativeDemandChangeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.RelativeDemandChangeType").msgclass - RelativeDemandChangeType::RelativeDemandChangeTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.RelativeDemandChangeType.RelativeDemandChangeTypeEnum").enummodule - TrafficSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.TrafficSource").msgclass - TrafficSource::TrafficSourceEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reports.v1beta.TrafficSource.TrafficSourceEnum").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_services_pb.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_services_pb.rb deleted file mode 100644 index bfe851e2efdf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/reports_services_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/reports/v1beta/reports.proto for package 'google.shopping.merchant.reports.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/reports/v1beta/reports_pb' - -module Google - module Shopping - module Merchant - module Reports - module V1beta - module ReportService - # Service for retrieving reports and insights about your products, their - # performance, and their competitive environment on Google. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.reports.v1beta.ReportService' - - # Retrieves a report defined by a search query. The response might contain - # fewer rows than specified by `page_size`. Rely on `next_page_token` to - # determine if there are more rows to be requested. - rpc :Search, ::Google::Shopping::Merchant::Reports::V1beta::SearchRequest, ::Google::Shopping::Merchant::Reports::V1beta::SearchResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/rest.rb deleted file mode 100644 index 85baeb6c6a29..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/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/reports/v1beta/report_service/rest" -require "google/shopping/merchant/reports/v1beta/version" - -module Google - module Shopping - module Merchant - module Reports - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/reports/v1beta/rest" - # client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/version.rb deleted file mode 100644 index bf3fe029d973..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/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 Reports - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/README.md deleted file mode 100644 index 03467a3756be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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. - # - # Note: This field should not be used in most cases. - 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. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # 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-reports-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 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-reports-v1beta/proto_docs/google/shopping/merchant/reports/v1beta/reports.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/merchant/reports/v1beta/reports.rb deleted file mode 100644 index 3ab2c2d9864c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/merchant/reports/v1beta/reports.rb +++ /dev/null @@ -1,1291 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Reports - module V1beta - # Request message for the `ReportService.Search` method. - # @!attribute [rw] parent - # @return [::String] - # Required. Id of the account making the call. Must be a standalone account - # or an MCA subaccount. Format: accounts/\\{account} - # @!attribute [rw] query - # @return [::String] - # Required. Query that defines a report to be retrieved. - # - # For details on how to construct your query, see the Query Language - # guide. For the full list of available tables and fields, see the Available - # fields. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Number of `ReportRows` to retrieve in a single page. Defaults to - # 1000. Values above 5000 are coerced to 5000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Token of the page to retrieve. If not specified, the first page - # of results is returned. In order to request the next page of results, the - # value obtained from `next_page_token` in the previous response should be - # used. - class SearchRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ReportService.Search` method. - # @!attribute [rw] results - # @return [::Array<::Google::Shopping::Merchant::Reports::V1beta::ReportRow>] - # Rows that matched the search query. - # @!attribute [rw] next_page_token - # @return [::String] - # Token which can be sent as `page_token` to retrieve the next page. If - # omitted, there are no subsequent pages. - class SearchResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Result row returned from the search query. - # - # Only the message corresponding to the queried table is populated in the - # response. Within the populated message, only the fields requested explicitly - # in the query are populated. - # @!attribute [rw] product_performance_view - # @return [::Google::Shopping::Merchant::Reports::V1beta::ProductPerformanceView] - # Fields available for query in `product_performance_view` table. - # @!attribute [rw] non_product_performance_view - # @return [::Google::Shopping::Merchant::Reports::V1beta::NonProductPerformanceView] - # Fields available for query in `non_product_performance_view` table. - # @!attribute [rw] product_view - # @return [::Google::Shopping::Merchant::Reports::V1beta::ProductView] - # Fields available for query in `product_view` table. - # @!attribute [rw] price_competitiveness_product_view - # @return [::Google::Shopping::Merchant::Reports::V1beta::PriceCompetitivenessProductView] - # Fields available for query in `price_competitiveness_product_view` table. - # @!attribute [rw] price_insights_product_view - # @return [::Google::Shopping::Merchant::Reports::V1beta::PriceInsightsProductView] - # Fields available for query in `price_insights_product_view` table. - # @!attribute [rw] best_sellers_product_cluster_view - # @return [::Google::Shopping::Merchant::Reports::V1beta::BestSellersProductClusterView] - # Fields available for query in `best_sellers_product_cluster_view` table. - # @!attribute [rw] best_sellers_brand_view - # @return [::Google::Shopping::Merchant::Reports::V1beta::BestSellersBrandView] - # Fields available for query in `best_sellers_brand_view` table. - # @!attribute [rw] competitive_visibility_competitor_view - # @return [::Google::Shopping::Merchant::Reports::V1beta::CompetitiveVisibilityCompetitorView] - # Fields available for query in `competitive_visibility_competitor_view` - # table. - # @!attribute [rw] competitive_visibility_top_merchant_view - # @return [::Google::Shopping::Merchant::Reports::V1beta::CompetitiveVisibilityTopMerchantView] - # Fields available for query in `competitive_visibility_top_merchant_view` - # table. - # @!attribute [rw] competitive_visibility_benchmark_view - # @return [::Google::Shopping::Merchant::Reports::V1beta::CompetitiveVisibilityBenchmarkView] - # Fields available for query in `competitive_visibility_benchmark_view` - # table. - class ReportRow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fields available for query in `product_performance_view` table. - # - # Product performance data for your account, including performance metrics (for - # example, `clicks`) and dimensions according to which performance metrics are - # segmented (for example, `offer_id`). Values of product dimensions, such as - # `offer_id`, reflect the state of a product at the time of the impression. - # - # Segment fields cannot be selected in queries without also selecting at least - # one metric field. - # - # Values are only set for fields requested explicitly in the request's search - # query. - # @!attribute [rw] marketing_method - # @return [::Google::Shopping::Merchant::Reports::V1beta::MarketingMethod::MarketingMethodEnum] - # Marketing method to which metrics apply. Segment. - # @!attribute [rw] date - # @return [::Google::Type::Date] - # Date in the merchant timezone to which metrics apply. Segment. - # - # Condition on `date` is required in the `WHERE` clause. - # @!attribute [rw] week - # @return [::Google::Type::Date] - # First day of the week (Monday) of the metrics date in the merchant - # timezone. Segment. - # @!attribute [rw] customer_country_code - # @return [::String] - # Code of the country where the customer is located at the time of the event. - # Represented in the ISO 3166 format. Segment. - # - # If the customer country cannot be determined, a special 'ZZ' code is - # returned. - # @!attribute [rw] offer_id - # @return [::String] - # Merchant-provided id of the product. Segment. - # @!attribute [rw] title - # @return [::String] - # Title of the product. Segment. - # @!attribute [rw] brand - # @return [::String] - # Brand of the product. Segment. - # @!attribute [rw] category_l1 - # @return [::String] - # [Product category (1st - # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - # in Google's product taxonomy. Segment. - # @!attribute [rw] category_l2 - # @return [::String] - # [Product category (2nd - # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - # in Google's product taxonomy. Segment. - # @!attribute [rw] category_l3 - # @return [::String] - # [Product category (3rd - # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - # in Google's product taxonomy. Segment. - # @!attribute [rw] category_l4 - # @return [::String] - # [Product category (4th - # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - # in Google's product taxonomy. Segment. - # @!attribute [rw] category_l5 - # @return [::String] - # [Product category (5th - # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - # in Google's product taxonomy. Segment. - # @!attribute [rw] product_type_l1 - # @return [::String] - # [Product type (1st - # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - # in merchant's own product taxonomy. Segment. - # @!attribute [rw] product_type_l2 - # @return [::String] - # [Product type (2nd - # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - # in merchant's own product taxonomy. Segment. - # @!attribute [rw] product_type_l3 - # @return [::String] - # [Product type (3rd - # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - # in merchant's own product taxonomy. Segment. - # @!attribute [rw] product_type_l4 - # @return [::String] - # [Product type (4th - # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - # in merchant's own product taxonomy. Segment. - # @!attribute [rw] product_type_l5 - # @return [::String] - # [Product type (5th - # level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - # in merchant's own product taxonomy. Segment. - # @!attribute [rw] custom_label0 - # @return [::String] - # Custom label 0 for custom grouping of products. Segment. - # @!attribute [rw] custom_label1 - # @return [::String] - # Custom label 1 for custom grouping of products. Segment. - # @!attribute [rw] custom_label2 - # @return [::String] - # Custom label 2 for custom grouping of products. Segment. - # @!attribute [rw] custom_label3 - # @return [::String] - # Custom label 3 for custom grouping of products. Segment. - # @!attribute [rw] custom_label4 - # @return [::String] - # Custom label 4 for custom grouping of products. Segment. - # @!attribute [rw] clicks - # @return [::Integer] - # Number of clicks. Metric. - # @!attribute [rw] impressions - # @return [::Integer] - # Number of times merchant's products are shown. Metric. - # @!attribute [rw] click_through_rate - # @return [::Float] - # Click-through rate - the number of clicks merchant's products receive - # (clicks) divided by the number of times the products are shown - # (impressions). Metric. - # @!attribute [rw] conversions - # @return [::Float] - # Number of conversions attributed to the product, reported on the conversion - # date. Depending on the attribution model, a conversion might be distributed - # across multiple clicks, where each click gets its own credit assigned. This - # metric is a sum of all such credits. Metric. - # - # Available only for the `FREE` traffic source. - # @!attribute [rw] conversion_value - # @return [::Google::Shopping::Type::Price] - # Value of conversions attributed to the product, reported on the conversion - # date. Metric. - # - # Available only for the `FREE` traffic source. - # @!attribute [rw] conversion_rate - # @return [::Float] - # Number of conversions divided by the number of clicks, reported on the - # impression date. Metric. - # - # Available only for the `FREE` traffic source. - class ProductPerformanceView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fields available for query in `product_view` table. - # - # Products in the current inventory. Products in this table are the same as in - # Products sub-API but not all product attributes from Products sub-API are - # available for query in this table. In contrast to Products sub-API, this - # table allows to filter the returned list of products by product attributes. - # To retrieve a single product by `id` or list all products, Products sub-API - # should be used. - # - # Values are only set for fields requested explicitly in the request's search - # query. - # @!attribute [rw] id - # @return [::String] - # REST ID of the product, in the form of - # `channel~languageCode~feedLabel~offerId`. Merchant API methods that operate - # on products take this as their `name` parameter. - # - # Required in the `SELECT` clause. - # @!attribute [rw] channel - # @return [::Google::Shopping::Type::Channel::ChannelEnum] - # Channel of the product. Can be `ONLINE` or `LOCAL`. - # @!attribute [rw] language_code - # @return [::String] - # Language code of the product in BCP 47 format. - # @!attribute [rw] feed_label - # @return [::String] - # Feed label of the product. - # @!attribute [rw] offer_id - # @return [::String] - # Merchant-provided id of the product. - # @!attribute [rw] title - # @return [::String] - # Title of the product. - # @!attribute [rw] brand - # @return [::String] - # Brand of the product. - # @!attribute [rw] category_l1 - # @return [::String] - # Product category (1st level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l2 - # @return [::String] - # Product category (2nd level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l3 - # @return [::String] - # Product category (3rd level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l4 - # @return [::String] - # Product category (4th level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l5 - # @return [::String] - # Product category (5th level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] product_type_l1 - # @return [::String] - # Product type (1st level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l2 - # @return [::String] - # Product type (2nd level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l3 - # @return [::String] - # Product type (3rd level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l4 - # @return [::String] - # Product type (4th level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l5 - # @return [::String] - # Product type (5th level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Product price. Absent if the information about the price of the product is - # not available. - # @!attribute [rw] condition - # @return [::String] - # [Condition](https://support.google.com/merchants/answer/6324469) of the - # product. - # @!attribute [rw] availability - # @return [::String] - # [Availability](https://support.google.com/merchants/answer/6324448) of the - # product. - # @!attribute [rw] shipping_label - # @return [::String] - # Normalized [shipping - # label](https://support.google.com/merchants/answer/6324504) specified in - # the data source. - # @!attribute [rw] gtin - # @return [::Array<::String>] - # List of Global Trade Item Numbers (GTINs) of the product. - # @!attribute [rw] item_group_id - # @return [::String] - # Item group id provided by the merchant for grouping variants together. - # @!attribute [rw] thumbnail_link - # @return [::String] - # Link to the processed image of the product, hosted on the Google - # infrastructure. - # @!attribute [rw] creation_time - # @return [::Google::Protobuf::Timestamp] - # The time the merchant created the product in timestamp seconds. - # @!attribute [rw] expiration_date - # @return [::Google::Type::Date] - # Expiration date for the product, specified on insertion. - # @!attribute [rw] aggregated_reporting_context_status - # @return [::Google::Shopping::Merchant::Reports::V1beta::ProductView::AggregatedReportingContextStatus] - # Aggregated status. - # @!attribute [rw] item_issues - # @return [::Array<::Google::Shopping::Merchant::Reports::V1beta::ProductView::ItemIssue>] - # List of item issues for the product. - # - # **This field cannot be used for sorting the results.** - # - # **Only selected attributes of this field (for example, - # `item_issues.severity.aggregated_severity`) can be used for filtering the - # results.** - # @!attribute [rw] click_potential - # @return [::Google::Shopping::Merchant::Reports::V1beta::ProductView::ClickPotential] - # Estimated performance potential compared to highest performing products of - # the merchant. - # @!attribute [rw] click_potential_rank - # @return [::Integer] - # Rank of the product based on its click potential. A product with - # `click_potential_rank` 1 has the highest click potential among the - # merchant's products that fulfill the search query conditions. - class ProductView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Item issue associated with the product. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::Reports::V1beta::ProductView::ItemIssue::ItemIssueType] - # Item issue type. - # @!attribute [rw] severity - # @return [::Google::Shopping::Merchant::Reports::V1beta::ProductView::ItemIssue::ItemIssueSeverity] - # Item issue severity. - # @!attribute [rw] resolution - # @return [::Google::Shopping::Merchant::Reports::V1beta::ProductView::ItemIssue::ItemIssueResolution] - # Item issue resolution. - class ItemIssue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Issue type. - # @!attribute [rw] code - # @return [::String] - # Error code of the issue, equivalent to the `code` of [Product - # issues](https://developers.google.com/shopping-content/guides/product-issues). - # @!attribute [rw] canonical_attribute - # @return [::String] - # Canonical attribute name for attribute-specific issues. - class ItemIssueType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # How the issue affects the serving of the product. - # @!attribute [rw] severity_per_reporting_context - # @return [::Array<::Google::Shopping::Merchant::Reports::V1beta::ProductView::ItemIssue::ItemIssueSeverity::IssueSeverityPerReportingContext>] - # Issue severity per reporting context. - # @!attribute [rw] aggregated_severity - # @return [::Google::Shopping::Merchant::Reports::V1beta::ProductView::ItemIssue::ItemIssueSeverity::AggregatedIssueSeverity] - # Aggregated severity of the issue for all reporting contexts it affects. - # - # **This field can be used for filtering the results.** - class ItemIssueSeverity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Issue severity per reporting context. - # @!attribute [rw] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # Reporting context the issue applies to. - # @!attribute [rw] disapproved_countries - # @return [::Array<::String>] - # List of disapproved countries in the reporting context, represented - # in ISO 3166 format. - # @!attribute [rw] demoted_countries - # @return [::Array<::String>] - # List of demoted countries in the reporting context, represented in - # ISO 3166 format. - class IssueSeverityPerReportingContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Issue severity aggregated for all reporting contexts. - module AggregatedIssueSeverity - # Not specified. - AGGREGATED_ISSUE_SEVERITY_UNSPECIFIED = 0 - - # Issue disapproves the product in at least one reporting context. - DISAPPROVED = 1 - - # Issue demotes the product in all reporting contexts it affects. - DEMOTED = 2 - - # Issue resolution is `PENDING_PROCESSING`. - PENDING = 3 - end - end - - # How to resolve the issue. - module ItemIssueResolution - # Not specified. - ITEM_ISSUE_RESOLUTION_UNSPECIFIED = 0 - - # The merchant has to fix the issue. - MERCHANT_ACTION = 1 - - # The issue will be resolved automatically (for example, image crawl) or - # through a Google review. No merchant action is required now. Resolution - # might lead to another issue (for example, if crawl fails). - PENDING_PROCESSING = 2 - end - end - - # Status of the product aggregated for all reporting contexts. - # - # Here's an example of how the aggregated status is computed: - # - # Free listings | Shopping ads | Status - # --------------|--------------|------------------------------ - # Approved | Approved | ELIGIBLE - # Approved | Pending | ELIGIBLE - # Approved | Disapproved | ELIGIBLE_LIMITED - # Pending | Pending | PENDING - # Disapproved | Disapproved | NOT_ELIGIBLE_OR_DISAPPROVED - module AggregatedReportingContextStatus - # Not specified. - AGGREGATED_REPORTING_CONTEXT_STATUS_UNSPECIFIED = 0 - - # Product is not eligible or is disapproved for all reporting contexts. - NOT_ELIGIBLE_OR_DISAPPROVED = 1 - - # Product's status is pending in all reporting contexts. - PENDING = 2 - - # Product is eligible for some (but not all) reporting contexts. - ELIGIBLE_LIMITED = 3 - - # Product is eligible for all reporting contexts. - ELIGIBLE = 4 - end - - # A product's [click - # potential](https://support.google.com/merchants/answer/188488) estimates - # its performance potential compared to highest performing products of the - # merchant. Click potential of a product helps merchants to prioritize which - # products to fix and helps them understand how products are performing - # against their potential. - module ClickPotential - # Unknown predicted clicks impact. - CLICK_POTENTIAL_UNSPECIFIED = 0 - - # Potential to receive a low number of clicks compared to the highest - # performing products of the merchant. - LOW = 1 - - # Potential to receive a moderate number of clicks compared to the highest - # performing products of the merchant. - MEDIUM = 2 - - # Potential to receive a similar number of clicks as the highest performing - # products of the merchant. - HIGH = 3 - end - end - - # Fields available for query in `price_competitiveness_product_view` table. - # - # [Price competitiveness](https://support.google.com/merchants/answer/9626903) - # report. - # - # Values are only set for fields requested explicitly in the request's search - # query. - # @!attribute [rw] report_country_code - # @return [::String] - # Country of the price benchmark. Represented in the ISO 3166 format. - # - # Required in the `SELECT` clause. - # @!attribute [rw] id - # @return [::String] - # REST ID of the product, in the form of - # `channel~languageCode~feedLabel~offerId`. Can be used to join data with the - # `product_view` table. - # - # Required in the `SELECT` clause. - # @!attribute [rw] offer_id - # @return [::String] - # Merchant-provided id of the product. - # @!attribute [rw] title - # @return [::String] - # Title of the product. - # @!attribute [rw] brand - # @return [::String] - # Brand of the product. - # @!attribute [rw] category_l1 - # @return [::String] - # Product category (1st level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l2 - # @return [::String] - # Product category (2nd level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l3 - # @return [::String] - # Product category (3rd level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l4 - # @return [::String] - # Product category (4th level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l5 - # @return [::String] - # Product category (5th level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] product_type_l1 - # @return [::String] - # Product type (1st level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l2 - # @return [::String] - # Product type (2nd level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l3 - # @return [::String] - # Product type (3rd level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l4 - # @return [::String] - # Product type (4th level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l5 - # @return [::String] - # Product type (5th level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Current price of the product. - # @!attribute [rw] benchmark_price - # @return [::Google::Shopping::Type::Price] - # Latest available price benchmark for the product's catalog in the benchmark - # country. - class PriceCompetitivenessProductView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fields available for query in `price_insights_product_view` table. - # - # [Price insights](https://support.google.com/merchants/answer/11916926) - # report. - # - # Values are only set for fields requested explicitly in the request's search - # query. - # @!attribute [rw] id - # @return [::String] - # REST ID of the product, in the form of - # `channel~languageCode~feedLabel~offerId`. Can be used to join data with the - # `product_view` table. - # - # Required in the `SELECT` clause. - # @!attribute [rw] offer_id - # @return [::String] - # Merchant-provided id of the product. - # @!attribute [rw] title - # @return [::String] - # Title of the product. - # @!attribute [rw] brand - # @return [::String] - # Brand of the product. - # @!attribute [rw] category_l1 - # @return [::String] - # Product category (1st level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l2 - # @return [::String] - # Product category (2nd level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l3 - # @return [::String] - # Product category (3rd level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l4 - # @return [::String] - # Product category (4th level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l5 - # @return [::String] - # Product category (5th level) in [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] product_type_l1 - # @return [::String] - # Product type (1st level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l2 - # @return [::String] - # Product type (2nd level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l3 - # @return [::String] - # Product type (3rd level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l4 - # @return [::String] - # Product type (4th level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] product_type_l5 - # @return [::String] - # Product type (5th level) in merchant's own [product - # taxonomy](https://support.google.com/merchants/answer/6324406). - # @!attribute [rw] price - # @return [::Google::Shopping::Type::Price] - # Current price of the product. - # @!attribute [rw] suggested_price - # @return [::Google::Shopping::Type::Price] - # Latest suggested price for the product. - # @!attribute [rw] predicted_impressions_change_fraction - # @return [::Float] - # Predicted change in impressions as a fraction after introducing the - # suggested price compared to current active price. For example, 0.05 is a 5% - # predicted increase in impressions. - # @!attribute [rw] predicted_clicks_change_fraction - # @return [::Float] - # Predicted change in clicks as a fraction after introducing the - # suggested price compared to current active price. For example, 0.05 is a 5% - # predicted increase in clicks. - # @!attribute [rw] predicted_conversions_change_fraction - # @return [::Float] - # Predicted change in conversions as a fraction after introducing the - # suggested price compared to current active price. For example, 0.05 is a 5% - # predicted increase in conversions). - # @!attribute [rw] effectiveness - # @return [::Google::Shopping::Merchant::Reports::V1beta::PriceInsightsProductView::Effectiveness] - # The predicted effectiveness of applying the price suggestion, bucketed. - class PriceInsightsProductView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Predicted effectiveness bucket. - # - # Effectiveness indicates which products would benefit most from price - # changes. This rating takes into consideration the performance boost - # predicted by adjusting the sale price and the difference between your - # current price and the suggested price. Price suggestions with `HIGH` - # effectiveness are predicted to drive the largest increase in performance. - module Effectiveness - # Effectiveness is unknown. - EFFECTIVENESS_UNSPECIFIED = 0 - - # Effectiveness is low. - LOW = 1 - - # Effectiveness is medium. - MEDIUM = 2 - - # Effectiveness is high. - HIGH = 3 - end - end - - # Fields available for query in `best_sellers_product_cluster_view` table. - # - # [Best sellers](https://support.google.com/merchants/answer/9488679) report - # with top product clusters. A product cluster is a grouping for different - # offers and variants that represent the same product, for example, Google - # Pixel 7. - # - # Values are only set for fields requested explicitly in the request's search - # query. - # @!attribute [rw] report_date - # @return [::Google::Type::Date] - # Report date. The value of this field can only be one of the following: - # - # * The first day of the week (Monday) for weekly reports, - # * The first day of the month for monthly reports. - # - # Required in the `SELECT` clause. If a `WHERE` condition on `report_date` is - # not specified in the query, the latest available weekly or monthly report - # is returned. - # @!attribute [rw] report_granularity - # @return [::Google::Shopping::Merchant::Reports::V1beta::ReportGranularity::ReportGranularityEnum] - # Granularity of the report. The ranking can be done over a week or a month - # timeframe. - # - # Required in the `SELECT` clause. Condition on `report_granularity` is - # required in the `WHERE` clause. - # @!attribute [rw] report_country_code - # @return [::String] - # Country where the ranking is calculated. Represented in the ISO 3166 - # format. - # - # Required in the `SELECT` clause. Condition on `report_country_code` is - # required in the `WHERE` clause. - # @!attribute [rw] report_category_id - # @return [::Integer] - # Google product category ID to calculate the ranking for, represented in - # [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # - # Required in the `SELECT` clause. If a `WHERE` condition on - # `report_category_id` is not specified in the query, rankings for all - # top-level categories are returned. - # @!attribute [rw] title - # @return [::String] - # Title of the product cluster. - # @!attribute [rw] brand - # @return [::String] - # Brand of the product cluster. - # @!attribute [rw] category_l1 - # @return [::String] - # Product category (1st level) of the product cluster, represented in - # [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l2 - # @return [::String] - # Product category (2nd level) of the product cluster, represented in - # [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l3 - # @return [::String] - # Product category (3rd level) of the product cluster, represented in - # [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l4 - # @return [::String] - # Product category (4th level) of the product cluster, represented in - # [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] category_l5 - # @return [::String] - # Product category (5th level) of the product cluster, represented in - # [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # @!attribute [rw] variant_gtins - # @return [::Array<::String>] - # GTINs of example variants of the product cluster. - # @!attribute [rw] inventory_status - # @return [::Google::Shopping::Merchant::Reports::V1beta::BestSellersProductClusterView::InventoryStatus] - # Whether the product cluster is `IN_STOCK` in your product data source in at - # least one of the countries, `OUT_OF_STOCK` in your product data source in - # all countries, or `NOT_IN_INVENTORY` at all. - # - # The field doesn't take the Best sellers report country filter into account. - # @!attribute [rw] brand_inventory_status - # @return [::Google::Shopping::Merchant::Reports::V1beta::BestSellersProductClusterView::InventoryStatus] - # Whether there is at least one product of the brand currently `IN_STOCK` in - # your product data source in at least one of the countries, all products are - # `OUT_OF_STOCK` in your product data source in all countries, or - # `NOT_IN_INVENTORY`. - # - # The field doesn't take the Best sellers report country filter into account. - # @!attribute [rw] rank - # @return [::Integer] - # Popularity of the product cluster on Ads and organic surfaces, in the - # selected category and country, based on the estimated number of units sold. - # @!attribute [rw] previous_rank - # @return [::Integer] - # Popularity rank in the previous week or month. - # @!attribute [rw] relative_demand - # @return [::Google::Shopping::Merchant::Reports::V1beta::RelativeDemand::RelativeDemandEnum] - # Estimated demand in relation to the product cluster with the highest - # popularity rank in the same category and country. - # @!attribute [rw] previous_relative_demand - # @return [::Google::Shopping::Merchant::Reports::V1beta::RelativeDemand::RelativeDemandEnum] - # Estimated demand in relation to the product cluster with the highest - # popularity rank in the same category and country in the previous week or - # month. - # @!attribute [rw] relative_demand_change - # @return [::Google::Shopping::Merchant::Reports::V1beta::RelativeDemandChangeType::RelativeDemandChangeTypeEnum] - # Change in the estimated demand. Whether it rose, sank or remained flat. - class BestSellersProductClusterView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Status of the product cluster or brand in your inventory. - module InventoryStatus - # Not specified. - INVENTORY_STATUS_UNSPECIFIED = 0 - - # You have a product for this product cluster or brand in stock. - IN_STOCK = 1 - - # You have a product for this product cluster or brand in inventory but it - # is currently out of stock. - OUT_OF_STOCK = 2 - - # You do not have a product for this product cluster or brand in inventory. - NOT_IN_INVENTORY = 3 - end - end - - # Fields available for query in `best_sellers_brand_view` table. - # - # [Best sellers](https://support.google.com/merchants/answer/9488679) report - # with top brands. - # - # Values are only set for fields requested explicitly in the request's search - # query. - # @!attribute [rw] report_date - # @return [::Google::Type::Date] - # Report date. The value of this field can only be one of the following: - # - # * The first day of the week (Monday) for weekly reports, - # * The first day of the month for monthly reports. - # - # Required in the `SELECT` clause. If a `WHERE` condition on `report_date` is - # not specified in the query, the latest available weekly or monthly report - # is returned. - # @!attribute [rw] report_granularity - # @return [::Google::Shopping::Merchant::Reports::V1beta::ReportGranularity::ReportGranularityEnum] - # Granularity of the report. The ranking can be done over a week or a month - # timeframe. - # - # Required in the `SELECT` clause. Condition on `report_granularity` is - # required in the `WHERE` clause. - # @!attribute [rw] report_country_code - # @return [::String] - # Country where the ranking is calculated. Represented in the ISO 3166 - # format. - # - # Required in the `SELECT` clause. Condition on `report_country_code` is - # required in the `WHERE` clause. - # @!attribute [rw] report_category_id - # @return [::Integer] - # Google product category ID to calculate the ranking for, represented in - # [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # - # Required in the `SELECT` clause. If a `WHERE` condition on - # `report_category_id` is not specified in the query, rankings for all - # top-level categories are returned. - # @!attribute [rw] brand - # @return [::String] - # Name of the brand. - # @!attribute [rw] rank - # @return [::Integer] - # Popularity of the brand on Ads and organic surfaces, in the selected - # category and country, based on the estimated number of units sold. - # @!attribute [rw] previous_rank - # @return [::Integer] - # Popularity rank in the previous week or month. - # @!attribute [rw] relative_demand - # @return [::Google::Shopping::Merchant::Reports::V1beta::RelativeDemand::RelativeDemandEnum] - # Estimated demand in relation to the brand with the highest popularity rank - # in the same category and country. - # @!attribute [rw] previous_relative_demand - # @return [::Google::Shopping::Merchant::Reports::V1beta::RelativeDemand::RelativeDemandEnum] - # Estimated demand in relation to the brand with the highest popularity rank - # in the same category and country in the previous week or month. - # @!attribute [rw] relative_demand_change - # @return [::Google::Shopping::Merchant::Reports::V1beta::RelativeDemandChangeType::RelativeDemandChangeTypeEnum] - # Change in the estimated demand. Whether it rose, sank or remained flat. - class BestSellersBrandView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fields available for query in `non_product_performance_view` table. - # - # Performance data on images and online store links leading to your non-product - # pages. This includes performance metrics (for example, `clicks`) - # and dimensions according to which performance metrics are segmented (for - # example, `date`). - # - # Segment fields cannot be selected in queries without also selecting at least - # one metric field. - # - # Values are only set for fields requested explicitly in the request's search - # query. - # @!attribute [rw] date - # @return [::Google::Type::Date] - # Date in the merchant timezone to which metrics apply. Segment. - # - # Condition on `date` is required in the `WHERE` clause. - # @!attribute [rw] week - # @return [::Google::Type::Date] - # First day of the week (Monday) of the metrics date in the merchant - # timezone. Segment. - # @!attribute [rw] clicks - # @return [::Integer] - # Number of clicks on images and online store links leading to your - # non-product pages. Metric. - # @!attribute [rw] impressions - # @return [::Integer] - # Number of times images and online store links leading to your non-product - # pages were shown. Metric. - # @!attribute [rw] click_through_rate - # @return [::Float] - # Click-through rate - the number of clicks (`clicks`) divided by the number - # of impressions (`impressions`) of images and online store links leading to - # your non-product pages. Metric. - class NonProductPerformanceView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fields available for query in `competitive_visibility_competitor_view` table. - # - # [Competitive - # visibility](https://support.google.com/merchants/answer/11366442) report with - # businesses with similar visibility. - # - # Values are only set for fields requested explicitly in the request's search - # query. - # @!attribute [rw] date - # @return [::Google::Type::Date] - # Date of this row. - # - # A condition on `date` is required in the `WHERE` clause. - # @!attribute [rw] domain - # @return [::String] - # Domain of your competitor or your domain, if 'is_your_domain' is true. - # - # Required in the `SELECT` clause. Cannot be filtered on in the 'WHERE' - # clause. - # @!attribute [rw] is_your_domain - # @return [::Boolean] - # True if this row contains data for your domain. - # - # Cannot be filtered on in the 'WHERE' clause. - # @!attribute [rw] report_country_code - # @return [::String] - # Country where impressions appeared. - # - # Required in the `SELECT` clause. A condition on `report_country_code` is - # required in the `WHERE` clause. - # @!attribute [rw] report_category_id - # @return [::Integer] - # Google product category ID to calculate the report for, represented in - # [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # - # Required in the `SELECT` clause. A condition on `report_category_id` is - # required in the `WHERE` clause. - # @!attribute [rw] traffic_source - # @return [::Google::Shopping::Merchant::Reports::V1beta::TrafficSource::TrafficSourceEnum] - # Traffic source of impressions. - # - # Required in the `SELECT` clause. - # @!attribute [rw] rank - # @return [::Integer] - # Position of the domain in the similar businesses ranking for the selected - # keys (`date`, `report_category_id`, `report_country_code`, - # `traffic_source`) based on impressions. 1 is the highest. - # - # Cannot be filtered on in the 'WHERE' clause. - # @!attribute [rw] ads_organic_ratio - # @return [::Float] - # [Ads / organic ratio] - # (https://support.google.com/merchants/answer/11366442#zippy=%2Cads-free-ratio) - # shows how often the domain receives impressions from Shopping ads compared - # to organic traffic. The number is rounded and bucketed. - # - # Cannot be filtered on in the 'WHERE' clause. - # @!attribute [rw] page_overlap_rate - # @return [::Float] - # [Page overlap rate] - # (https://support.google.com/merchants/answer/11366442#zippy=%2Cpage-overlap-rate) - # shows how frequently competing retailers’ offers are shown together with - # your offers on the same page. - # - # Cannot be filtered on in the 'WHERE' clause. - # @!attribute [rw] higher_position_rate - # @return [::Float] - # [Higher position rate] - # (https://support.google.com/merchants/answer/11366442#zippy=%2Chigher-position-rate) - # shows how often a competitor’s offer got placed in a higher position on the - # page than your offer. - # - # Cannot be filtered on in the 'WHERE' clause. - # @!attribute [rw] relative_visibility - # @return [::Float] - # [Relative visibility] - # (https://support.google.com/merchants/answer/11366442#zippy=%2Crelative-visibility) - # shows how often your competitors’ offers are shown compared to your offers. - # In other words, this is the number of displayed impressions of a competitor - # retailer divided by the number of your displayed impressions during a - # selected time range for a selected product category and country. - # - # Cannot be filtered on in the 'WHERE' clause. - class CompetitiveVisibilityCompetitorView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fields available for query in `competitive_visibility_top_merchant_view` - # table. - # - # [Competitive - # visibility](https://support.google.com/merchants/answer/11366442) report with - # business with highest visibility. - # - # Values are only set for fields requested explicitly in the request's search - # query. - # @!attribute [rw] date - # @return [::Google::Type::Date] - # Date of this row. - # - # Cannot be selected in the `SELECT` clause. A condition on `date` is - # required in the `WHERE` clause. - # @!attribute [rw] domain - # @return [::String] - # Domain of your competitor or your domain, if 'is_your_domain' is true. - # - # Required in the `SELECT` clause. Cannot be filtered on in the 'WHERE' - # clause. - # @!attribute [rw] is_your_domain - # @return [::Boolean] - # True if this row contains data for your domain. - # - # Cannot be filtered on in the 'WHERE' clause. - # @!attribute [rw] report_country_code - # @return [::String] - # Country where impressions appeared. - # - # Required in the `SELECT` clause. A condition on `report_country_code` is - # required in the `WHERE` clause. - # @!attribute [rw] report_category_id - # @return [::Integer] - # Google product category ID to calculate the report for, represented in - # [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # - # Required in the `SELECT` clause. A condition on `report_category_id` is - # required in the `WHERE` clause. - # @!attribute [rw] traffic_source - # @return [::Google::Shopping::Merchant::Reports::V1beta::TrafficSource::TrafficSourceEnum] - # Traffic source of impressions. - # - # Required in the `SELECT` clause. - # @!attribute [rw] rank - # @return [::Integer] - # Position of the domain in the top merchants ranking for the selected keys - # (`date`, `report_category_id`, `report_country_code`, `traffic_source`) - # based on impressions. 1 is the highest. - # - # Cannot be filtered on in the 'WHERE' clause. - # @!attribute [rw] ads_organic_ratio - # @return [::Float] - # [Ads / organic ratio] - # (https://support.google.com/merchants/answer/11366442#zippy=%2Cads-free-ratio) - # shows how often the domain receives impressions from Shopping ads compared - # to organic traffic. The number is rounded and bucketed. - # - # Cannot be filtered on in the 'WHERE' clause. - # @!attribute [rw] page_overlap_rate - # @return [::Float] - # [Page overlap rate] - # (https://support.google.com/merchants/answer/11366442#zippy=%2Cpage-overlap-rate) - # shows how frequently competing retailers’ offers are shown together with - # your offers on the same page. - # - # Cannot be filtered on in the 'WHERE' clause. - # @!attribute [rw] higher_position_rate - # @return [::Float] - # [Higher position rate] - # (https://support.google.com/merchants/answer/11366442#zippy=%2Chigher-position-rate) - # shows how often a competitor’s offer got placed in a higher position on the - # page than your offer. - # - # Cannot be filtered on in the 'WHERE' clause. - class CompetitiveVisibilityTopMerchantView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fields available for query in `competitive_visibility_benchmark_view` table. - # - # [Competitive - # visibility](https://support.google.com/merchants/answer/11366442) report with - # the category benchmark. - # - # Values are only set for fields requested explicitly in the request's search - # query. - # @!attribute [rw] date - # @return [::Google::Type::Date] - # Date of this row. - # - # Required in the `SELECT` clause. A condition on `date` is required in the - # `WHERE` clause. - # @!attribute [rw] report_country_code - # @return [::String] - # Country where impressions appeared. - # - # Required in the `SELECT` clause. A condition on `report_country_code` is - # required in the `WHERE` clause. - # @!attribute [rw] report_category_id - # @return [::Integer] - # Google product category ID to calculate the report for, represented in - # [Google's product - # taxonomy](https://support.google.com/merchants/answer/6324436). - # - # Required in the `SELECT` clause. A condition on `report_category_id` is - # required in the `WHERE` clause. - # @!attribute [rw] traffic_source - # @return [::Google::Shopping::Merchant::Reports::V1beta::TrafficSource::TrafficSourceEnum] - # Traffic source of impressions. - # - # Required in the `SELECT` clause. - # @!attribute [rw] your_domain_visibility_trend - # @return [::Float] - # Change in visibility based on impressions for your domain with respect to - # the start of the selected time range (or first day with non-zero - # impressions). - # - # Cannot be filtered on in the 'WHERE' clause. - # @!attribute [rw] category_benchmark_visibility_trend - # @return [::Float] - # Change in visibility based on impressions with respect to the start of the - # selected time range (or first day with non-zero impressions) for a - # combined set of merchants with highest visibility approximating the - # market. - # - # Cannot be filtered on in the 'WHERE' clause. - class CompetitiveVisibilityBenchmarkView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Marketing method used to promote your products on Google (organic versus - # ads). - class MarketingMethod - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Marketing method values. - module MarketingMethodEnum - # Not specified. - MARKETING_METHOD_ENUM_UNSPECIFIED = 0 - - # Organic marketing. - ORGANIC = 1 - - # Ads-based marketing. - ADS = 2 - end - end - - # Granularity of the Best sellers report. Best sellers reports are computed - # over a week and a month timeframe. - class ReportGranularity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Report granularity values. - module ReportGranularityEnum - # Not specified. - REPORT_GRANULARITY_ENUM_UNSPECIFIED = 0 - - # Report is computed over a week timeframe. - WEEKLY = 1 - - # Report is computed over a month timeframe. - MONTHLY = 2 - end - end - - # Relative demand of a product cluster or brand in the Best sellers report. - class RelativeDemand - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Relative demand values. - module RelativeDemandEnum - # Not specified. - RELATIVE_DEMAND_ENUM_UNSPECIFIED = 0 - - # Demand is 0-5% of the demand of the highest ranked product cluster or - # brand. - VERY_LOW = 10 - - # Demand is 6-10% of the demand of the highest ranked product cluster or - # brand. - LOW = 20 - - # Demand is 11-20% of the demand of the highest ranked product cluster or - # brand. - MEDIUM = 30 - - # Demand is 21-50% of the demand of the highest ranked product cluster or - # brand. - HIGH = 40 - - # Demand is 51-100% of the demand of the highest ranked product cluster or - # brand. - VERY_HIGH = 50 - end - end - - # Relative demand of a product cluster or brand in the Best sellers report - # compared to the previous time period. - class RelativeDemandChangeType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Relative demand change type values. - module RelativeDemandChangeTypeEnum - # Not specified. - RELATIVE_DEMAND_CHANGE_TYPE_ENUM_UNSPECIFIED = 0 - - # Relative demand is lower than the previous time period. - SINKER = 1 - - # Relative demand is equal to the previous time period. - FLAT = 2 - - # Relative demand is higher than the previous time period. - RISER = 3 - end - end - - # Traffic source of impressions in the Competitive visibility report. - class TrafficSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Traffic source values. - module TrafficSourceEnum - # Not specified. - TRAFFIC_SOURCE_ENUM_UNSPECIFIED = 0 - - # Organic traffic. - ORGANIC = 1 - - # Traffic from ads. - ADS = 2 - - # Organic and ads traffic. - ALL = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta/proto_docs/google/type/date.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/type/date.rb deleted file mode 100644 index a52275cebf89..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/type/date.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module 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, with a zero year (for example, an anniversary). - # * A year on its own, with a zero month and a zero day. - # * A year and month, with a zero day (for example, a credit card expiration - # date). - # - # Related types: - # - # * [google.type.TimeOfDay][google.type.TimeOfDay] - # * [google.type.DateTime][google.type.DateTime] - # * {::Google::Protobuf::Timestamp 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-reports-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/Gemfile deleted file mode 100644 index 0ebf60951004..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-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-reports-v1beta", path: "../" -else - gem "google-shopping-merchant-reports-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-reports-v1beta/snippets/report_service/search.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/report_service/search.rb deleted file mode 100644 index 1615fd5bbdd2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/report_service/search.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_ReportService_Search_sync] -require "google/shopping/merchant/reports/v1beta" - -## -# Snippet for the search call in the ReportService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Reports::V1beta::ReportService::Client#search. -# -def search - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Reports::V1beta::SearchRequest.new - - # Call the search method. - result = client.search request - - # The returned object is of type Gapic::PagedEnumerable. You can 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::Reports::V1beta::ReportRow. - p item - end -end -# [END merchantapi_v1beta_generated_ReportService_Search_sync] diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/snippet_metadata_google.shopping.merchant.reports.v1beta.json b/owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/snippet_metadata_google.shopping.merchant.reports.v1beta.json deleted file mode 100644 index d30b4debe46b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/snippets/snippet_metadata_google.shopping.merchant.reports.v1beta.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-reports-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.reports.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_ReportService_Search_sync", - "title": "Snippet for the search call in the ReportService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reports::V1beta::ReportService::Client#search.", - "file": "report_service/search.rb", - "language": "RUBY", - "client_method": { - "short_name": "search", - "full_name": "::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client#search", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Reports::V1beta::SearchRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Reports::V1beta::SearchResponse", - "client": { - "short_name": "ReportService::Client", - "full_name": "::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client" - }, - "method": { - "short_name": "Search", - "full_name": "google.shopping.merchant.reports.v1beta.ReportService.Search", - "service": { - "short_name": "ReportService", - "full_name": "google.shopping.merchant.reports.v1beta.ReportService" - } - } - }, - "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-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_rest_test.rb deleted file mode 100644 index ff77f66f0d41..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_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/reports/v1beta/reports_pb" -require "google/shopping/merchant/reports/v1beta/report_service/rest" - - -class ::Google::Shopping::Merchant::Reports::V1beta::ReportService::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_search - # Create test objects. - client_result = ::Google::Shopping::Merchant::Reports::V1beta::SearchResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - - search_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::ServiceStub.stub :transcode_search_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.search({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.search parent: parent, query: query, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.search ::Google::Shopping::Merchant::Reports::V1beta::SearchRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.search({ parent: parent, query: query, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.search(::Google::Shopping::Merchant::Reports::V1beta::SearchRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_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::Reports::V1beta::ReportService::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::Reports::V1beta::ReportService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_test.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_service_test.rb deleted file mode 100644 index 7f566f792f0c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/google/shopping/merchant/reports/v1beta/report_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/reports/v1beta/reports_pb" -require "google/shopping/merchant/reports/v1beta/report_service" - -class ::Google::Shopping::Merchant::Reports::V1beta::ReportService::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_search - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Reports::V1beta::SearchResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - - search_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search, name - assert_kind_of ::Google::Shopping::Merchant::Reports::V1beta::SearchRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["query"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.search({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.search parent: parent, query: query, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.search ::Google::Shopping::Merchant::Reports::V1beta::SearchRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.search({ parent: parent, query: query, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.search(::Google::Shopping::Merchant::Reports::V1beta::SearchRequest.new(parent: parent, query: query, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::Reports::V1beta::ReportService::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::Reports::V1beta::ReportService::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::Reports::V1beta::ReportService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -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-reviews-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -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-reviews-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.repo-metadata.json deleted file mode 100644 index 6c6a221d183b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta", - "distribution_name": "google-shopping-merchant-reviews-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-reviews-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-reviews 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-reviews-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.rubocop.yml deleted file mode 100644 index c64b27708406..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-reviews-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-reviews-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/AUTHENTICATION.md deleted file mode 100644 index c9f59a83b49d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-reviews-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-reviews-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/reviews/v1beta" - -client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::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/reviews/v1beta" - -::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::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-reviews-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/reviews/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::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-reviews-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/Gemfile +++ /dev/null @@ -1,15 +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-reporters", "~> 1.8.0", require: false -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-reviews-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/README.md deleted file mode 100644 index 946835efee1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-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-reviews](https://rubygems.org/gems/google-shopping-merchant-reviews). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-reviews-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/reviews/v1beta" - -client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new -request = ::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest.new # (request fields as keyword arguments...) -response = client.get_merchant_review request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-reviews-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/reviews/v1beta" -require "logger" - -client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::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.2+. - -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-reviews`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-reviews-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-reviews`. -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-reviews-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-reviews-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/Rakefile deleted file mode 100644 index 5c1b99f6600f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-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/reviews/v1beta/merchant_reviews_service/credentials" - ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::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-reviews-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-reviews-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-reviews-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-reviews-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-reviews-v1beta" - header "google-shopping-merchant-reviews-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-reviews-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-reviews-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-reviews-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-reviews-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-reviews-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/gapic_metadata.json deleted file mode 100644 index d25158b3844a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/gapic_metadata.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.reviews.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::Reviews::V1beta", - "services": { - "MerchantReviewsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client", - "rpcs": { - "GetMerchantReview": { - "methods": [ - "get_merchant_review" - ] - }, - "ListMerchantReviews": { - "methods": [ - "list_merchant_reviews" - ] - }, - "InsertMerchantReview": { - "methods": [ - "insert_merchant_review" - ] - }, - "DeleteMerchantReview": { - "methods": [ - "delete_merchant_review" - ] - } - } - } - } - }, - "ProductReviewsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client", - "rpcs": { - "GetProductReview": { - "methods": [ - "get_product_review" - ] - }, - "ListProductReviews": { - "methods": [ - "list_product_reviews" - ] - }, - "InsertProductReview": { - "methods": [ - "insert_product_review" - ] - }, - "DeleteProductReview": { - "methods": [ - "delete_product_review" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/google-shopping-merchant-reviews-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/google-shopping-merchant-reviews-v1beta.gemspec deleted file mode 100644 index 7ef7a3cecb77..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/google-shopping-merchant-reviews-v1beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/reviews/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-reviews-v1beta" - gem.version = Google::Shopping::Merchant::Reviews::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-reviews-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-reviews 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.3" - 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-reviews-v1beta/lib/google-shopping-merchant-reviews-v1beta.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google-shopping-merchant-reviews-v1beta.rb deleted file mode 100644 index ca8a9748a650..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google-shopping-merchant-reviews-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/reviews/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta.rb deleted file mode 100644 index 38eb44df819d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/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/reviews/v1beta/merchant_reviews_service" -require "google/shopping/merchant/reviews/v1beta/product_reviews_service" -require "google/shopping/merchant/reviews/v1beta/version" - -module Google - module Shopping - module Merchant - module Reviews - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/reviews/v1beta" - # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/reviews/v1beta" - # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/reviews/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service.rb deleted file mode 100644 index efe1e7c73e64..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_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/reviews/v1beta/version" - -require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/credentials" -require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/paths" -require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/client" -require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest" - -module Google - module Shopping - module Merchant - module Reviews - module V1beta - ## - # Service to manage merchant reviews. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service" - # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest" - # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new - # - module MerchantReviewsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "merchant_reviews_service", "helpers.rb" -require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/client.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/client.rb deleted file mode 100644 index 379d7601a5f2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_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/reviews/v1beta/merchantreviews_pb" - -module Google - module Shopping - module Merchant - module Reviews - module V1beta - module MerchantReviewsService - ## - # Client for the MerchantReviewsService service. - # - # Service to manage merchant reviews. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :merchant_reviews_service_stub - - ## - # Configure the MerchantReviewsService Client class. - # - # See {::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all MerchantReviewsService clients - # ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.configure do |config| - # config.timeout = 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", "Reviews", "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 MerchantReviewsService Client instance. - # - # The configuration is set to the derived mode, meaning that values 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::Reviews::V1beta::MerchantReviewsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @merchant_reviews_service_stub.universe_domain - end - - ## - # Create a new MerchantReviewsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the MerchantReviewsService 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/reviews/v1beta/merchantreviews_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 - - @merchant_reviews_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @merchant_reviews_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 - @merchant_reviews_service_stub.logger - end - - # Service calls - - ## - # Gets a merchant review. - # - # @overload get_merchant_review(request, options = nil) - # Pass arguments to `get_merchant_review` via a request object, either of type - # {::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_merchant_review(name: nil) - # Pass arguments to `get_merchant_review` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The ID of the merchant review. - # Format: accounts/\\{account}/merchantReviews/\\{merchantReview} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/reviews/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest.new - # - # # Call the get_merchant_review method. - # result = client.get_merchant_review request - # - # # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::MerchantReview. - # p result - # - def get_merchant_review request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_merchant_review.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Reviews::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_merchant_review.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_merchant_review.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @merchant_reviews_service_stub.call_rpc :get_merchant_review, request, 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 merchant reviews. - # - # @overload list_merchant_reviews(request, options = nil) - # Pass arguments to `list_merchant_reviews` via a request object, either of type - # {::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_merchant_reviews(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_merchant_reviews` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 merchant reviews for. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # Optional. The maximum number of merchant reviews to return. The service can - # return fewer than this value. The maximum value is 1000; values above 1000 - # are coerced to 1000. If unspecified, the maximum number of reviews is - # returned. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListMerchantReviews` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMerchantReviews` - # 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::Reviews::V1beta::MerchantReview>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/reviews/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest.new - # - # # Call the list_merchant_reviews method. - # result = client.list_merchant_reviews request - # - # # The returned object is of type Gapic::PagedEnumerable. You can 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::Reviews::V1beta::MerchantReview. - # p item - # end - # - def list_merchant_reviews request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_merchant_reviews.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Reviews::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_merchant_reviews.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_merchant_reviews.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @merchant_reviews_service_stub.call_rpc :list_merchant_reviews, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @merchant_reviews_service_stub, :list_merchant_reviews, request, response, 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 review for your Merchant Center account. If the review - # already exists, then the review is replaced with the new instance. - # - # @overload insert_merchant_review(request, options = nil) - # Pass arguments to `insert_merchant_review` via a request object, either of type - # {::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_merchant_review(parent: nil, merchant_review: nil, data_source: nil) - # Pass arguments to `insert_merchant_review` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 the merchant review will be inserted. - # Format: accounts/\\{account} - # @param merchant_review [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview, ::Hash] - # Required. The merchant review to insert. - # @param data_source [::String] - # Required. The data source of the - # [merchantreview](https://support.google.com/merchants/answer/7045996?sjid=5253581244217581976-EU) - # Format: - # `accounts/{account}/dataSources/{datasource}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/reviews/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest.new - # - # # Call the insert_merchant_review method. - # result = client.insert_merchant_review request - # - # # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::MerchantReview. - # p result - # - def insert_merchant_review request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest - - # Converts hash and nil to 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_merchant_review.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Reviews::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_merchant_review.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_merchant_review.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @merchant_reviews_service_stub.call_rpc :insert_merchant_review, request, 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 merchant review. - # - # @overload delete_merchant_review(request, options = nil) - # Pass arguments to `delete_merchant_review` via a request object, either of type - # {::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_merchant_review(name: nil) - # Pass arguments to `delete_merchant_review` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The ID of the merchant review. - # Format: accounts/\\{account}/merchantReviews/\\{merchantReview} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::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/reviews/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest.new - # - # # Call the delete_merchant_review method. - # result = client.delete_merchant_review request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_merchant_review request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_merchant_review.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Reviews::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_merchant_review.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_merchant_review.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @merchant_reviews_service_stub.call_rpc :delete_merchant_review, request, 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 MerchantReviewsService API. - # - # This class represents the configuration for MerchantReviewsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_merchant_review to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_merchant_review.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_merchant_review.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::Reviews::V1beta::MerchantReviewsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the MerchantReviewsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_merchant_review` - # @return [::Gapic::Config::Method] - # - attr_reader :get_merchant_review - ## - # RPC-specific configuration for `list_merchant_reviews` - # @return [::Gapic::Config::Method] - # - attr_reader :list_merchant_reviews - ## - # RPC-specific configuration for `insert_merchant_review` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_merchant_review - ## - # RPC-specific configuration for `delete_merchant_review` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_merchant_review - - # @private - def initialize parent_rpcs = nil - get_merchant_review_config = parent_rpcs.get_merchant_review if parent_rpcs.respond_to? :get_merchant_review - @get_merchant_review = ::Gapic::Config::Method.new get_merchant_review_config - list_merchant_reviews_config = parent_rpcs.list_merchant_reviews if parent_rpcs.respond_to? :list_merchant_reviews - @list_merchant_reviews = ::Gapic::Config::Method.new list_merchant_reviews_config - insert_merchant_review_config = parent_rpcs.insert_merchant_review if parent_rpcs.respond_to? :insert_merchant_review - @insert_merchant_review = ::Gapic::Config::Method.new insert_merchant_review_config - delete_merchant_review_config = parent_rpcs.delete_merchant_review if parent_rpcs.respond_to? :delete_merchant_review - @delete_merchant_review = ::Gapic::Config::Method.new delete_merchant_review_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-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/credentials.rb deleted file mode 100644 index c277eb07bc1a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_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 Reviews - module V1beta - module MerchantReviewsService - # Credentials for the MerchantReviewsService 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-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/paths.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/paths.rb deleted file mode 100644 index c9dd533a8f41..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_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 Reviews - module V1beta - module MerchantReviewsService - # Path helper methods for the MerchantReviewsService 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 MerchantReview resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/merchantReviews/{name}` - # - # @param account [String] - # @param name [String] - # - # @return [::String] - def merchant_review_path account:, name: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/merchantReviews/#{name}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest.rb deleted file mode 100644 index baa41dc04a30..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_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/reviews/v1beta/version" - -require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/credentials" -require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/paths" -require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/client" - -module Google - module Shopping - module Merchant - module Reviews - module V1beta - ## - # Service to manage merchant reviews. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest" - # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new - # - module MerchantReviewsService - # 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/reviews/v1beta/merchant_reviews_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/client.rb deleted file mode 100644 index 342d19d3e30b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_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/reviews/v1beta/merchantreviews_pb" -require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Reviews - module V1beta - module MerchantReviewsService - module Rest - ## - # REST client for the MerchantReviewsService service. - # - # Service to manage merchant reviews. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :merchant_reviews_service_stub - - ## - # Configure the MerchantReviewsService Client class. - # - # See {::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all MerchantReviewsService clients - # ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::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", "Reviews", "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 MerchantReviewsService Client instance. - # - # The configuration is set to the derived mode, meaning that values 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::Reviews::V1beta::MerchantReviewsService::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 - @merchant_reviews_service_stub.universe_domain - end - - ## - # Create a new MerchantReviewsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the MerchantReviewsService 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 - - @merchant_reviews_service_stub = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @merchant_reviews_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 - @merchant_reviews_service_stub.logger - end - - # Service calls - - ## - # Gets a merchant review. - # - # @overload get_merchant_review(request, options = nil) - # Pass arguments to `get_merchant_review` via a request object, either of type - # {::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_merchant_review(name: nil) - # Pass arguments to `get_merchant_review` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The ID of the merchant review. - # Format: accounts/\\{account}/merchantReviews/\\{merchantReview} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/reviews/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest.new - # - # # Call the get_merchant_review method. - # result = client.get_merchant_review request - # - # # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::MerchantReview. - # p result - # - def get_merchant_review request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_merchant_review.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Reviews::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_merchant_review.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_merchant_review.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @merchant_reviews_service_stub.get_merchant_review request, 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 merchant reviews. - # - # @overload list_merchant_reviews(request, options = nil) - # Pass arguments to `list_merchant_reviews` via a request object, either of type - # {::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_merchant_reviews(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_merchant_reviews` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 merchant reviews for. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # Optional. The maximum number of merchant reviews to return. The service can - # return fewer than this value. The maximum value is 1000; values above 1000 - # are coerced to 1000. If unspecified, the maximum number of reviews is - # returned. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListMerchantReviews` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMerchantReviews` - # 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::Reviews::V1beta::MerchantReview>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/reviews/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest.new - # - # # Call the list_merchant_reviews method. - # result = client.list_merchant_reviews request - # - # # The returned object is of type Gapic::PagedEnumerable. You can 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::Reviews::V1beta::MerchantReview. - # p item - # end - # - def list_merchant_reviews request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_merchant_reviews.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Reviews::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_merchant_reviews.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_merchant_reviews.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @merchant_reviews_service_stub.list_merchant_reviews request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @merchant_reviews_service_stub, :list_merchant_reviews, "merchant_reviews", request, result, 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 review for your Merchant Center account. If the review - # already exists, then the review is replaced with the new instance. - # - # @overload insert_merchant_review(request, options = nil) - # Pass arguments to `insert_merchant_review` via a request object, either of type - # {::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_merchant_review(parent: nil, merchant_review: nil, data_source: nil) - # Pass arguments to `insert_merchant_review` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 the merchant review will be inserted. - # Format: accounts/\\{account} - # @param merchant_review [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview, ::Hash] - # Required. The merchant review to insert. - # @param data_source [::String] - # Required. The data source of the - # [merchantreview](https://support.google.com/merchants/answer/7045996?sjid=5253581244217581976-EU) - # Format: - # `accounts/{account}/dataSources/{datasource}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/reviews/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest.new - # - # # Call the insert_merchant_review method. - # result = client.insert_merchant_review request - # - # # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::MerchantReview. - # p result - # - def insert_merchant_review request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest - - # Converts hash and nil to an 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_merchant_review.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Reviews::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_merchant_review.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_merchant_review.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @merchant_reviews_service_stub.insert_merchant_review request, 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 merchant review. - # - # @overload delete_merchant_review(request, options = nil) - # Pass arguments to `delete_merchant_review` via a request object, either of type - # {::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_merchant_review(name: nil) - # Pass arguments to `delete_merchant_review` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The ID of the merchant review. - # Format: accounts/\\{account}/merchantReviews/\\{merchantReview} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @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/reviews/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest.new - # - # # Call the delete_merchant_review method. - # result = client.delete_merchant_review request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_merchant_review request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_merchant_review.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Reviews::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_merchant_review.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_merchant_review.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @merchant_reviews_service_stub.delete_merchant_review request, 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 MerchantReviewsService REST API. - # - # This class represents the configuration for MerchantReviewsService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_merchant_review to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_merchant_review.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_merchant_review.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the MerchantReviewsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_merchant_review` - # @return [::Gapic::Config::Method] - # - attr_reader :get_merchant_review - ## - # RPC-specific configuration for `list_merchant_reviews` - # @return [::Gapic::Config::Method] - # - attr_reader :list_merchant_reviews - ## - # RPC-specific configuration for `insert_merchant_review` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_merchant_review - ## - # RPC-specific configuration for `delete_merchant_review` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_merchant_review - - # @private - def initialize parent_rpcs = nil - get_merchant_review_config = parent_rpcs.get_merchant_review if parent_rpcs.respond_to? :get_merchant_review - @get_merchant_review = ::Gapic::Config::Method.new get_merchant_review_config - list_merchant_reviews_config = parent_rpcs.list_merchant_reviews if parent_rpcs.respond_to? :list_merchant_reviews - @list_merchant_reviews = ::Gapic::Config::Method.new list_merchant_reviews_config - insert_merchant_review_config = parent_rpcs.insert_merchant_review if parent_rpcs.respond_to? :insert_merchant_review - @insert_merchant_review = ::Gapic::Config::Method.new insert_merchant_review_config - delete_merchant_review_config = parent_rpcs.delete_merchant_review if parent_rpcs.respond_to? :delete_merchant_review - @delete_merchant_review = ::Gapic::Config::Method.new delete_merchant_review_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-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/service_stub.rb deleted file mode 100644 index deaba97f1960..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_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/reviews/v1beta/merchantreviews_pb" - -module Google - module Shopping - module Merchant - module Reviews - module V1beta - module MerchantReviewsService - module Rest - ## - # REST service stub for the MerchantReviewsService 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_merchant_review REST call - # - # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] - # A result object deserialized from the server's reply - def get_merchant_review request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_merchant_review_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_merchant_review", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_merchant_reviews REST call - # - # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsResponse] - # A result object deserialized from the server's reply - def list_merchant_reviews request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_merchant_reviews_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_merchant_reviews", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsResponse.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_merchant_review REST call - # - # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] - # A result object deserialized from the server's reply - def insert_merchant_review request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_merchant_review_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_merchant_review", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_merchant_review REST call - # - # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_merchant_review request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_merchant_review_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_merchant_review", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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_merchant_review REST call - # - # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_merchant_review_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/reviews/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/merchantReviews/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_merchant_reviews REST call - # - # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_merchant_reviews_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/reviews/v1beta/{parent}/merchantReviews", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the insert_merchant_review REST call - # - # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest] - # 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_merchant_review_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/reviews/v1beta/{parent}/merchantReviews:insert", - body: "merchant_review", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_merchant_review REST call - # - # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_merchant_review_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/reviews/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/merchantReviews/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_common_pb.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_common_pb.rb deleted file mode 100644 index 20cb7dc784db..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_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/reviews/v1beta/merchantreviews_common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\nDgoogle/shopping/merchant/reviews/v1beta/merchantreviews_common.proto\x12\'google.shopping.merchant.reviews.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xa5\x08\n\x18MerchantReviewAttributes\x12\x1d\n\x0bmerchant_id\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\'\n\x15merchant_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1f\n\rmerchant_link\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12&\n\x14merchant_rating_link\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x1c\n\nmin_rating\x18\x05 \x01(\x03\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1c\n\nmax_rating\x18\x06 \x01(\x03\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x18\n\x06rating\x18\x07 \x01(\x01\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x17\n\x05title\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x19\n\x07\x63ontent\x18\t \x01(\tB\x03\xe0\x41\x02H\x08\x88\x01\x01\x12\x1d\n\x0breviewer_id\x18\n \x01(\tB\x03\xe0\x41\x01H\t\x88\x01\x01\x12#\n\x11reviewer_username\x18\x0b \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x1e\n\x0cis_anonymous\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12w\n\x11\x63ollection_method\x18\r \x01(\x0e\x32R.google.shopping.merchant.reviews.v1beta.MerchantReviewAttributes.CollectionMethodB\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12\x39\n\x0breview_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02H\r\x88\x01\x01\x12!\n\x0freview_language\x18\x0f \x01(\tB\x03\xe0\x41\x01H\x0e\x88\x01\x01\x12 \n\x0ereview_country\x18\x10 \x01(\tB\x03\xe0\x41\x01H\x0f\x88\x01\x01\"y\n\x10\x43ollectionMethod\x12!\n\x1d\x43OLLECTION_METHOD_UNSPECIFIED\x10\x00\x12\x18\n\x14MERCHANT_UNSOLICITED\x10\x01\x12\x11\n\rPOINT_OF_SALE\x10\x02\x12\x15\n\x11\x41\x46TER_FULFILLMENT\x10\x03\x42\x0e\n\x0c_merchant_idB\x18\n\x16_merchant_display_nameB\x10\n\x0e_merchant_linkB\x17\n\x15_merchant_rating_linkB\r\n\x0b_min_ratingB\r\n\x0b_max_ratingB\t\n\x07_ratingB\x08\n\x06_titleB\n\n\x08_contentB\x0e\n\x0c_reviewer_idB\x14\n\x12_reviewer_usernameB\x0f\n\r_is_anonymousB\x14\n\x12_collection_methodB\x0e\n\x0c_review_timeB\x12\n\x10_review_languageB\x11\n\x0f_review_country\"\xd8\x07\n\x14MerchantReviewStatus\x12\x80\x01\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32].google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewDestinationStatusB\x03\xe0\x41\x03\x12z\n\x11item_level_issues\x18\x04 \x03(\x0b\x32Z.google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewItemLevelIssueB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_update_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a~\n\x1fMerchantReviewDestinationStatus\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x1a\xcf\x03\n\x1cMerchantReviewItemLevelIssue\x12\x11\n\x04\x63ode\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12z\n\x08severity\x18\x02 \x01(\x0e\x32\x63.google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewItemLevelIssue.SeverityB\x03\xe0\x41\x03\x12\x17\n\nresolution\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tattribute\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12[\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rdocumentation\x18\x08 \x01(\tB\x03\xe0\x41\x03\"G\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_IMPACTED\x10\x01\x12\x0f\n\x0b\x44ISAPPROVED\x10\x02\x42\x9a\x02\n+com.google.shopping.merchant.reviews.v1betaB\x1aMerchantReviewsCommonProtoP\x01ZKcloud.google.com/go/shopping/merchant/reviews/apiv1beta/reviewspb;reviewspb\xaa\x02\'Google.Shopping.Merchant.Reviews.V1Beta\xca\x02\'Google\\Shopping\\Merchant\\Reviews\\V1beta\xea\x02+Google::Shopping::Merchant::Reviews::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Reviews - module V1beta - MerchantReviewAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReviewAttributes").msgclass - MerchantReviewAttributes::CollectionMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReviewAttributes.CollectionMethod").enummodule - MerchantReviewStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReviewStatus").msgclass - MerchantReviewStatus::MerchantReviewDestinationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewDestinationStatus").msgclass - MerchantReviewStatus::MerchantReviewItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewItemLevelIssue").msgclass - MerchantReviewStatus::MerchantReviewItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewItemLevelIssue.Severity").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_pb.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_pb.rb deleted file mode 100644 index 5828c3308e80..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_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/reviews/v1beta/merchantreviews.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/reviews/v1beta/merchantreviews_common_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n=google/shopping/merchant/reviews/v1beta/merchantreviews.proto\x12\'google.shopping.merchant.reviews.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\x44google/shopping/merchant/reviews/v1beta/merchantreviews_common.proto\x1a google/shopping/type/types.proto\"[\n\x18GetMerchantReviewRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/MerchantReview\"^\n\x1b\x44\x65leteMerchantReviewRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/MerchantReview\"\x90\x01\n\x1aListMerchantReviewsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)merchantapi.googleapis.com/MerchantReview\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\"\xa3\x01\n\x1bInsertMerchantReviewRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12U\n\x0fmerchant_review\x18\x02 \x01(\x0b\x32\x37.google.shopping.merchant.reviews.v1beta.MerchantReviewB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x89\x01\n\x1bListMerchantReviewsResponse\x12Q\n\x10merchant_reviews\x18\x01 \x03(\x0b\x32\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xf1\x03\n\x0eMerchantReview\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1f\n\x12merchant_review_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12j\n\x1amerchant_review_attributes\x18\x03 \x01(\x0b\x32\x41.google.shopping.merchant.reviews.v1beta.MerchantReviewAttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\x04 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x61ta_source\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x62\n\x16merchant_review_status\x18\x06 \x01(\x0b\x32=.google.shopping.merchant.reviews.v1beta.MerchantReviewStatusB\x03\xe0\x41\x03:z\xea\x41w\n)merchantapi.googleapis.com/MerchantReview\x12)accounts/{account}/merchantReviews/{name}*\x0fmerchantReviews2\x0emerchantReview2\xc8\x07\n\x16MerchantReviewsService\x12\xd3\x01\n\x11GetMerchantReview\x12\x41.google.shopping.merchant.reviews.v1beta.GetMerchantReviewRequest\x1a\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/reviews/v1beta/{name=accounts/*/merchantReviews/*}\x12\xe6\x01\n\x13ListMerchantReviews\x12\x43.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsRequest\x1a\x44.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/reviews/v1beta/{parent=accounts/*}/merchantReviews\x12\xea\x01\n\x14InsertMerchantReview\x12\x44.google.shopping.merchant.reviews.v1beta.InsertMerchantReviewRequest\x1a\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\"S\x82\xd3\xe4\x93\x02M\":/reviews/v1beta/{parent=accounts/*}/merchantReviews:insert:\x0fmerchant_review\x12\xb8\x01\n\x14\x44\x65leteMerchantReview\x12\x44.google.shopping.merchant.reviews.v1beta.DeleteMerchantReviewRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/reviews/v1beta/{name=accounts/*/merchantReviews/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xcf\x02\n+com.google.shopping.merchant.reviews.v1betaB\x14MerchantReviewsProtoP\x01ZKcloud.google.com/go/shopping/merchant/reviews/apiv1beta/reviewspb;reviewspb\xaa\x02\'Google.Shopping.Merchant.Reviews.V1Beta\xca\x02\'Google\\Shopping\\Merchant\\Reviews\\V1beta\xea\x02+Google::Shopping::Merchant::Reviews::V1beta\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 Reviews - module V1beta - GetMerchantReviewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.GetMerchantReviewRequest").msgclass - DeleteMerchantReviewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.DeleteMerchantReviewRequest").msgclass - ListMerchantReviewsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ListMerchantReviewsRequest").msgclass - InsertMerchantReviewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.InsertMerchantReviewRequest").msgclass - ListMerchantReviewsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ListMerchantReviewsResponse").msgclass - MerchantReview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReview").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_services_pb.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_services_pb.rb deleted file mode 100644 index 30579619d852..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_services_pb.rb +++ /dev/null @@ -1,54 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/reviews/v1beta/merchantreviews.proto for package 'Google.Shopping.Merchant.Reviews.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/reviews/v1beta/merchantreviews_pb' - -module Google - module Shopping - module Merchant - module Reviews - module V1beta - module MerchantReviewsService - # Service to manage merchant reviews. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.reviews.v1beta.MerchantReviewsService' - - # Gets a merchant review. - rpc :GetMerchantReview, ::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest, ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview - # Lists merchant reviews. - rpc :ListMerchantReviews, ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest, ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsResponse - # Inserts a review for your Merchant Center account. If the review - # already exists, then the review is replaced with the new instance. - rpc :InsertMerchantReview, ::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest, ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview - # Deletes merchant review. - rpc :DeleteMerchantReview, ::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service.rb deleted file mode 100644 index 6f1a62d59ed3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_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/reviews/v1beta/version" - -require "google/shopping/merchant/reviews/v1beta/product_reviews_service/credentials" -require "google/shopping/merchant/reviews/v1beta/product_reviews_service/paths" -require "google/shopping/merchant/reviews/v1beta/product_reviews_service/client" -require "google/shopping/merchant/reviews/v1beta/product_reviews_service/rest" - -module Google - module Shopping - module Merchant - module Reviews - module V1beta - ## - # Service to manage product reviews. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/reviews/v1beta/product_reviews_service" - # client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/reviews/v1beta/product_reviews_service/rest" - # client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new - # - module ProductReviewsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "product_reviews_service", "helpers.rb" -require "google/shopping/merchant/reviews/v1beta/product_reviews_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/client.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/client.rb deleted file mode 100644 index ad77c4e2b829..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_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/merchant/reviews/v1beta/productreviews_pb" - -module Google - module Shopping - module Merchant - module Reviews - module V1beta - module ProductReviewsService - ## - # Client for the ProductReviewsService service. - # - # Service to manage product reviews. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :product_reviews_service_stub - - ## - # Configure the ProductReviewsService Client class. - # - # See {::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ProductReviewsService clients - # ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.configure do |config| - # config.timeout = 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", "Reviews", "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 ProductReviewsService Client instance. - # - # The configuration is set to the derived mode, meaning that values 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::Reviews::V1beta::ProductReviewsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @product_reviews_service_stub.universe_domain - end - - ## - # Create a new ProductReviewsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ProductReviewsService 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/reviews/v1beta/productreviews_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 - - @product_reviews_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @product_reviews_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 - @product_reviews_service_stub.logger - end - - # Service calls - - ## - # Gets a product review. - # - # @overload get_product_review(request, options = nil) - # Pass arguments to `get_product_review` via a request object, either of type - # {::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_product_review(name: nil) - # Pass arguments to `get_product_review` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The ID of the merchant review. - # Format: accounts/\\{account}/productReviews/\\{productReview} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/reviews/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest.new - # - # # Call the get_product_review method. - # result = client.get_product_review request - # - # # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::ProductReview. - # p result - # - def get_product_review request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_product_review.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Reviews::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_product_review.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_product_review.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_reviews_service_stub.call_rpc :get_product_review, request, 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 product reviews. - # - # @overload list_product_reviews(request, options = nil) - # Pass arguments to `list_product_reviews` via a request object, either of type - # {::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_product_reviews(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_product_reviews` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 product reviews for. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # Optional. The maximum number of products to return. The service may return - # fewer than this value. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListProductReviews` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListProductReviews` - # 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::Reviews::V1beta::ProductReview>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Reviews::V1beta::ProductReview>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/reviews/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest.new - # - # # Call the list_product_reviews method. - # result = client.list_product_reviews request - # - # # The returned object is of type Gapic::PagedEnumerable. You can 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::Reviews::V1beta::ProductReview. - # p item - # end - # - def list_product_reviews request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_product_reviews.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Reviews::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_product_reviews.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_product_reviews.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_reviews_service_stub.call_rpc :list_product_reviews, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @product_reviews_service_stub, :list_product_reviews, request, response, 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 product review. - # - # @overload insert_product_review(request, options = nil) - # Pass arguments to `insert_product_review` via a request object, either of type - # {::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_product_review(parent: nil, product_review: nil, data_source: nil) - # Pass arguments to `insert_product_review` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 the product review will be inserted. - # Format: accounts/\\{account} - # @param product_review [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview, ::Hash] - # Required. The product review to insert. - # @param data_source [::String] - # Required. Format: - # `accounts/{account}/dataSources/{datasource}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/reviews/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest.new - # - # # Call the insert_product_review method. - # result = client.insert_product_review request - # - # # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::ProductReview. - # p result - # - def insert_product_review request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest - - # Converts hash and nil to 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_product_review.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Reviews::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_product_review.timeout, - metadata: metadata, - retry_policy: @config.rpcs.insert_product_review.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_reviews_service_stub.call_rpc :insert_product_review, request, 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 product review. - # - # @overload delete_product_review(request, options = nil) - # Pass arguments to `delete_product_review` via a request object, either of type - # {::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_product_review(name: nil) - # Pass arguments to `delete_product_review` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The ID of the Product review. - # Format: accounts/\\{account}/productReviews/\\{productReview} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::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/reviews/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest.new - # - # # Call the delete_product_review method. - # result = client.delete_product_review request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_product_review request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_product_review.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Reviews::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_product_review.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_product_review.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_reviews_service_stub.call_rpc :delete_product_review, request, 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 ProductReviewsService API. - # - # This class represents the configuration for ProductReviewsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_product_review to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_product_review.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_product_review.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::Reviews::V1beta::ProductReviewsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ProductReviewsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_product_review` - # @return [::Gapic::Config::Method] - # - attr_reader :get_product_review - ## - # RPC-specific configuration for `list_product_reviews` - # @return [::Gapic::Config::Method] - # - attr_reader :list_product_reviews - ## - # RPC-specific configuration for `insert_product_review` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_product_review - ## - # RPC-specific configuration for `delete_product_review` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_product_review - - # @private - def initialize parent_rpcs = nil - get_product_review_config = parent_rpcs.get_product_review if parent_rpcs.respond_to? :get_product_review - @get_product_review = ::Gapic::Config::Method.new get_product_review_config - list_product_reviews_config = parent_rpcs.list_product_reviews if parent_rpcs.respond_to? :list_product_reviews - @list_product_reviews = ::Gapic::Config::Method.new list_product_reviews_config - insert_product_review_config = parent_rpcs.insert_product_review if parent_rpcs.respond_to? :insert_product_review - @insert_product_review = ::Gapic::Config::Method.new insert_product_review_config - delete_product_review_config = parent_rpcs.delete_product_review if parent_rpcs.respond_to? :delete_product_review - @delete_product_review = ::Gapic::Config::Method.new delete_product_review_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-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/credentials.rb deleted file mode 100644 index 231c7c4249c4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_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 Reviews - module V1beta - module ProductReviewsService - # Credentials for the ProductReviewsService 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-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/paths.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/paths.rb deleted file mode 100644 index 98e8ac0fe1e8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_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 Reviews - module V1beta - module ProductReviewsService - # Path helper methods for the ProductReviewsService 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 ProductReview resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/productReviews/{productreview}` - # - # @param account [String] - # @param productreview [String] - # - # @return [::String] - def product_review_path account:, productreview: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/productReviews/#{productreview}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest.rb deleted file mode 100644 index a767cf6fe81a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_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/reviews/v1beta/version" - -require "google/shopping/merchant/reviews/v1beta/product_reviews_service/credentials" -require "google/shopping/merchant/reviews/v1beta/product_reviews_service/paths" -require "google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/client" - -module Google - module Shopping - module Merchant - module Reviews - module V1beta - ## - # Service to manage product reviews. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/reviews/v1beta/product_reviews_service/rest" - # client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new - # - module ProductReviewsService - # 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/reviews/v1beta/product_reviews_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/client.rb deleted file mode 100644 index 17e4811cb802..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_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/merchant/reviews/v1beta/productreviews_pb" -require "google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Reviews - module V1beta - module ProductReviewsService - module Rest - ## - # REST client for the ProductReviewsService service. - # - # Service to manage product reviews. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :product_reviews_service_stub - - ## - # Configure the ProductReviewsService Client class. - # - # See {::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ProductReviewsService clients - # ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::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", "Reviews", "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 ProductReviewsService Client instance. - # - # The configuration is set to the derived mode, meaning that values 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::Reviews::V1beta::ProductReviewsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @product_reviews_service_stub.universe_domain - end - - ## - # Create a new ProductReviewsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ProductReviewsService 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 - - @product_reviews_service_stub = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @product_reviews_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 - @product_reviews_service_stub.logger - end - - # Service calls - - ## - # Gets a product review. - # - # @overload get_product_review(request, options = nil) - # Pass arguments to `get_product_review` via a request object, either of type - # {::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_product_review(name: nil) - # Pass arguments to `get_product_review` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The ID of the merchant review. - # Format: accounts/\\{account}/productReviews/\\{productReview} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/reviews/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest.new - # - # # Call the get_product_review method. - # result = client.get_product_review request - # - # # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::ProductReview. - # p result - # - def get_product_review request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_product_review.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Reviews::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_product_review.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_product_review.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_reviews_service_stub.get_product_review request, 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 product reviews. - # - # @overload list_product_reviews(request, options = nil) - # Pass arguments to `list_product_reviews` via a request object, either of type - # {::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_product_reviews(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_product_reviews` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 product reviews for. - # Format: accounts/\\{account} - # @param page_size [::Integer] - # Optional. The maximum number of products to return. The service may return - # fewer than this value. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListProductReviews` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListProductReviews` - # 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::Reviews::V1beta::ProductReview>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Reviews::V1beta::ProductReview>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/reviews/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest.new - # - # # Call the list_product_reviews method. - # result = client.list_product_reviews request - # - # # The returned object is of type Gapic::PagedEnumerable. You can 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::Reviews::V1beta::ProductReview. - # p item - # end - # - def list_product_reviews request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_product_reviews.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Reviews::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_product_reviews.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_product_reviews.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_reviews_service_stub.list_product_reviews request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @product_reviews_service_stub, :list_product_reviews, "product_reviews", request, result, 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 product review. - # - # @overload insert_product_review(request, options = nil) - # Pass arguments to `insert_product_review` via a request object, either of type - # {::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_product_review(parent: nil, product_review: nil, data_source: nil) - # Pass arguments to `insert_product_review` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 the product review will be inserted. - # Format: accounts/\\{account} - # @param product_review [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview, ::Hash] - # Required. The product review to insert. - # @param data_source [::String] - # Required. Format: - # `accounts/{account}/dataSources/{datasource}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/reviews/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest.new - # - # # Call the insert_product_review method. - # result = client.insert_product_review request - # - # # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::ProductReview. - # p result - # - def insert_product_review request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest - - # Converts hash and nil to an 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_product_review.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Reviews::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_product_review.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.insert_product_review.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_reviews_service_stub.insert_product_review request, 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 product review. - # - # @overload delete_product_review(request, options = nil) - # Pass arguments to `delete_product_review` via a request object, either of type - # {::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_product_review(name: nil) - # Pass arguments to `delete_product_review` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The ID of the Product review. - # Format: accounts/\\{account}/productReviews/\\{productReview} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @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/reviews/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest.new - # - # # Call the delete_product_review method. - # result = client.delete_product_review request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_product_review request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_product_review.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Reviews::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_product_review.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_product_review.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @product_reviews_service_stub.delete_product_review request, 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 ProductReviewsService REST API. - # - # This class represents the configuration for ProductReviewsService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_product_review to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_product_review.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_product_review.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the ProductReviewsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_product_review` - # @return [::Gapic::Config::Method] - # - attr_reader :get_product_review - ## - # RPC-specific configuration for `list_product_reviews` - # @return [::Gapic::Config::Method] - # - attr_reader :list_product_reviews - ## - # RPC-specific configuration for `insert_product_review` - # @return [::Gapic::Config::Method] - # - attr_reader :insert_product_review - ## - # RPC-specific configuration for `delete_product_review` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_product_review - - # @private - def initialize parent_rpcs = nil - get_product_review_config = parent_rpcs.get_product_review if parent_rpcs.respond_to? :get_product_review - @get_product_review = ::Gapic::Config::Method.new get_product_review_config - list_product_reviews_config = parent_rpcs.list_product_reviews if parent_rpcs.respond_to? :list_product_reviews - @list_product_reviews = ::Gapic::Config::Method.new list_product_reviews_config - insert_product_review_config = parent_rpcs.insert_product_review if parent_rpcs.respond_to? :insert_product_review - @insert_product_review = ::Gapic::Config::Method.new insert_product_review_config - delete_product_review_config = parent_rpcs.delete_product_review if parent_rpcs.respond_to? :delete_product_review - @delete_product_review = ::Gapic::Config::Method.new delete_product_review_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-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/service_stub.rb deleted file mode 100644 index ded40943cc71..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_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/reviews/v1beta/productreviews_pb" - -module Google - module Shopping - module Merchant - module Reviews - module V1beta - module ProductReviewsService - module Rest - ## - # REST service stub for the ProductReviewsService 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_product_review REST call - # - # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] - # A result object deserialized from the server's reply - def get_product_review request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_product_review_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_product_review", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReview.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_product_reviews REST call - # - # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsResponse] - # A result object deserialized from the server's reply - def list_product_reviews request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_product_reviews_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_product_reviews", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsResponse.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_product_review REST call - # - # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] - # A result object deserialized from the server's reply - def insert_product_review request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_insert_product_review_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_product_review", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReview.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_product_review REST call - # - # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_product_review request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_product_review_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_product_review", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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_product_review REST call - # - # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_product_review_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/reviews/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/productReviews/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_product_reviews REST call - # - # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_product_reviews_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/reviews/v1beta/{parent}/productReviews", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the insert_product_review REST call - # - # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest] - # 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_product_review_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/reviews/v1beta/{parent}/productReviews:insert", - body: "product_review", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_product_review REST call - # - # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_product_review_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/reviews/v1beta/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/productReviews/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_common_pb.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_common_pb.rb deleted file mode 100644 index f21e1d5a5cc0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_common_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/reviews/v1beta/productreviews_common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\nCgoogle/shopping/merchant/reviews/v1beta/productreviews_common.proto\x12\'google.shopping.merchant.reviews.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xb2\r\n\x17ProductReviewAttributes\x12!\n\x0f\x61ggregator_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12 \n\x0esubclient_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12 \n\x0epublisher_name\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12#\n\x11publisher_favicon\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x1d\n\x0breviewer_id\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\'\n\x15reviewer_is_anonymous\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12#\n\x11reviewer_username\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x06\x88\x01\x01\x12!\n\x0freview_language\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12 \n\x0ereview_country\x18\t \x01(\tB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12\x34\n\x0breview_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x17\n\x05title\x18\x0b \x01(\tB\x03\xe0\x41\x01H\t\x88\x01\x01\x12\x19\n\x07\x63ontent\x18\x0c \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x11\n\x04pros\x18\r \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x63ons\x18\x0e \x03(\tB\x03\xe0\x41\x01\x12\x65\n\x0breview_link\x18\x0f \x01(\x0b\x32K.google.shopping.merchant.reviews.v1beta.ProductReviewAttributes.ReviewLinkB\x03\xe0\x41\x01\x12!\n\x14reviewer_image_links\x18\x10 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\nmin_rating\x18\x11 \x01(\x03\x42\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12\x1c\n\nmax_rating\x18\x12 \x01(\x03\x42\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12\x18\n\x06rating\x18\x13 \x01(\x01\x42\x03\xe0\x41\x01H\r\x88\x01\x01\x12\x1a\n\rproduct_names\x18\x14 \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\rproduct_links\x18\x15 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x61sins\x18\x16 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05gtins\x18\x17 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04mpns\x18\x18 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04skus\x18\x19 \x03(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x62rands\x18\x1a \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x07is_spam\x18\x1b \x01(\x08\x42\x03\xe0\x41\x01H\x0e\x88\x01\x01\x12&\n\x14is_verified_purchase\x18\x1e \x01(\x08\x42\x03\xe0\x41\x01H\x0f\x88\x01\x01\x12(\n\x16is_incentivized_review\x18\x1f \x01(\x08\x42\x03\xe0\x41\x01H\x10\x88\x01\x01\x12q\n\x11\x63ollection_method\x18\x1c \x01(\x0e\x32Q.google.shopping.merchant.reviews.v1beta.ProductReviewAttributes.CollectionMethodB\x03\xe0\x41\x01\x12\x1b\n\x0etransaction_id\x18\x1d \x01(\tB\x03\xe0\x41\x01\x1a\xbc\x01\n\nReviewLink\x12\x63\n\x04type\x18\x01 \x01(\x0e\x32P.google.shopping.merchant.reviews.v1beta.ProductReviewAttributes.ReviewLink.TypeB\x03\xe0\x41\x01\x12\x11\n\x04link\x18\x02 \x01(\tB\x03\xe0\x41\x01\"6\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tSINGLETON\x10\x01\x12\t\n\x05GROUP\x10\x02\"\\\n\x10\x43ollectionMethod\x12!\n\x1d\x43OLLECTION_METHOD_UNSPECIFIED\x10\x00\x12\x0f\n\x0bUNSOLICITED\x10\x01\x12\x14\n\x10POST_FULFILLMENT\x10\x02\x42\x12\n\x10_aggregator_nameB\x11\n\x0f_subclient_nameB\x11\n\x0f_publisher_nameB\x14\n\x12_publisher_faviconB\x0e\n\x0c_reviewer_idB\x18\n\x16_reviewer_is_anonymousB\x14\n\x12_reviewer_usernameB\x12\n\x10_review_languageB\x11\n\x0f_review_countryB\x08\n\x06_titleB\n\n\x08_contentB\r\n\x0b_min_ratingB\r\n\x0b_max_ratingB\t\n\x07_ratingB\n\n\x08_is_spamB\x17\n\x15_is_verified_purchaseB\x19\n\x17_is_incentivized_review\"\xce\x07\n\x13ProductReviewStatus\x12~\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32[.google.shopping.merchant.reviews.v1beta.ProductReviewStatus.ProductReviewDestinationStatusB\x03\xe0\x41\x03\x12x\n\x11item_level_issues\x18\x04 \x03(\x0b\x32X.google.shopping.merchant.reviews.v1beta.ProductReviewStatus.ProductReviewItemLevelIssueB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_update_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a}\n\x1eProductReviewDestinationStatus\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x1a\xcc\x03\n\x1bProductReviewItemLevelIssue\x12\x11\n\x04\x63ode\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12x\n\x08severity\x18\x02 \x01(\x0e\x32\x61.google.shopping.merchant.reviews.v1beta.ProductReviewStatus.ProductReviewItemLevelIssue.SeverityB\x03\xe0\x41\x03\x12\x17\n\nresolution\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tattribute\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12[\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rdocumentation\x18\x08 \x01(\tB\x03\xe0\x41\x03\"G\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_IMPACTED\x10\x01\x12\x0f\n\x0b\x44ISAPPROVED\x10\x02\x42\x99\x02\n+com.google.shopping.merchant.reviews.v1betaB\x19ProductReviewsCommonProtoP\x01ZKcloud.google.com/go/shopping/merchant/reviews/apiv1beta/reviewspb;reviewspb\xaa\x02\'Google.Shopping.Merchant.Reviews.V1Beta\xca\x02\'Google\\Shopping\\Merchant\\Reviews\\V1beta\xea\x02+Google::Shopping::Merchant::Reviews::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Reviews - module V1beta - ProductReviewAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ProductReviewAttributes").msgclass - ProductReviewAttributes::ReviewLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ProductReviewAttributes.ReviewLink").msgclass - ProductReviewAttributes::ReviewLink::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ProductReviewAttributes.ReviewLink.Type").enummodule - ProductReviewAttributes::CollectionMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ProductReviewAttributes.CollectionMethod").enummodule - ProductReviewStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ProductReviewStatus").msgclass - ProductReviewStatus::ProductReviewDestinationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ProductReviewStatus.ProductReviewDestinationStatus").msgclass - ProductReviewStatus::ProductReviewItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ProductReviewStatus.ProductReviewItemLevelIssue").msgclass - ProductReviewStatus::ProductReviewItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ProductReviewStatus.ProductReviewItemLevelIssue.Severity").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_pb.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_pb.rb deleted file mode 100644 index bb4debd8711a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_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/reviews/v1beta/productreviews.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/reviews/v1beta/productreviews_common_pb' -require 'google/shopping/type/types_pb' - - -descriptor_data = "\n\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(merchantapi.googleapis.com/ProductReview\"\\\n\x1a\x44\x65leteProductReviewRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(merchantapi.googleapis.com/ProductReview\"\x8e\x01\n\x19ListProductReviewsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(merchantapi.googleapis.com/ProductReview\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\"\xa0\x01\n\x1aInsertProductReviewRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12S\n\x0eproduct_review\x18\x02 \x01(\x0b\x32\x36.google.shopping.merchant.reviews.v1beta.ProductReviewB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x86\x01\n\x1aListProductReviewsResponse\x12O\n\x0fproduct_reviews\x18\x01 \x03(\x0b\x32\x36.google.shopping.merchant.reviews.v1beta.ProductReview\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xf0\x03\n\rProductReview\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1e\n\x11product_review_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12h\n\x19product_review_attributes\x18\x03 \x01(\x0b\x32@.google.shopping.merchant.reviews.v1beta.ProductReviewAttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\x04 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x61ta_source\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12`\n\x15product_review_status\x18\x06 \x01(\x0b\x32<.google.shopping.merchant.reviews.v1beta.ProductReviewStatusB\x03\xe0\x41\x03:\x7f\xea\x41|\n(merchantapi.googleapis.com/ProductReview\x12\x31\x61\x63\x63ounts/{account}/productReviews/{productreview}*\x0eproductReviews2\rproductReview2\xb7\x07\n\x15ProductReviewsService\x12\xcf\x01\n\x10GetProductReview\x12@.google.shopping.merchant.reviews.v1beta.GetProductReviewRequest\x1a\x36.google.shopping.merchant.reviews.v1beta.ProductReview\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/reviews/v1beta/{name=accounts/*/productReviews/*}\x12\xe2\x01\n\x12ListProductReviews\x12\x42.google.shopping.merchant.reviews.v1beta.ListProductReviewsRequest\x1a\x43.google.shopping.merchant.reviews.v1beta.ListProductReviewsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/reviews/v1beta/{parent=accounts/*}/productReviews\x12\xe5\x01\n\x13InsertProductReview\x12\x43.google.shopping.merchant.reviews.v1beta.InsertProductReviewRequest\x1a\x36.google.shopping.merchant.reviews.v1beta.ProductReview\"Q\x82\xd3\xe4\x93\x02K\"9/reviews/v1beta/{parent=accounts/*}/productReviews:insert:\x0eproduct_review\x12\xb5\x01\n\x13\x44\x65leteProductReview\x12\x43.google.shopping.merchant.reviews.v1beta.DeleteProductReviewRequest\x1a\x16.google.protobuf.Empty\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/reviews/v1beta/{name=accounts/*/productReviews/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\x93\x02\n+com.google.shopping.merchant.reviews.v1betaB\x13ProductReviewsProtoP\x01ZKcloud.google.com/go/shopping/merchant/reviews/apiv1beta/reviewspb;reviewspb\xaa\x02\'Google.Shopping.Merchant.Reviews.V1Beta\xca\x02\'Google\\Shopping\\Merchant\\Reviews\\V1beta\xea\x02+Google::Shopping::Merchant::Reviews::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Reviews - module V1beta - GetProductReviewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.GetProductReviewRequest").msgclass - DeleteProductReviewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.DeleteProductReviewRequest").msgclass - ListProductReviewsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ListProductReviewsRequest").msgclass - InsertProductReviewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.InsertProductReviewRequest").msgclass - ListProductReviewsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ListProductReviewsResponse").msgclass - ProductReview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ProductReview").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_services_pb.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_services_pb.rb deleted file mode 100644 index 3e404da80652..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/productreviews_services_pb.rb +++ /dev/null @@ -1,53 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/reviews/v1beta/productreviews.proto for package 'Google.Shopping.Merchant.Reviews.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/reviews/v1beta/productreviews_pb' - -module Google - module Shopping - module Merchant - module Reviews - module V1beta - module ProductReviewsService - # Service to manage product reviews. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.reviews.v1beta.ProductReviewsService' - - # Gets a product review. - rpc :GetProductReview, ::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest, ::Google::Shopping::Merchant::Reviews::V1beta::ProductReview - # Lists product reviews. - rpc :ListProductReviews, ::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest, ::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsResponse - # Inserts a product review. - rpc :InsertProductReview, ::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest, ::Google::Shopping::Merchant::Reviews::V1beta::ProductReview - # Deletes a product review. - rpc :DeleteProductReview, ::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/rest.rb deleted file mode 100644 index 142e981525a3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/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/reviews/v1beta/merchant_reviews_service/rest" -require "google/shopping/merchant/reviews/v1beta/product_reviews_service/rest" -require "google/shopping/merchant/reviews/v1beta/version" - -module Google - module Shopping - module Merchant - module Reviews - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/reviews/v1beta/rest" - # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/version.rb deleted file mode 100644 index 83df16b2ffd9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/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 Reviews - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/README.md deleted file mode 100644 index 03467a3756be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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. - # - # Note: This field should not be used in most cases. - 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. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # 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-reviews-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 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-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.rb deleted file mode 100644 index c4751d5e0cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.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 Reviews - module V1beta - # Request message for the `GetMerchantReview` method. - # @!attribute [rw] name - # @return [::String] - # Required. The ID of the merchant review. - # Format: accounts/\\{account}/merchantReviews/\\{merchantReview} - class GetMerchantReviewRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteMerchantReview` method. - # @!attribute [rw] name - # @return [::String] - # Required. The ID of the merchant review. - # Format: accounts/\\{account}/merchantReviews/\\{merchantReview} - class DeleteMerchantReviewRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListMerchantsReview` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to list merchant reviews for. - # Format: accounts/\\{account} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of merchant reviews to return. The service can - # return fewer than this value. The maximum value is 1000; values above 1000 - # are coerced to 1000. If unspecified, the maximum number of reviews is - # returned. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListMerchantReviews` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMerchantReviews` - # must match the call that provided the page token. - class ListMerchantReviewsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `InsertMerchantReview` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account where the merchant review will be inserted. - # Format: accounts/\\{account} - # @!attribute [rw] merchant_review - # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview] - # Required. The merchant review to insert. - # @!attribute [rw] data_source - # @return [::String] - # Required. The data source of the - # [merchantreview](https://support.google.com/merchants/answer/7045996?sjid=5253581244217581976-EU) - # Format: - # `accounts/{account}/dataSources/{datasource}`. - class InsertMerchantReviewRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListMerchantsReview` method. - # @!attribute [rw] merchant_reviews - # @return [::Array<::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview>] - # The merchant review. - # @!attribute [rw] next_page_token - # @return [::String] - # The token to retrieve the next page of results. - class ListMerchantReviewsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A review for a merchant. For more information, see - # [Introduction to Merchant Review - # Feeds](https://developers.google.com/merchant-review-feeds) - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the merchant review. - # Format: - # `"{merchantreview.name=accounts/{account}/merchantReviews/{merchantReview}}"` - # @!attribute [rw] merchant_review_id - # @return [::String] - # Required. The user provided merchant review ID to uniquely identify the - # merchant review. - # @!attribute [rw] merchant_review_attributes - # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewAttributes] - # Optional. A list of merchant review attributes. - # @!attribute [rw] custom_attributes - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Optional. A list of custom (merchant-provided) attributes. It can also be - # used for submitting any attribute of the data 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 experimental attributes. - # Maximum allowed number of characters for each - # custom attribute is 10240 (represents sum of characters for name and - # value). Maximum 2500 custom attributes can be set per product, with total - # size of 102.4kB. Underscores in custom attribute names are replaced by - # spaces upon insertion. - # @!attribute [r] data_source - # @return [::String] - # Output only. The primary data source of the merchant review. - # @!attribute [r] merchant_review_status - # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewStatus] - # Output only. The status of a merchant review, data validation issues, that - # is, information about a merchant review computed asynchronously. - class MerchantReview - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews_common.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews_common.rb deleted file mode 100644 index 00152a39458c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews_common.rb +++ /dev/null @@ -1,187 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Reviews - module V1beta - # Attributes. - # @!attribute [rw] merchant_id - # @return [::String] - # Required. Must be unique and stable across all requests. In other words, if - # a request today and another 90 days ago refer to the same merchant, they - # must have the same id. - # @!attribute [rw] merchant_display_name - # @return [::String] - # Optional. Human-readable display name for the merchant. - # @!attribute [rw] merchant_link - # @return [::String] - # Optional. URL to the merchant's main website. Do not use a redirect URL for - # this value. In other words, the value should point directly to the - # merchant's site. - # @!attribute [rw] merchant_rating_link - # @return [::String] - # Optional. URL to the landing page that hosts the reviews for this merchant. - # Do not use a redirect URL. - # @!attribute [rw] min_rating - # @return [::Integer] - # Optional. The minimum possible number for the rating. This should be the - # worst possible rating and should not be a value for no rating. - # @!attribute [rw] max_rating - # @return [::Integer] - # Optional. The maximum possible number for the rating. The value of the max - # rating must be greater than the value of the min rating. - # @!attribute [rw] rating - # @return [::Float] - # Optional. The reviewer's overall rating of the merchant. - # @!attribute [rw] title - # @return [::String] - # Optional. The title of the review. - # @!attribute [rw] content - # @return [::String] - # Required. This should be any freeform text provided by the user and should - # not be truncated. If multiple responses to different questions are - # provided, all responses should be included, with the minimal context for - # the responses to make sense. Context should not be provided if questions - # were left unanswered. - # @!attribute [rw] reviewer_id - # @return [::String] - # Optional. A permanent, unique identifier for the author of the review in - # the publisher's system. - # @!attribute [rw] reviewer_username - # @return [::String] - # Optional. Display name of the review author. - # @!attribute [rw] is_anonymous - # @return [::Boolean] - # Optional. Set to true if the reviewer should remain anonymous. - # @!attribute [rw] collection_method - # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewAttributes::CollectionMethod] - # Optional. The method used to collect the review. - # @!attribute [rw] review_time - # @return [::Google::Protobuf::Timestamp] - # Required. The timestamp indicating when the review was written. - # @!attribute [rw] review_language - # @return [::String] - # Optional. The language of the review defined by BCP-47 language code. - # @!attribute [rw] review_country - # @return [::String] - # Optional. The country where the reviewer made the order defined by ISO - # 3166-1 Alpha-2 Country Code. - class MerchantReviewAttributes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The method used to collect the review. - module CollectionMethod - # Collection method unspecified. - COLLECTION_METHOD_UNSPECIFIED = 0 - - # The user was not responding to a specific solicitation when they - # submitted the review. - MERCHANT_UNSOLICITED = 1 - - # The user submitted the review in response to a solicitation when the - # user placed an order. - POINT_OF_SALE = 2 - - # The user submitted the review in response to a solicitation after - # fulfillment of the user's order. - AFTER_FULFILLMENT = 3 - end - end - - # The status of a merchant review, data validation issues, that is, information - # about a merchant review computed asynchronously. - # @!attribute [r] destination_statuses - # @return [::Array<::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewStatus::MerchantReviewDestinationStatus>] - # Output only. The intended destinations for the merchant review. - # @!attribute [r] item_level_issues - # @return [::Array<::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewStatus::MerchantReviewItemLevelIssue>] - # Output only. A list of all issues associated with the merchant review. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Date on which the item has been created, in [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. - # @!attribute [r] last_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Date on which the item has been last updated, in [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. - class MerchantReviewStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The destination status of the merchant review status. - # @!attribute [r] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # Output only. The name of the reporting context. - class MerchantReviewDestinationStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The ItemLevelIssue of the merchant review status. - # @!attribute [r] code - # @return [::String] - # Output only. The error code of the issue. - # @!attribute [r] severity - # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewStatus::MerchantReviewItemLevelIssue::Severity] - # Output only. How this issue affects serving of the merchant review. - # @!attribute [r] resolution - # @return [::String] - # Output only. Whether the issue can be resolved by the merchant. - # @!attribute [r] attribute - # @return [::String] - # Output only. The attribute's name, if the issue is caused by a single - # attribute. - # @!attribute [r] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # Output only. The reporting context the issue applies to. - # @!attribute [r] description - # @return [::String] - # Output only. A short issue description in English. - # @!attribute [r] detail - # @return [::String] - # Output only. A detailed issue description in English. - # @!attribute [r] documentation - # @return [::String] - # Output only. The URL of a web page to help with resolving this issue. - class MerchantReviewItemLevelIssue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # How the issue affects the serving of the merchant review. - module Severity - # Not specified. - SEVERITY_UNSPECIFIED = 0 - - # This issue represents a warning and does not have a direct affect - # on the merchant review. - NOT_IMPACTED = 1 - - # Issue disapproves the merchant review. - DISAPPROVED = 2 - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews.rb deleted file mode 100644 index 6305806f1589..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews.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 Reviews - module V1beta - # Request message for the GetProductReview method. - # @!attribute [rw] name - # @return [::String] - # Required. The ID of the merchant review. - # Format: accounts/\\{account}/productReviews/\\{productReview} - class GetProductReviewRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DeleteProductReview` method. - # @!attribute [rw] name - # @return [::String] - # Required. The ID of the Product review. - # Format: accounts/\\{account}/productReviews/\\{productReview} - class DeleteProductReviewRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListProductReviews method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account to list product reviews for. - # Format: accounts/\\{account} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of products to return. The service may return - # fewer than this value. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListProductReviews` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListProductReviews` - # must match the call that provided the page token. - class ListProductReviewsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `InsertProductReview` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The account where the product review will be inserted. - # Format: accounts/\\{account} - # @!attribute [rw] product_review - # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview] - # Required. The product review to insert. - # @!attribute [rw] data_source - # @return [::String] - # Required. Format: - # `accounts/{account}/dataSources/{datasource}`. - class InsertProductReviewRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # response message for the ListProductReviews method. - # @!attribute [rw] product_reviews - # @return [::Array<::Google::Shopping::Merchant::Reviews::V1beta::ProductReview>] - # The product review. - # @!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 ListProductReviewsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A review for a product. For more information, see - # [Introduction to Product Review - # Feeds](https://developers.google.com/product-review-feeds) - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the product review. - # Format: - # `"{productreview.name=accounts/{account}/productReviews/{productReview}}"` - # @!attribute [rw] product_review_id - # @return [::String] - # Required. The permanent, unique identifier for the product review in the - # publisher’s system. - # @!attribute [rw] product_review_attributes - # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewAttributes] - # Optional. A list of product review attributes. - # @!attribute [rw] custom_attributes - # @return [::Array<::Google::Shopping::Type::CustomAttribute>] - # Optional. A list of custom (merchant-provided) attributes. - # @!attribute [r] data_source - # @return [::String] - # Output only. The primary data source of the product review. - # @!attribute [r] product_review_status - # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewStatus] - # Output only. The status of a product review, data validation issues, that - # is, information about a product review computed asynchronously. - class ProductReview - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews_common.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews_common.rb deleted file mode 100644 index c3f0ca94ed2b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews_common.rb +++ /dev/null @@ -1,273 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Reviews - module V1beta - # Attributes. - # @!attribute [rw] aggregator_name - # @return [::String] - # Optional. The name of the aggregator of the product reviews. - # - # A publisher may use a reviews aggregator to manage reviews and provide - # the feeds. This element indicates the use of an aggregator and contains - # information about the aggregator. - # @!attribute [rw] subclient_name - # @return [::String] - # Optional. The name of the subclient of the product reviews. - # - # The subclient is an identifier of the product review source. - # It should be equivalent to the directory provided in the file data source - # path. - # @!attribute [rw] publisher_name - # @return [::String] - # Optional. The name of the publisher of the product reviews. - # - # The information about the publisher, which may be a retailer, - # manufacturer, reviews service company, or any entity that publishes - # product reviews. - # @!attribute [rw] publisher_favicon - # @return [::String] - # Optional. A link to the company favicon of the publisher. The image - # dimensions should be favicon size: 16x16 pixels. The image format should be - # GIF, JPG or PNG. - # @!attribute [rw] reviewer_id - # @return [::String] - # Optional. The author of the product review. - # - # A permanent, unique identifier for the author of the review in the - # publisher's system. - # @!attribute [rw] reviewer_is_anonymous - # @return [::Boolean] - # Optional. Set to true if the reviewer should remain anonymous. - # @!attribute [rw] reviewer_username - # @return [::String] - # Optional. The name of the reviewer of the product review. - # @!attribute [rw] review_language - # @return [::String] - # Optional. The language of the review defined by BCP-47 language code. - # @!attribute [rw] review_country - # @return [::String] - # Optional. The country of the review defined by ISO 3166-1 Alpha-2 Country - # Code. - # @!attribute [rw] review_time - # @return [::Google::Protobuf::Timestamp] - # Required. The timestamp indicating when the review was written. - # @!attribute [rw] title - # @return [::String] - # Optional. The title of the review. - # @!attribute [rw] content - # @return [::String] - # Optional. The content of the review. If empty, the content might still get - # populated from pros and cons. - # @!attribute [rw] pros - # @return [::Array<::String>] - # Optional. Contains the advantages based on the opinion of the reviewer. - # Omit boilerplate text like "pro:" unless it was written by the reviewer. - # @!attribute [rw] cons - # @return [::Array<::String>] - # Optional. Contains the disadvantages based on the opinion of the reviewer. - # Omit boilerplate text like "con:" unless it was written by the reviewer. - # @!attribute [rw] review_link - # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewAttributes::ReviewLink] - # Optional. The URI of the review landing page. - # @!attribute [rw] reviewer_image_links - # @return [::Array<::String>] - # Optional. A URI to an image of the reviewed product created by the review - # author. The URI does not have to end with an image file extension. - # @!attribute [rw] min_rating - # @return [::Integer] - # Optional. Contains the ratings associated with the review. - # The minimum possible number for the rating. This should be the worst - # possible rating and should not be a value for no rating. - # @!attribute [rw] max_rating - # @return [::Integer] - # Optional. The maximum possible number for the rating. The value of the max - # rating must be greater than the value of the min attribute. - # @!attribute [rw] rating - # @return [::Float] - # Optional. The reviewer's overall rating of the product. - # @!attribute [rw] product_names - # @return [::Array<::String>] - # Optional. Descriptive name of a product. - # @!attribute [rw] product_links - # @return [::Array<::String>] - # Optional. The URI of the product. This URI can have the same value as the - # `review_link` element, if the review URI and the product URI are the - # same. - # @!attribute [rw] asins - # @return [::Array<::String>] - # Optional. Contains ASINs (Amazon Standard Identification Numbers) - # associated with a product. - # @!attribute [rw] gtins - # @return [::Array<::String>] - # Optional. Contains GTINs (global trade item numbers) associated with a - # product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported. - # @!attribute [rw] mpns - # @return [::Array<::String>] - # Optional. Contains MPNs (manufacturer part numbers) associated with a - # product. - # @!attribute [rw] skus - # @return [::Array<::String>] - # Optional. Contains SKUs (stock keeping units) associated with a product. - # Often this matches the product Offer Id in the product feed. - # @!attribute [rw] brands - # @return [::Array<::String>] - # Optional. Contains brand names associated with a product. - # @!attribute [rw] is_spam - # @return [::Boolean] - # Optional. Indicates whether the review is marked as spam in the publisher's - # system. - # @!attribute [rw] is_verified_purchase - # @return [::Boolean] - # Optional. Indicates whether the reviewer's purchase is verified. - # @!attribute [rw] is_incentivized_review - # @return [::Boolean] - # Optional. Indicates whether the review is incentivized. - # @!attribute [rw] collection_method - # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewAttributes::CollectionMethod] - # Optional. The method used to collect the review. - # @!attribute [rw] transaction_id - # @return [::String] - # Optional. A permanent, unique identifier for the transaction associated - # with the review in the publisher's system. This ID can be used to indicate - # that multiple reviews are associated with the same transaction. - class ProductReviewAttributes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The URI of the review landing page. - # @!attribute [rw] type - # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewAttributes::ReviewLink::Type] - # Optional. Type of the review URI. - # @!attribute [rw] link - # @return [::String] - # Optional. The URI of the review landing page. - # For example: `http://www.example.com/review_5.html`. - class ReviewLink - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of the review URI. - module Type - # Type unspecified. - TYPE_UNSPECIFIED = 0 - - # The review page contains only this single review. - SINGLETON = 1 - - # The review page contains a group of reviews including this review. - GROUP = 2 - end - end - - # The method used to collect the review. - module CollectionMethod - # Collection method unspecified. - COLLECTION_METHOD_UNSPECIFIED = 0 - - # The user was not responding to a specific solicitation when they - # submitted the review. - UNSOLICITED = 1 - - # The user submitted the review in response to a solicitation after - # fulfillment of the user's order. - POST_FULFILLMENT = 2 - end - end - - # Product review status. - # @!attribute [r] destination_statuses - # @return [::Array<::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewStatus::ProductReviewDestinationStatus>] - # Output only. The intended destinations for the product review. - # @!attribute [r] item_level_issues - # @return [::Array<::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewStatus::ProductReviewItemLevelIssue>] - # Output only. A list of all issues associated with the product review. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Date on which the item has been created, in [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. - # @!attribute [r] last_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Date on which the item has been last updated, in [ISO - # 8601](http://en.wikipedia.org/wiki/ISO_8601) format. - class ProductReviewStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The destination status of the product review status. - # @!attribute [r] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # Output only. The name of the reporting context. - class ProductReviewDestinationStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The ItemLevelIssue of the product review status. - # @!attribute [r] code - # @return [::String] - # Output only. The error code of the issue. - # @!attribute [r] severity - # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewStatus::ProductReviewItemLevelIssue::Severity] - # Output only. How this issue affects serving of the product review. - # @!attribute [r] resolution - # @return [::String] - # Output only. Whether the issue can be resolved by the merchant. - # @!attribute [r] attribute - # @return [::String] - # Output only. The attribute's name, if the issue is caused by a single - # attribute. - # @!attribute [r] reporting_context - # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum] - # Output only. The reporting context the issue applies to. - # @!attribute [r] description - # @return [::String] - # Output only. A short issue description in English. - # @!attribute [r] detail - # @return [::String] - # Output only. A detailed issue description in English. - # @!attribute [r] documentation - # @return [::String] - # Output only. The URL of a web page to help with resolving this issue. - class ProductReviewItemLevelIssue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # How the issue affects the serving of the product review. - module Severity - # Not specified. - SEVERITY_UNSPECIFIED = 0 - - # This issue represents a warning and does not have a direct affect - # on the product review. - NOT_IMPACTED = 1 - - # Issue disapproves the product review. - DISAPPROVED = 2 - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/Gemfile deleted file mode 100644 index fc9a55054e31..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-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-reviews-v1beta", path: "../" -else - gem "google-shopping-merchant-reviews-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-reviews-v1beta/snippets/merchant_reviews_service/delete_merchant_review.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/delete_merchant_review.rb deleted file mode 100644 index 3bf6ab341e33..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/delete_merchant_review.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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_MerchantReviewsService_DeleteMerchantReview_sync] -require "google/shopping/merchant/reviews/v1beta" - -## -# Snippet for the delete_merchant_review call in the MerchantReviewsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#delete_merchant_review. -# -def delete_merchant_review - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest.new - - # Call the delete_merchant_review method. - result = client.delete_merchant_review request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_MerchantReviewsService_DeleteMerchantReview_sync] diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/get_merchant_review.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/get_merchant_review.rb deleted file mode 100644 index e74ae7f73e5b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/get_merchant_review.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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_MerchantReviewsService_GetMerchantReview_sync] -require "google/shopping/merchant/reviews/v1beta" - -## -# Snippet for the get_merchant_review call in the MerchantReviewsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#get_merchant_review. -# -def get_merchant_review - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest.new - - # Call the get_merchant_review method. - result = client.get_merchant_review request - - # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::MerchantReview. - p result -end -# [END merchantapi_v1beta_generated_MerchantReviewsService_GetMerchantReview_sync] diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/insert_merchant_review.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/insert_merchant_review.rb deleted file mode 100644 index a4ad91b0aa98..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/insert_merchant_review.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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_MerchantReviewsService_InsertMerchantReview_sync] -require "google/shopping/merchant/reviews/v1beta" - -## -# Snippet for the insert_merchant_review call in the MerchantReviewsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#insert_merchant_review. -# -def insert_merchant_review - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest.new - - # Call the insert_merchant_review method. - result = client.insert_merchant_review request - - # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::MerchantReview. - p result -end -# [END merchantapi_v1beta_generated_MerchantReviewsService_InsertMerchantReview_sync] diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/list_merchant_reviews.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/list_merchant_reviews.rb deleted file mode 100644 index a98cc375b132..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/merchant_reviews_service/list_merchant_reviews.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_MerchantReviewsService_ListMerchantReviews_sync] -require "google/shopping/merchant/reviews/v1beta" - -## -# Snippet for the list_merchant_reviews call in the MerchantReviewsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#list_merchant_reviews. -# -def list_merchant_reviews - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest.new - - # Call the list_merchant_reviews method. - result = client.list_merchant_reviews request - - # The returned object is of type Gapic::PagedEnumerable. You can 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::Reviews::V1beta::MerchantReview. - p item - end -end -# [END merchantapi_v1beta_generated_MerchantReviewsService_ListMerchantReviews_sync] diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/delete_product_review.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/delete_product_review.rb deleted file mode 100644 index b2e342fe1042..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/delete_product_review.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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_ProductReviewsService_DeleteProductReview_sync] -require "google/shopping/merchant/reviews/v1beta" - -## -# Snippet for the delete_product_review call in the ProductReviewsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#delete_product_review. -# -def delete_product_review - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest.new - - # Call the delete_product_review method. - result = client.delete_product_review request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END merchantapi_v1beta_generated_ProductReviewsService_DeleteProductReview_sync] diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/get_product_review.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/get_product_review.rb deleted file mode 100644 index eee1f0dc0863..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/get_product_review.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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_ProductReviewsService_GetProductReview_sync] -require "google/shopping/merchant/reviews/v1beta" - -## -# Snippet for the get_product_review call in the ProductReviewsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#get_product_review. -# -def get_product_review - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest.new - - # Call the get_product_review method. - result = client.get_product_review request - - # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::ProductReview. - p result -end -# [END merchantapi_v1beta_generated_ProductReviewsService_GetProductReview_sync] diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/insert_product_review.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/insert_product_review.rb deleted file mode 100644 index db93ef590cb8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/insert_product_review.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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_ProductReviewsService_InsertProductReview_sync] -require "google/shopping/merchant/reviews/v1beta" - -## -# Snippet for the insert_product_review call in the ProductReviewsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#insert_product_review. -# -def insert_product_review - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest.new - - # Call the insert_product_review method. - result = client.insert_product_review request - - # The returned object is of type Google::Shopping::Merchant::Reviews::V1beta::ProductReview. - p result -end -# [END merchantapi_v1beta_generated_ProductReviewsService_InsertProductReview_sync] diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/list_product_reviews.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/list_product_reviews.rb deleted file mode 100644 index 012d4654ccef..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/product_reviews_service/list_product_reviews.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_ProductReviewsService_ListProductReviews_sync] -require "google/shopping/merchant/reviews/v1beta" - -## -# Snippet for the list_product_reviews call in the ProductReviewsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#list_product_reviews. -# -def list_product_reviews - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest.new - - # Call the list_product_reviews method. - result = client.list_product_reviews request - - # The returned object is of type Gapic::PagedEnumerable. You can 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::Reviews::V1beta::ProductReview. - p item - end -end -# [END merchantapi_v1beta_generated_ProductReviewsService_ListProductReviews_sync] diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/snippet_metadata_google.shopping.merchant.reviews.v1beta.json b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/snippet_metadata_google.shopping.merchant.reviews.v1beta.json deleted file mode 100644 index f9506bbccf93..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/snippets/snippet_metadata_google.shopping.merchant.reviews.v1beta.json +++ /dev/null @@ -1,335 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-reviews-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.reviews.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_MerchantReviewsService_GetMerchantReview_sync", - "title": "Snippet for the get_merchant_review call in the MerchantReviewsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#get_merchant_review.", - "file": "merchant_reviews_service/get_merchant_review.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_merchant_review", - "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#get_merchant_review", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview", - "client": { - "short_name": "MerchantReviewsService::Client", - "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client" - }, - "method": { - "short_name": "GetMerchantReview", - "full_name": "google.shopping.merchant.reviews.v1beta.MerchantReviewsService.GetMerchantReview", - "service": { - "short_name": "MerchantReviewsService", - "full_name": "google.shopping.merchant.reviews.v1beta.MerchantReviewsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_MerchantReviewsService_ListMerchantReviews_sync", - "title": "Snippet for the list_merchant_reviews call in the MerchantReviewsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#list_merchant_reviews.", - "file": "merchant_reviews_service/list_merchant_reviews.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_merchant_reviews", - "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#list_merchant_reviews", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsResponse", - "client": { - "short_name": "MerchantReviewsService::Client", - "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client" - }, - "method": { - "short_name": "ListMerchantReviews", - "full_name": "google.shopping.merchant.reviews.v1beta.MerchantReviewsService.ListMerchantReviews", - "service": { - "short_name": "MerchantReviewsService", - "full_name": "google.shopping.merchant.reviews.v1beta.MerchantReviewsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_MerchantReviewsService_InsertMerchantReview_sync", - "title": "Snippet for the insert_merchant_review call in the MerchantReviewsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#insert_merchant_review.", - "file": "merchant_reviews_service/insert_merchant_review.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_merchant_review", - "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#insert_merchant_review", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview", - "client": { - "short_name": "MerchantReviewsService::Client", - "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client" - }, - "method": { - "short_name": "InsertMerchantReview", - "full_name": "google.shopping.merchant.reviews.v1beta.MerchantReviewsService.InsertMerchantReview", - "service": { - "short_name": "MerchantReviewsService", - "full_name": "google.shopping.merchant.reviews.v1beta.MerchantReviewsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_MerchantReviewsService_DeleteMerchantReview_sync", - "title": "Snippet for the delete_merchant_review call in the MerchantReviewsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#delete_merchant_review.", - "file": "merchant_reviews_service/delete_merchant_review.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_merchant_review", - "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client#delete_merchant_review", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "MerchantReviewsService::Client", - "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client" - }, - "method": { - "short_name": "DeleteMerchantReview", - "full_name": "google.shopping.merchant.reviews.v1beta.MerchantReviewsService.DeleteMerchantReview", - "service": { - "short_name": "MerchantReviewsService", - "full_name": "google.shopping.merchant.reviews.v1beta.MerchantReviewsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ProductReviewsService_GetProductReview_sync", - "title": "Snippet for the get_product_review call in the ProductReviewsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#get_product_review.", - "file": "product_reviews_service/get_product_review.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_product_review", - "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#get_product_review", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReview", - "client": { - "short_name": "ProductReviewsService::Client", - "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client" - }, - "method": { - "short_name": "GetProductReview", - "full_name": "google.shopping.merchant.reviews.v1beta.ProductReviewsService.GetProductReview", - "service": { - "short_name": "ProductReviewsService", - "full_name": "google.shopping.merchant.reviews.v1beta.ProductReviewsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ProductReviewsService_ListProductReviews_sync", - "title": "Snippet for the list_product_reviews call in the ProductReviewsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#list_product_reviews.", - "file": "product_reviews_service/list_product_reviews.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_product_reviews", - "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#list_product_reviews", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsResponse", - "client": { - "short_name": "ProductReviewsService::Client", - "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client" - }, - "method": { - "short_name": "ListProductReviews", - "full_name": "google.shopping.merchant.reviews.v1beta.ProductReviewsService.ListProductReviews", - "service": { - "short_name": "ProductReviewsService", - "full_name": "google.shopping.merchant.reviews.v1beta.ProductReviewsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ProductReviewsService_InsertProductReview_sync", - "title": "Snippet for the insert_product_review call in the ProductReviewsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#insert_product_review.", - "file": "product_reviews_service/insert_product_review.rb", - "language": "RUBY", - "client_method": { - "short_name": "insert_product_review", - "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#insert_product_review", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReview", - "client": { - "short_name": "ProductReviewsService::Client", - "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client" - }, - "method": { - "short_name": "InsertProductReview", - "full_name": "google.shopping.merchant.reviews.v1beta.ProductReviewsService.InsertProductReview", - "service": { - "short_name": "ProductReviewsService", - "full_name": "google.shopping.merchant.reviews.v1beta.ProductReviewsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1beta_generated_ProductReviewsService_DeleteProductReview_sync", - "title": "Snippet for the delete_product_review call in the ProductReviewsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#delete_product_review.", - "file": "product_reviews_service/delete_product_review.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_product_review", - "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client#delete_product_review", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ProductReviewsService::Client", - "full_name": "::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client" - }, - "method": { - "short_name": "DeleteProductReview", - "full_name": "google.shopping.merchant.reviews.v1beta.ProductReviewsService.DeleteProductReview", - "service": { - "short_name": "ProductReviewsService", - "full_name": "google.shopping.merchant.reviews.v1beta.ProductReviewsService" - } - } - }, - "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-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_paths_test.rb deleted file mode 100644 index ef0cd2bf6ea2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_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/reviews/v1beta/merchant_reviews_service" - -class ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::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::Reviews::V1beta::MerchantReviewsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_merchant_review_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::Reviews::V1beta::MerchantReviewsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.merchant_review_path account: "value0", name: "value1" - assert_equal "accounts/value0/merchantReviews/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_rest_test.rb deleted file mode 100644 index abe209026df2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_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/reviews/v1beta/merchantreviews_pb" -require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest" - - -class ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::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_merchant_review - # Create test objects. - client_result = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_merchant_review_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::ServiceStub.stub :transcode_get_merchant_review_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_merchant_review_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_merchant_review({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_merchant_review name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_merchant_review ::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_merchant_review({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_merchant_review(::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_merchant_review_client_stub.call_count - end - end - end - - def test_list_merchant_reviews - # Create test objects. - client_result = ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsResponse.new - http_response = OpenStruct.new 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_merchant_reviews_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::ServiceStub.stub :transcode_list_merchant_reviews_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_merchant_reviews_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_merchant_reviews({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_merchant_reviews parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_merchant_reviews ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest.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 - c.list_merchant_reviews({ 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 - c.list_merchant_reviews(::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest.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_merchant_reviews_client_stub.call_count - end - end - end - - def test_insert_merchant_review - # Create test objects. - client_result = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - merchant_review = {} - data_source = "hello world" - - insert_merchant_review_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::ServiceStub.stub :transcode_insert_merchant_review_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_merchant_review_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.insert_merchant_review({ parent: parent, merchant_review: merchant_review, data_source: data_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.insert_merchant_review parent: parent, merchant_review: merchant_review, data_source: data_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.insert_merchant_review ::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest.new(parent: parent, merchant_review: merchant_review, data_source: data_source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.insert_merchant_review({ parent: parent, merchant_review: merchant_review, data_source: data_source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.insert_merchant_review(::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest.new(parent: parent, merchant_review: merchant_review, data_source: data_source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_merchant_review_client_stub.call_count - end - end - end - - def test_delete_merchant_review - # 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_merchant_review_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::ServiceStub.stub :transcode_delete_merchant_review_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_merchant_review_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_merchant_review({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_merchant_review name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_merchant_review ::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_merchant_review({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_merchant_review(::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_merchant_review_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::Reviews::V1beta::MerchantReviewsService::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::Reviews::V1beta::MerchantReviewsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_test.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_service_test.rb deleted file mode 100644 index 70570a7e94fc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/merchant_reviews_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/reviews/v1beta/merchantreviews_pb" -require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service" - -class ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::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_merchant_review - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_merchant_review_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_merchant_review, name - assert_kind_of ::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_merchant_review_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_merchant_review({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_merchant_review name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_merchant_review ::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_merchant_review({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_merchant_review(::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_merchant_review_client_stub.call_rpc_count - end - end - - def test_list_merchant_reviews - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_merchant_reviews_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_merchant_reviews, name - assert_kind_of ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest, 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_merchant_reviews_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_merchant_reviews({ parent: parent, page_size: page_size, page_token: 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 - c.list_merchant_reviews parent: parent, page_size: page_size, page_token: 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 - c.list_merchant_reviews ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest.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 - c.list_merchant_reviews({ 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 - c.list_merchant_reviews(::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest.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_merchant_reviews_client_stub.call_rpc_count - end - end - - def test_insert_merchant_review - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - merchant_review = {} - data_source = "hello world" - - insert_merchant_review_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_merchant_review, name - assert_kind_of ::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview), request["merchant_review"] - assert_equal "hello world", request["data_source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_merchant_review_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.insert_merchant_review({ parent: parent, merchant_review: merchant_review, data_source: data_source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.insert_merchant_review parent: parent, merchant_review: merchant_review, data_source: data_source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.insert_merchant_review ::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest.new(parent: parent, merchant_review: merchant_review, data_source: data_source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.insert_merchant_review({ parent: parent, merchant_review: merchant_review, 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 - c.insert_merchant_review(::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest.new(parent: parent, merchant_review: merchant_review, 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, insert_merchant_review_client_stub.call_rpc_count - end - end - - def test_delete_merchant_review - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_merchant_review_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_merchant_review, name - assert_kind_of ::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_merchant_review_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_merchant_review({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_merchant_review name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_merchant_review ::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_merchant_review({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_merchant_review(::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest.new(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_merchant_review_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::Reviews::V1beta::MerchantReviewsService::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::Reviews::V1beta::MerchantReviewsService::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::Reviews::V1beta::MerchantReviewsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_paths_test.rb deleted file mode 100644 index d08895891421..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_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/reviews/v1beta/product_reviews_service" - -class ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::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::Reviews::V1beta::ProductReviewsService::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_review_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::Reviews::V1beta::ProductReviewsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.product_review_path account: "value0", productreview: "value1" - assert_equal "accounts/value0/productReviews/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_rest_test.rb deleted file mode 100644 index 773800b1cdd9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_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/reviews/v1beta/productreviews_pb" -require "google/shopping/merchant/reviews/v1beta/product_reviews_service/rest" - - -class ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::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_product_review - # Create test objects. - client_result = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReview.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_product_review_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::ServiceStub.stub :transcode_get_product_review_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_product_review_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_product_review({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_product_review name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_product_review ::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_product_review({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_product_review(::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_product_review_client_stub.call_count - end - end - end - - def test_list_product_reviews - # Create test objects. - client_result = ::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_product_reviews_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::ServiceStub.stub :transcode_list_product_reviews_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_product_reviews_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_product_reviews({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_product_reviews parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_product_reviews ::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest.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 - c.list_product_reviews({ 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 - c.list_product_reviews(::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_product_reviews_client_stub.call_count - end - end - end - - def test_insert_product_review - # Create test objects. - client_result = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReview.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - product_review = {} - data_source = "hello world" - - insert_product_review_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::ServiceStub.stub :transcode_insert_product_review_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, insert_product_review_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.insert_product_review({ parent: parent, product_review: product_review, data_source: data_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.insert_product_review parent: parent, product_review: product_review, data_source: data_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.insert_product_review ::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest.new(parent: parent, product_review: product_review, data_source: data_source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.insert_product_review({ parent: parent, product_review: product_review, data_source: data_source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.insert_product_review(::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest.new(parent: parent, product_review: product_review, data_source: data_source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, insert_product_review_client_stub.call_count - end - end - end - - def test_delete_product_review - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_product_review_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::ServiceStub.stub :transcode_delete_product_review_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_product_review_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_product_review({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_product_review name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_product_review ::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_product_review({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_product_review(::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_product_review_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::Reviews::V1beta::ProductReviewsService::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::Reviews::V1beta::ProductReviewsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_test.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_service_test.rb deleted file mode 100644 index 4ff70edccf39..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/google/shopping/merchant/reviews/v1beta/product_reviews_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/reviews/v1beta/productreviews_pb" -require "google/shopping/merchant/reviews/v1beta/product_reviews_service" - -class ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::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_product_review - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReview.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_product_review_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_product_review, name - assert_kind_of ::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_product_review_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_product_review({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_product_review name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_product_review ::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_product_review({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_product_review(::Google::Shopping::Merchant::Reviews::V1beta::GetProductReviewRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_product_review_client_stub.call_rpc_count - end - end - - def test_list_product_reviews - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_product_reviews_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_product_reviews, name - assert_kind_of ::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_product_reviews_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_product_reviews({ parent: parent, page_size: page_size, page_token: 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 - c.list_product_reviews parent: parent, page_size: page_size, page_token: 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 - c.list_product_reviews ::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest.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 - c.list_product_reviews({ 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 - c.list_product_reviews(::Google::Shopping::Merchant::Reviews::V1beta::ListProductReviewsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_product_reviews_client_stub.call_rpc_count - end - end - - def test_insert_product_review - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReview.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - product_review = {} - data_source = "hello world" - - insert_product_review_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :insert_product_review, name - assert_kind_of ::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::Reviews::V1beta::ProductReview), request["product_review"] - assert_equal "hello world", request["data_source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, insert_product_review_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.insert_product_review({ parent: parent, product_review: product_review, data_source: data_source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.insert_product_review parent: parent, product_review: product_review, data_source: data_source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.insert_product_review ::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest.new(parent: parent, product_review: product_review, data_source: data_source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.insert_product_review({ parent: parent, product_review: product_review, 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 - c.insert_product_review(::Google::Shopping::Merchant::Reviews::V1beta::InsertProductReviewRequest.new(parent: parent, product_review: product_review, 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, insert_product_review_client_stub.call_rpc_count - end - end - - def test_delete_product_review - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_product_review_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_product_review, name - assert_kind_of ::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_product_review_client_stub do - # Create client - c = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_product_review({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_product_review name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_product_review ::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_product_review({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_product_review(::Google::Shopping::Merchant::Reviews::V1beta::DeleteProductReviewRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_product_review_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::Reviews::V1beta::ProductReviewsService::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::Reviews::V1beta::ProductReviewsService::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::Reviews::V1beta::ProductReviewsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/grafeas-v1/.gitignore b/owl-bot-staging/grafeas-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/grafeas-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -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/grafeas-v1/.repo-metadata.json b/owl-bot-staging/grafeas-v1/.repo-metadata.json deleted file mode 100644 index d1fa0d6fa7f7..000000000000 --- a/owl-bot-staging/grafeas-v1/.repo-metadata.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "api_id": "containeranalysis.googleapis.com", - "api_shortname": "containeranalysis", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/grafeas-v1/latest", - "distribution_name": "grafeas-v1", - "is_cloud": true, - "language": "ruby", - "name": "containeranalysis", - "name_pretty": "Grafeas V1 API", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Grafeas API stores, and enables querying and retrieval of, critical metadata about all of your software artifacts. Note that grafeas-v1 is a version-specific client library. For most uses, we recommend installing the main client library grafeas instead. See the readme for more details.", - "ruby-cloud-env-prefix": "GRAFEAS", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/grafeas-v1/.rubocop.yml b/owl-bot-staging/grafeas-v1/.rubocop.yml deleted file mode 100644 index 34342e2dbb2e..000000000000 --- a/owl-bot-staging/grafeas-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "grafeas-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/grafeas-v1.rb" diff --git a/owl-bot-staging/grafeas-v1/.toys.rb b/owl-bot-staging/grafeas-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/grafeas-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/grafeas-v1/.yardopts b/owl-bot-staging/grafeas-v1/.yardopts deleted file mode 100644 index 095a73abbebf..000000000000 --- a/owl-bot-staging/grafeas-v1/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Grafeas V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md diff --git a/owl-bot-staging/grafeas-v1/CHANGELOG.md b/owl-bot-staging/grafeas-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/grafeas-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/grafeas-v1/Gemfile b/owl-bot-staging/grafeas-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/grafeas-v1/Gemfile +++ /dev/null @@ -1,15 +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-reporters", "~> 1.8.0", require: false -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/grafeas-v1/LICENSE.md b/owl-bot-staging/grafeas-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/grafeas-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/grafeas-v1/README.md b/owl-bot-staging/grafeas-v1/README.md deleted file mode 100644 index b9dc04cc0df4..000000000000 --- a/owl-bot-staging/grafeas-v1/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Grafeas V1 API - -An implementation of the Grafeas API, which stores, and enables querying and retrieval of critical metadata about all of your software artifacts. - -The Grafeas API stores, and enables querying and retrieval of, critical metadata about all of your software artifacts. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Grafeas V1 API. Most users should consider using -the main client gem, -[grafeas](https://rubygems.org/gems/grafeas). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install grafeas-v1 -``` - -## Quick Start - -```ruby -require "grafeas/v1" - -client = ::Grafeas::V1::Grafeas::Client.new -request = ::Grafeas::V1::GetOccurrenceRequest.new # (request fields as keyword arguments...) -response = client.get_occurrence request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/grafeas-v1/latest) -for class and method documentation. - -## 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 "grafeas/v1" -require "logger" - -client = ::Grafeas::V1::Grafeas::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.2+. - -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 `grafeas`, -and lower-level _versioned_ client libraries with names such as -`grafeas-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. -`grafeas`. -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. `grafeas-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/grafeas-v1/Rakefile b/owl-bot-staging/grafeas-v1/Rakefile deleted file mode 100644 index 98a03bfd1e86..000000000000 --- a/owl-bot-staging/grafeas-v1/Rakefile +++ /dev/null @@ -1,143 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "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 grafeas-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The grafeas-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 grafeas-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 grafeas-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 grafeas-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING grafeas-v1" - header "grafeas-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "grafeas-v1 yard", "*" - Rake::Task[:yard].invoke - header "grafeas-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 "grafeas-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 "grafeas-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/grafeas-v1/gapic_metadata.json b/owl-bot-staging/grafeas-v1/gapic_metadata.json deleted file mode 100644 index 9722caf753b2..000000000000 --- a/owl-bot-staging/grafeas-v1/gapic_metadata.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "grafeas.v1", - "libraryPackage": "::Grafeas::V1", - "services": { - "Grafeas": { - "clients": { - "grpc": { - "libraryClient": "::Grafeas::V1::Grafeas::Client", - "rpcs": { - "GetOccurrence": { - "methods": [ - "get_occurrence" - ] - }, - "ListOccurrences": { - "methods": [ - "list_occurrences" - ] - }, - "DeleteOccurrence": { - "methods": [ - "delete_occurrence" - ] - }, - "CreateOccurrence": { - "methods": [ - "create_occurrence" - ] - }, - "BatchCreateOccurrences": { - "methods": [ - "batch_create_occurrences" - ] - }, - "UpdateOccurrence": { - "methods": [ - "update_occurrence" - ] - }, - "GetOccurrenceNote": { - "methods": [ - "get_occurrence_note" - ] - }, - "GetNote": { - "methods": [ - "get_note" - ] - }, - "ListNotes": { - "methods": [ - "list_notes" - ] - }, - "DeleteNote": { - "methods": [ - "delete_note" - ] - }, - "CreateNote": { - "methods": [ - "create_note" - ] - }, - "BatchCreateNotes": { - "methods": [ - "batch_create_notes" - ] - }, - "UpdateNote": { - "methods": [ - "update_note" - ] - }, - "ListNoteOccurrences": { - "methods": [ - "list_note_occurrences" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/grafeas-v1/grafeas-v1.gemspec b/owl-bot-staging/grafeas-v1/grafeas-v1.gemspec deleted file mode 100644 index 324ac28fb52f..000000000000 --- a/owl-bot-staging/grafeas-v1/grafeas-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/grafeas/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "grafeas-v1" - gem.version = Grafeas::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Grafeas API stores, and enables querying and retrieval of, critical metadata about all of your software artifacts. Note that grafeas-v1 is a version-specific client library. For most uses, we recommend installing the main client library grafeas instead. See the readme for more details." - gem.summary = "An implementation of the Grafeas API, which stores, and enables querying and retrieval of critical metadata about all of your software artifacts." - 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", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas-v1.rb b/owl-bot-staging/grafeas-v1/lib/grafeas-v1.rb deleted file mode 100644 index 05b00fa8d69e..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas-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 "grafeas/v1" diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1.rb deleted file mode 100644 index 0449a2645755..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1.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 "grafeas/v1/grafeas" -require "grafeas/v1/version" - -module Grafeas - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "grafeas/v1" - # client = ::Grafeas::V1::Grafeas::Client.new - # - module V1 - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "grafeas/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/attestation_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/attestation_pb.rb deleted file mode 100644 index 795fe75c22f5..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/attestation_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/attestation.proto - -require 'google/protobuf' - -require 'grafeas/v1/common_pb' - - -descriptor_data = "\n\x1cgrafeas/v1/attestation.proto\x12\ngrafeas.v1\x1a\x17grafeas/v1/common.proto\"f\n\x0f\x41ttestationNote\x12.\n\x04hint\x18\x01 \x01(\x0b\x32 .grafeas.v1.AttestationNote.Hint\x1a#\n\x04Hint\x12\x1b\n\x13human_readable_name\x18\x01 \x01(\t\"\x1a\n\x03Jwt\x12\x13\n\x0b\x63ompact_jwt\x18\x01 \x01(\t\"}\n\x15\x41ttestationOccurrence\x12\x1a\n\x12serialized_payload\x18\x01 \x01(\x0c\x12)\n\nsignatures\x18\x02 \x03(\x0b\x32\x15.grafeas.v1.Signature\x12\x1d\n\x04jwts\x18\x03 \x03(\x0b\x32\x0f.grafeas.v1.JwtBQ\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - AttestationNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.AttestationNote").msgclass - AttestationNote::Hint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.AttestationNote.Hint").msgclass - Jwt = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Jwt").msgclass - AttestationOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.AttestationOccurrence").msgclass - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/build_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/build_pb.rb deleted file mode 100644 index 9741f1d0f6db..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/build_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/build.proto - -require 'google/protobuf' - -require 'grafeas/v1/intoto_provenance_pb' -require 'grafeas/v1/intoto_statement_pb' -require 'grafeas/v1/provenance_pb' - - -descriptor_data = "\n\x16grafeas/v1/build.proto\x12\ngrafeas.v1\x1a\"grafeas/v1/intoto_provenance.proto\x1a!grafeas/v1/intoto_statement.proto\x1a\x1bgrafeas/v1/provenance.proto\"$\n\tBuildNote\x12\x17\n\x0f\x62uilder_version\x18\x01 \x01(\t\"\x94\x02\n\x0f\x42uildOccurrence\x12/\n\nprovenance\x18\x01 \x01(\x0b\x32\x1b.grafeas.v1.BuildProvenance\x12\x18\n\x10provenance_bytes\x18\x02 \x01(\t\x12\x37\n\x11intoto_provenance\x18\x03 \x01(\x0b\x32\x1c.grafeas.v1.InTotoProvenance\x12\x35\n\x10intoto_statement\x18\x04 \x01(\x0b\x32\x1b.grafeas.v1.InTotoStatement\x12\x46\n\x1ain_toto_slsa_provenance_v1\x18\x05 \x01(\x0b\x32\".grafeas.v1.InTotoSlsaProvenanceV1BQ\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - BuildNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.BuildNote").msgclass - BuildOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.BuildOccurrence").msgclass - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/common_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/common_pb.rb deleted file mode 100644 index ce9669d62bca..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/common_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/common.proto - -require 'google/protobuf' - - -descriptor_data = "\n\x17grafeas/v1/common.proto\x12\ngrafeas.v1\"(\n\nRelatedUrl\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\"5\n\tSignature\x12\x11\n\tsignature\x18\x01 \x01(\x0c\x12\x15\n\rpublic_key_id\x18\x02 \x01(\t\"d\n\x08\x45nvelope\x12\x0f\n\x07payload\x18\x01 \x01(\x0c\x12\x14\n\x0cpayload_type\x18\x02 \x01(\t\x12\x31\n\nsignatures\x18\x03 \x03(\x0b\x32\x1d.grafeas.v1.EnvelopeSignature\"/\n\x11\x45nvelopeSignature\x12\x0b\n\x03sig\x18\x01 \x01(\x0c\x12\r\n\x05keyid\x18\x02 \x01(\t\"g\n\x0c\x46ileLocation\x12\x11\n\tfile_path\x18\x01 \x01(\t\x12/\n\rlayer_details\x18\x02 \x01(\x0b\x32\x18.grafeas.v1.LayerDetails\x12\x13\n\x0bline_number\x18\x03 \x01(\x05\"T\n\tBaseImage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nrepository\x18\x02 \x01(\t\x12\x13\n\x0blayer_count\x18\x03 \x01(\x05\x12\x10\n\x08registry\x18\x04 \x01(\t\"}\n\x0cLayerDetails\x12\r\n\x05index\x18\x01 \x01(\x05\x12\x0f\n\x07\x64iff_id\x18\x02 \x01(\t\x12\x10\n\x08\x63hain_id\x18\x05 \x01(\t\x12\x0f\n\x07\x63ommand\x18\x03 \x01(\t\x12*\n\x0b\x62\x61se_images\x18\x04 \x03(\x0b\x32\x15.grafeas.v1.BaseImage\"/\n\x07License\x12\x12\n\nexpression\x18\x01 \x01(\t\x12\x10\n\x08\x63omments\x18\x02 \x01(\t\",\n\x06\x44igest\x12\x0c\n\x04\x61lgo\x18\x01 \x01(\t\x12\x14\n\x0c\x64igest_bytes\x18\x02 \x01(\x0c*\xfc\x01\n\x08NoteKind\x12\x19\n\x15NOTE_KIND_UNSPECIFIED\x10\x00\x12\x11\n\rVULNERABILITY\x10\x01\x12\t\n\x05\x42UILD\x10\x02\x12\t\n\x05IMAGE\x10\x03\x12\x0b\n\x07PACKAGE\x10\x04\x12\x0e\n\nDEPLOYMENT\x10\x05\x12\r\n\tDISCOVERY\x10\x06\x12\x0f\n\x0b\x41TTESTATION\x10\x07\x12\x0b\n\x07UPGRADE\x10\x08\x12\x0e\n\nCOMPLIANCE\x10\t\x12\x14\n\x10\x44SSE_ATTESTATION\x10\n\x12\x1c\n\x18VULNERABILITY_ASSESSMENT\x10\x0b\x12\x12\n\x0eSBOM_REFERENCE\x10\x0c\x12\n\n\x06SECRET\x10\rBQ\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - RelatedUrl = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.RelatedUrl").msgclass - Signature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Signature").msgclass - Envelope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Envelope").msgclass - EnvelopeSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.EnvelopeSignature").msgclass - FileLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.FileLocation").msgclass - BaseImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.BaseImage").msgclass - LayerDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.LayerDetails").msgclass - License = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.License").msgclass - Digest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Digest").msgclass - NoteKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.NoteKind").enummodule - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/compliance_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/compliance_pb.rb deleted file mode 100644 index a4bd2780c5a2..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/compliance_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/compliance.proto - -require 'google/protobuf' - -require 'grafeas/v1/severity_pb' - - -descriptor_data = "\n\x1bgrafeas/v1/compliance.proto\x12\ngrafeas.v1\x1a\x19grafeas/v1/severity.proto\"\xf1\x02\n\x0e\x43omplianceNote\x12\r\n\x05title\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12.\n\x07version\x18\x03 \x03(\x0b\x32\x1d.grafeas.v1.ComplianceVersion\x12\x11\n\trationale\x18\x04 \x01(\t\x12\x13\n\x0bremediation\x18\x05 \x01(\t\x12@\n\rcis_benchmark\x18\x06 \x01(\x0b\x32\'.grafeas.v1.ComplianceNote.CisBenchmarkH\x00\x12\x19\n\x11scan_instructions\x18\x07 \x01(\x0c\x12\x10\n\x06impact\x18\x08 \x01(\tH\x01\x1aM\n\x0c\x43isBenchmark\x12\x15\n\rprofile_level\x18\x01 \x01(\x05\x12&\n\x08severity\x18\x02 \x01(\x0e\x32\x14.grafeas.v1.SeverityB\x11\n\x0f\x63ompliance_typeB\x12\n\x10potential_impact\"Q\n\x11\x43omplianceVersion\x12\x0f\n\x07\x63pe_uri\x18\x01 \x01(\t\x12\x1a\n\x12\x62\x65nchmark_document\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\"\xa0\x01\n\x14\x43omplianceOccurrence\x12\x39\n\x13non_compliant_files\x18\x02 \x03(\x0b\x32\x1c.grafeas.v1.NonCompliantFile\x12\x1d\n\x15non_compliance_reason\x18\x03 \x01(\t\x12.\n\x07version\x18\x04 \x01(\x0b\x32\x1d.grafeas.v1.ComplianceVersion\"I\n\x10NonCompliantFile\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x17\n\x0f\x64isplay_command\x18\x02 \x01(\t\x12\x0e\n\x06reason\x18\x03 \x01(\tBQ\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - ComplianceNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ComplianceNote").msgclass - ComplianceNote::CisBenchmark = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ComplianceNote.CisBenchmark").msgclass - ComplianceVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ComplianceVersion").msgclass - ComplianceOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ComplianceOccurrence").msgclass - NonCompliantFile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.NonCompliantFile").msgclass - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/cvss_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/cvss_pb.rb deleted file mode 100644 index 6855ca3fe246..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/cvss_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/cvss.proto - -require 'google/protobuf' - - -descriptor_data = "\n\x15grafeas/v1/cvss.proto\x12\ngrafeas.v1\"\xc5\t\n\x06\x43VSSv3\x12\x12\n\nbase_score\x18\x01 \x01(\x02\x12\x1c\n\x14\x65xploitability_score\x18\x02 \x01(\x02\x12\x14\n\x0cimpact_score\x18\x03 \x01(\x02\x12\x36\n\rattack_vector\x18\x05 \x01(\x0e\x32\x1f.grafeas.v1.CVSSv3.AttackVector\x12>\n\x11\x61ttack_complexity\x18\x06 \x01(\x0e\x32#.grafeas.v1.CVSSv3.AttackComplexity\x12\x42\n\x13privileges_required\x18\x07 \x01(\x0e\x32%.grafeas.v1.CVSSv3.PrivilegesRequired\x12<\n\x10user_interaction\x18\x08 \x01(\x0e\x32\".grafeas.v1.CVSSv3.UserInteraction\x12\'\n\x05scope\x18\t \x01(\x0e\x32\x18.grafeas.v1.CVSSv3.Scope\x12\x39\n\x16\x63onfidentiality_impact\x18\n \x01(\x0e\x32\x19.grafeas.v1.CVSSv3.Impact\x12\x33\n\x10integrity_impact\x18\x0b \x01(\x0e\x32\x19.grafeas.v1.CVSSv3.Impact\x12\x36\n\x13\x61vailability_impact\x18\x0c \x01(\x0e\x32\x19.grafeas.v1.CVSSv3.Impact\"\x99\x01\n\x0c\x41ttackVector\x12\x1d\n\x19\x41TTACK_VECTOR_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_VECTOR_NETWORK\x10\x01\x12\x1a\n\x16\x41TTACK_VECTOR_ADJACENT\x10\x02\x12\x17\n\x13\x41TTACK_VECTOR_LOCAL\x10\x03\x12\x1a\n\x16\x41TTACK_VECTOR_PHYSICAL\x10\x04\"l\n\x10\x41ttackComplexity\x12!\n\x1d\x41TTACK_COMPLEXITY_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_COMPLEXITY_LOW\x10\x01\x12\x1a\n\x16\x41TTACK_COMPLEXITY_HIGH\x10\x02\"\x92\x01\n\x12PrivilegesRequired\x12#\n\x1fPRIVILEGES_REQUIRED_UNSPECIFIED\x10\x00\x12\x1c\n\x18PRIVILEGES_REQUIRED_NONE\x10\x01\x12\x1b\n\x17PRIVILEGES_REQUIRED_LOW\x10\x02\x12\x1c\n\x18PRIVILEGES_REQUIRED_HIGH\x10\x03\"m\n\x0fUserInteraction\x12 \n\x1cUSER_INTERACTION_UNSPECIFIED\x10\x00\x12\x19\n\x15USER_INTERACTION_NONE\x10\x01\x12\x1d\n\x19USER_INTERACTION_REQUIRED\x10\x02\"F\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSCOPE_UNCHANGED\x10\x01\x12\x11\n\rSCOPE_CHANGED\x10\x02\"R\n\x06Impact\x12\x16\n\x12IMPACT_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIMPACT_HIGH\x10\x01\x12\x0e\n\nIMPACT_LOW\x10\x02\x12\x0f\n\x0bIMPACT_NONE\x10\x03\"\xce\x12\n\x04\x43VSS\x12\x12\n\nbase_score\x18\x01 \x01(\x02\x12\x1c\n\x14\x65xploitability_score\x18\x02 \x01(\x02\x12\x14\n\x0cimpact_score\x18\x03 \x01(\x02\x12\x34\n\rattack_vector\x18\x04 \x01(\x0e\x32\x1d.grafeas.v1.CVSS.AttackVector\x12<\n\x11\x61ttack_complexity\x18\x05 \x01(\x0e\x32!.grafeas.v1.CVSS.AttackComplexity\x12\x37\n\x0e\x61uthentication\x18\x06 \x01(\x0e\x32\x1f.grafeas.v1.CVSS.Authentication\x12@\n\x13privileges_required\x18\x07 \x01(\x0e\x32#.grafeas.v1.CVSS.PrivilegesRequired\x12:\n\x10user_interaction\x18\x08 \x01(\x0e\x32 .grafeas.v1.CVSS.UserInteraction\x12%\n\x05scope\x18\t \x01(\x0e\x32\x16.grafeas.v1.CVSS.Scope\x12\x37\n\x16\x63onfidentiality_impact\x18\n \x01(\x0e\x32\x17.grafeas.v1.CVSS.Impact\x12\x31\n\x10integrity_impact\x18\x0b \x01(\x0e\x32\x17.grafeas.v1.CVSS.Impact\x12\x34\n\x13\x61vailability_impact\x18\x0c \x01(\x0e\x32\x17.grafeas.v1.CVSS.Impact\x12@\n\x13\x61ttack_requirements\x18\r \x01(\x0e\x32#.grafeas.v1.CVSS.AttackRequirements\x12I\n(vulnerable_system_confidentiality_impact\x18\x0e \x01(\x0e\x32\x17.grafeas.v1.CVSS.Impact\x12\x43\n\"vulnerable_system_integrity_impact\x18\x0f \x01(\x0e\x32\x17.grafeas.v1.CVSS.Impact\x12\x46\n%vulnerable_system_availability_impact\x18\x10 \x01(\x0e\x32\x17.grafeas.v1.CVSS.Impact\x12I\n(subsequent_system_confidentiality_impact\x18\x11 \x01(\x0e\x32\x17.grafeas.v1.CVSS.Impact\x12\x43\n\"subsequent_system_integrity_impact\x18\x12 \x01(\x0e\x32\x17.grafeas.v1.CVSS.Impact\x12\x46\n%subsequent_system_availability_impact\x18\x13 \x01(\x0e\x32\x17.grafeas.v1.CVSS.Impact\x12:\n\x10\x65xploit_maturity\x18\x14 \x01(\x0e\x32 .grafeas.v1.CVSS.ExploitMaturity\"\x99\x01\n\x0c\x41ttackVector\x12\x1d\n\x19\x41TTACK_VECTOR_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_VECTOR_NETWORK\x10\x01\x12\x1a\n\x16\x41TTACK_VECTOR_ADJACENT\x10\x02\x12\x17\n\x13\x41TTACK_VECTOR_LOCAL\x10\x03\x12\x1a\n\x16\x41TTACK_VECTOR_PHYSICAL\x10\x04\"\x8a\x01\n\x10\x41ttackComplexity\x12!\n\x1d\x41TTACK_COMPLEXITY_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_COMPLEXITY_LOW\x10\x01\x12\x1a\n\x16\x41TTACK_COMPLEXITY_HIGH\x10\x02\x12\x1c\n\x18\x41TTACK_COMPLEXITY_MEDIUM\x10\x03\"\x81\x01\n\x0e\x41uthentication\x12\x1e\n\x1a\x41UTHENTICATION_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x41UTHENTICATION_MULTIPLE\x10\x01\x12\x19\n\x15\x41UTHENTICATION_SINGLE\x10\x02\x12\x17\n\x13\x41UTHENTICATION_NONE\x10\x03\"\x92\x01\n\x12PrivilegesRequired\x12#\n\x1fPRIVILEGES_REQUIRED_UNSPECIFIED\x10\x00\x12\x1c\n\x18PRIVILEGES_REQUIRED_NONE\x10\x01\x12\x1b\n\x17PRIVILEGES_REQUIRED_LOW\x10\x02\x12\x1c\n\x18PRIVILEGES_REQUIRED_HIGH\x10\x03\"\xa8\x01\n\x0fUserInteraction\x12 \n\x1cUSER_INTERACTION_UNSPECIFIED\x10\x00\x12\x19\n\x15USER_INTERACTION_NONE\x10\x01\x12\x1d\n\x19USER_INTERACTION_REQUIRED\x10\x02\x12\x1c\n\x18USER_INTERACTION_PASSIVE\x10\x03\x12\x1b\n\x17USER_INTERACTION_ACTIVE\x10\x04\"F\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSCOPE_UNCHANGED\x10\x01\x12\x11\n\rSCOPE_CHANGED\x10\x02\"{\n\x06Impact\x12\x16\n\x12IMPACT_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIMPACT_HIGH\x10\x01\x12\x0e\n\nIMPACT_LOW\x10\x02\x12\x0f\n\x0bIMPACT_NONE\x10\x03\x12\x12\n\x0eIMPACT_PARTIAL\x10\x04\x12\x13\n\x0fIMPACT_COMPLETE\x10\x05\"x\n\x12\x41ttackRequirements\x12#\n\x1f\x41TTACK_REQUIREMENTS_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x41TTACK_REQUIREMENTS_NONE\x10\x01\x12\x1f\n\x1b\x41TTACK_REQUIREMENTS_PRESENT\x10\x02\"\xaf\x01\n\x0f\x45xploitMaturity\x12 \n\x1c\x45XPLOIT_MATURITY_UNSPECIFIED\x10\x00\x12 \n\x1c\x45XPLOIT_MATURITY_NOT_DEFINED\x10\x01\x12\x1d\n\x19\x45XPLOIT_MATURITY_ATTACKED\x10\x02\x12\x18\n\x14\x45XPLOIT_MATURITY_POC\x10\x03\x12\x1f\n\x1b\x45XPLOIT_MATURITY_UNREPORTED\x10\x04*g\n\x0b\x43VSSVersion\x12\x1c\n\x18\x43VSS_VERSION_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x43VSS_VERSION_2\x10\x01\x12\x12\n\x0e\x43VSS_VERSION_3\x10\x02\x12\x12\n\x0e\x43VSS_VERSION_4\x10\x03\x42\\\n\rio.grafeas.v1B\tCVSSProtoP\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - CVSSv3 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSSv3").msgclass - CVSSv3::AttackVector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSSv3.AttackVector").enummodule - CVSSv3::AttackComplexity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSSv3.AttackComplexity").enummodule - CVSSv3::PrivilegesRequired = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSSv3.PrivilegesRequired").enummodule - CVSSv3::UserInteraction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSSv3.UserInteraction").enummodule - CVSSv3::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSSv3.Scope").enummodule - CVSSv3::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSSv3.Impact").enummodule - CVSS = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSS").msgclass - CVSS::AttackVector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSS.AttackVector").enummodule - CVSS::AttackComplexity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSS.AttackComplexity").enummodule - CVSS::Authentication = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSS.Authentication").enummodule - CVSS::PrivilegesRequired = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSS.PrivilegesRequired").enummodule - CVSS::UserInteraction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSS.UserInteraction").enummodule - CVSS::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSS.Scope").enummodule - CVSS::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSS.Impact").enummodule - CVSS::AttackRequirements = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSS.AttackRequirements").enummodule - CVSS::ExploitMaturity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSS.ExploitMaturity").enummodule - CVSSVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CVSSVersion").enummodule - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/deployment_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/deployment_pb.rb deleted file mode 100644 index 80388f920c3d..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/deployment_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/deployment.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\x1bgrafeas/v1/deployment.proto\x12\ngrafeas.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"&\n\x0e\x44\x65ploymentNote\x12\x14\n\x0cresource_uri\x18\x01 \x03(\t\"\xc7\x02\n\x14\x44\x65ploymentOccurrence\x12\x12\n\nuser_email\x18\x01 \x01(\t\x12/\n\x0b\x64\x65ploy_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rundeploy_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06\x63onfig\x18\x04 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x05 \x01(\t\x12\x14\n\x0cresource_uri\x18\x06 \x03(\t\x12;\n\x08platform\x18\x07 \x01(\x0e\x32).grafeas.v1.DeploymentOccurrence.Platform\"C\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x07\n\x03GKE\x10\x01\x12\x08\n\x04\x46LEX\x10\x02\x12\n\n\x06\x43USTOM\x10\x03\x42Q\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - DeploymentNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DeploymentNote").msgclass - DeploymentOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DeploymentOccurrence").msgclass - DeploymentOccurrence::Platform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DeploymentOccurrence.Platform").enummodule - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/discovery_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/discovery_pb.rb deleted file mode 100644 index eb72608cb96b..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/discovery_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/discovery.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' -require 'grafeas/v1/common_pb' - - -descriptor_data = "\n\x1agrafeas/v1/discovery.proto\x12\ngrafeas.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x17grafeas/v1/common.proto\"<\n\rDiscoveryNote\x12+\n\ranalysis_kind\x18\x01 \x01(\x0e\x32\x14.grafeas.v1.NoteKind\"\xfd\x0c\n\x13\x44iscoveryOccurrence\x12O\n\x13\x63ontinuous_analysis\x18\x01 \x01(\x0e\x32\x32.grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis\x12G\n\x0f\x61nalysis_status\x18\x02 \x01(\x0e\x32..grafeas.v1.DiscoveryOccurrence.AnalysisStatus\x12M\n\x12\x61nalysis_completed\x18\x07 \x01(\x0b\x32\x31.grafeas.v1.DiscoveryOccurrence.AnalysisCompleted\x12*\n\x0e\x61nalysis_error\x18\x08 \x03(\x0b\x32\x12.google.rpc.Status\x12\x31\n\x15\x61nalysis_status_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12\x0b\n\x03\x63pe\x18\x04 \x01(\t\x12\x32\n\x0elast_scan_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x0c\x61rchive_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x0bsbom_status\x18\t \x01(\x0b\x32*.grafeas.v1.DiscoveryOccurrence.SBOMStatus\x12[\n\x19vulnerability_attestation\x18\n \x01(\x0b\x32\x38.grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation\x12\x33\n\x05\x66iles\x18\x0b \x03(\x0b\x32$.grafeas.v1.DiscoveryOccurrence.File\x12\x42\n\x1elast_vulnerability_update_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a*\n\x11\x41nalysisCompleted\x12\x15\n\ranalysis_type\x18\x01 \x03(\t\x1a\xa9\x01\n\nSBOMStatus\x12H\n\nsbom_state\x18\x01 \x01(\x0e\x32\x34.grafeas.v1.DiscoveryOccurrence.SBOMStatus.SBOMState\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"B\n\tSBOMState\x12\x1a\n\x16SBOM_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08\x43OMPLETE\x10\x02\x1a\xb3\x02\n\x18VulnerabilityAttestation\x12\x35\n\x11last_attempt_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x65\n\x05state\x18\x02 \x01(\x0e\x32V.grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.VulnerabilityAttestationState\x12\r\n\x05\x65rror\x18\x03 \x01(\t\"j\n\x1dVulnerabilityAttestationState\x12/\n+VULNERABILITY_ATTESTATION_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\x0b\n\x07\x46\x41ILURE\x10\x02\x1a\x85\x01\n\x04\x46ile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12@\n\x06\x64igest\x18\x02 \x03(\x0b\x32\x30.grafeas.v1.DiscoveryOccurrence.File.DigestEntry\x1a-\n\x0b\x44igestEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"S\n\x12\x43ontinuousAnalysis\x12#\n\x1f\x43ONTINUOUS_ANALYSIS_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\"\xa3\x01\n\x0e\x41nalysisStatus\x12\x1f\n\x1b\x41NALYSIS_STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08SCANNING\x10\x02\x12\x14\n\x10\x46INISHED_SUCCESS\x10\x03\x12\x0c\n\x08\x43OMPLETE\x10\x03\x12\x13\n\x0f\x46INISHED_FAILED\x10\x04\x12\x18\n\x14\x46INISHED_UNSUPPORTED\x10\x05\x1a\x02\x10\x01\x42Q\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - DiscoveryNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DiscoveryNote").msgclass - DiscoveryOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DiscoveryOccurrence").msgclass - DiscoveryOccurrence::AnalysisCompleted = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DiscoveryOccurrence.AnalysisCompleted").msgclass - DiscoveryOccurrence::SBOMStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DiscoveryOccurrence.SBOMStatus").msgclass - DiscoveryOccurrence::SBOMStatus::SBOMState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DiscoveryOccurrence.SBOMStatus.SBOMState").enummodule - DiscoveryOccurrence::VulnerabilityAttestation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation").msgclass - DiscoveryOccurrence::VulnerabilityAttestation::VulnerabilityAttestationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DiscoveryOccurrence.VulnerabilityAttestation.VulnerabilityAttestationState").enummodule - DiscoveryOccurrence::File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DiscoveryOccurrence.File").msgclass - DiscoveryOccurrence::ContinuousAnalysis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis").enummodule - DiscoveryOccurrence::AnalysisStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DiscoveryOccurrence.AnalysisStatus").enummodule - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/dsse_attestation_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/dsse_attestation_pb.rb deleted file mode 100644 index 96a69f6b339b..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/dsse_attestation_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/dsse_attestation.proto - -require 'google/protobuf' - -require 'grafeas/v1/common_pb' -require 'grafeas/v1/intoto_statement_pb' - - -descriptor_data = "\n!grafeas/v1/dsse_attestation.proto\x12\ngrafeas.v1\x1a\x17grafeas/v1/common.proto\x1a!grafeas/v1/intoto_statement.proto\"v\n\x13\x44SSEAttestationNote\x12\x36\n\x04hint\x18\x01 \x01(\x0b\x32(.grafeas.v1.DSSEAttestationNote.DSSEHint\x1a\'\n\x08\x44SSEHint\x12\x1b\n\x13human_readable_name\x18\x01 \x01(\t\"\x88\x01\n\x19\x44SSEAttestationOccurrence\x12&\n\x08\x65nvelope\x18\x01 \x01(\x0b\x32\x14.grafeas.v1.Envelope\x12\x30\n\tstatement\x18\x02 \x01(\x0b\x32\x1b.grafeas.v1.InTotoStatementH\x00\x42\x11\n\x0f\x64\x65\x63oded_payloadBQ\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - DSSEAttestationNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DSSEAttestationNote").msgclass - DSSEAttestationNote::DSSEHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DSSEAttestationNote.DSSEHint").msgclass - DSSEAttestationOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DSSEAttestationOccurrence").msgclass - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas.rb deleted file mode 100644 index 9210c381b5f8..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas.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 "grafeas/v1/version" - -require "grafeas/v1/grafeas/paths" -require "grafeas/v1/grafeas/client" - -module Grafeas - module V1 - ## - # [Grafeas](https://grafeas.io) API. - # - # Retrieves analysis results of Cloud components such as Docker container - # images. - # - # Analysis results are stored as a series of occurrences. An `Occurrence` - # contains information about a specific analysis instance on a resource. An - # occurrence refers to a `Note`. A note contains details describing the - # analysis and is generally stored in a separate project, called a `Provider`. - # Multiple occurrences can refer to the same note. - # - # For example, an SSL vulnerability could affect multiple images. In this case, - # there would be one note for the vulnerability and an occurrence for each - # image with the vulnerability referring to that note. - # - # @example Load this service and instantiate a gRPC client - # - # require "grafeas/v1/grafeas" - # client = ::Grafeas::V1::Grafeas::Client.new - # - module Grafeas - end - end -end - -helper_path = ::File.join __dir__, "grafeas", "helpers.rb" -require "grafeas/v1/grafeas/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas/client.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas/client.rb deleted file mode 100644 index 013d9a50b78d..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas/client.rb +++ /dev/null @@ -1,1810 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "grafeas/v1/grafeas_pb" - -module Grafeas - module V1 - module Grafeas - ## - # Client for the Grafeas service. - # - # [Grafeas](https://grafeas.io) API. - # - # Retrieves analysis results of Cloud components such as Docker container - # images. - # - # Analysis results are stored as a series of occurrences. An `Occurrence` - # contains information about a specific analysis instance on a resource. An - # occurrence refers to a `Note`. A note contains details describing the - # analysis and is generally stored in a separate project, called a `Provider`. - # Multiple occurrences can refer to the same note. - # - # For example, an SSL vulnerability could affect multiple images. In this case, - # there would be one note for the vulnerability and an occurrence for each - # image with the vulnerability referring to that note. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = nil - - include Paths - - # @private - attr_reader :grafeas_stub - - ## - # Configure the Grafeas Client class. - # - # See {::Grafeas::V1::Grafeas::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Grafeas clients - # ::Grafeas::V1::Grafeas::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Grafeas", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get 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_occurrence.timeout = 30.0 - default_config.rpcs.get_occurrence.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_occurrences.timeout = 30.0 - default_config.rpcs.list_occurrences.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_occurrence.timeout = 30.0 - default_config.rpcs.delete_occurrence.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_occurrence.timeout = 30.0 - - default_config.rpcs.batch_create_occurrences.timeout = 30.0 - - default_config.rpcs.update_occurrence.timeout = 30.0 - - default_config.rpcs.get_occurrence_note.timeout = 30.0 - default_config.rpcs.get_occurrence_note.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_note.timeout = 30.0 - default_config.rpcs.get_note.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_notes.timeout = 30.0 - default_config.rpcs.list_notes.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_note.timeout = 30.0 - default_config.rpcs.delete_note.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_note.timeout = 30.0 - - default_config.rpcs.batch_create_notes.timeout = 30.0 - - default_config.rpcs.update_note.timeout = 30.0 - - default_config.rpcs.list_note_occurrences.timeout = 30.0 - default_config.rpcs.list_note_occurrences.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Grafeas Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Grafeas::V1::Grafeas::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @grafeas_stub.universe_domain - end - - ## - # Create a new Grafeas client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Grafeas::V1::Grafeas::Client.new - # - # # Create a client using a custom configuration - # client = ::Grafeas::V1::Grafeas::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Grafeas 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 "grafeas/v1/grafeas_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 - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @grafeas_stub = ::Gapic::ServiceStub.new( - ::Grafeas::V1::Grafeas::Stub, - credentials: credentials, - endpoint: @config.endpoint, - 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 - ) - - @grafeas_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 - @grafeas_stub.logger - end - - # Service calls - - ## - # Gets the specified occurrence. - # - # @overload get_occurrence(request, options = nil) - # Pass arguments to `get_occurrence` via a request object, either of type - # {::Grafeas::V1::GetOccurrenceRequest} or an equivalent Hash. - # - # @param request [::Grafeas::V1::GetOccurrenceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_occurrence(name: nil) - # Pass arguments to `get_occurrence` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the occurrence in the form of - # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Grafeas::V1::Occurrence] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Grafeas::V1::Occurrence] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "grafeas/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Grafeas::V1::Grafeas::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Grafeas::V1::GetOccurrenceRequest.new - # - # # Call the get_occurrence method. - # result = client.get_occurrence request - # - # # The returned object is of type Grafeas::V1::Occurrence. - # p result - # - def get_occurrence request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::GetOccurrenceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_occurrence.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Grafeas::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_occurrence.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_occurrence.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @grafeas_stub.call_rpc :get_occurrence, request, 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 occurrences for the specified project. - # - # @overload list_occurrences(request, options = nil) - # Pass arguments to `list_occurrences` via a request object, either of type - # {::Grafeas::V1::ListOccurrencesRequest} or an equivalent Hash. - # - # @param request [::Grafeas::V1::ListOccurrencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_occurrences(parent: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_occurrences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the project to list occurrences for in the form of - # `projects/[PROJECT_ID]`. - # @param filter [::String] - # The filter expression. - # @param page_size [::Integer] - # Number of occurrences to return in the list. Must be positive. Max allowed - # page size is 1000. If not specified, page size defaults to 20. - # @param page_token [::String] - # Token to provide to skip to a particular spot in the list. - # @param return_partial_success [::Boolean] - # If set, the request will return all reachable Occurrences - # and report all unreachable regions in the `unreachable` field in - # the response. - # - # Only applicable for requests in the global region. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Grafeas::V1::Occurrence>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Grafeas::V1::Occurrence>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "grafeas/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Grafeas::V1::Grafeas::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Grafeas::V1::ListOccurrencesRequest.new - # - # # Call the list_occurrences method. - # result = client.list_occurrences request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Grafeas::V1::Occurrence. - # p item - # end - # - def list_occurrences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::ListOccurrencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_occurrences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Grafeas::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_occurrences.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_occurrences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @grafeas_stub.call_rpc :list_occurrences, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @grafeas_stub, :list_occurrences, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified occurrence. For example, use this method to delete an - # occurrence when the occurrence is no longer applicable for the given - # resource. - # - # @overload delete_occurrence(request, options = nil) - # Pass arguments to `delete_occurrence` via a request object, either of type - # {::Grafeas::V1::DeleteOccurrenceRequest} or an equivalent Hash. - # - # @param request [::Grafeas::V1::DeleteOccurrenceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_occurrence(name: nil) - # Pass arguments to `delete_occurrence` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the occurrence in the form of - # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "grafeas/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Grafeas::V1::Grafeas::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Grafeas::V1::DeleteOccurrenceRequest.new - # - # # Call the delete_occurrence method. - # result = client.delete_occurrence request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_occurrence request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::DeleteOccurrenceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_occurrence.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Grafeas::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_occurrence.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_occurrence.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @grafeas_stub.call_rpc :delete_occurrence, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new occurrence. - # - # @overload create_occurrence(request, options = nil) - # Pass arguments to `create_occurrence` via a request object, either of type - # {::Grafeas::V1::CreateOccurrenceRequest} or an equivalent Hash. - # - # @param request [::Grafeas::V1::CreateOccurrenceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_occurrence(parent: nil, occurrence: nil) - # Pass arguments to `create_occurrence` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the project in the form of `projects/[PROJECT_ID]`, under which - # the occurrence is to be created. - # @param occurrence [::Grafeas::V1::Occurrence, ::Hash] - # The occurrence to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Grafeas::V1::Occurrence] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Grafeas::V1::Occurrence] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "grafeas/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Grafeas::V1::Grafeas::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Grafeas::V1::CreateOccurrenceRequest.new - # - # # Call the create_occurrence method. - # result = client.create_occurrence request - # - # # The returned object is of type Grafeas::V1::Occurrence. - # p result - # - def create_occurrence request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::CreateOccurrenceRequest - - # Converts hash and nil to 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_occurrence.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Grafeas::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_occurrence.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_occurrence.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @grafeas_stub.call_rpc :create_occurrence, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates new occurrences in batch. - # - # @overload batch_create_occurrences(request, options = nil) - # Pass arguments to `batch_create_occurrences` via a request object, either of type - # {::Grafeas::V1::BatchCreateOccurrencesRequest} or an equivalent Hash. - # - # @param request [::Grafeas::V1::BatchCreateOccurrencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_occurrences(parent: nil, occurrences: nil) - # Pass arguments to `batch_create_occurrences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the project in the form of `projects/[PROJECT_ID]`, under which - # the occurrences are to be created. - # @param occurrences [::Array<::Grafeas::V1::Occurrence, ::Hash>] - # The occurrences to create. Max allowed length is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Grafeas::V1::BatchCreateOccurrencesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Grafeas::V1::BatchCreateOccurrencesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "grafeas/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Grafeas::V1::Grafeas::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Grafeas::V1::BatchCreateOccurrencesRequest.new - # - # # Call the batch_create_occurrences method. - # result = client.batch_create_occurrences request - # - # # The returned object is of type Grafeas::V1::BatchCreateOccurrencesResponse. - # p result - # - def batch_create_occurrences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::BatchCreateOccurrencesRequest - - # Converts hash and nil to 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_occurrences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Grafeas::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_occurrences.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_create_occurrences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @grafeas_stub.call_rpc :batch_create_occurrences, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified occurrence. - # - # @overload update_occurrence(request, options = nil) - # Pass arguments to `update_occurrence` via a request object, either of type - # {::Grafeas::V1::UpdateOccurrenceRequest} or an equivalent Hash. - # - # @param request [::Grafeas::V1::UpdateOccurrenceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_occurrence(name: nil, occurrence: nil, update_mask: nil) - # Pass arguments to `update_occurrence` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the occurrence in the form of - # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - # @param occurrence [::Grafeas::V1::Occurrence, ::Hash] - # The updated occurrence. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The fields to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Grafeas::V1::Occurrence] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Grafeas::V1::Occurrence] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "grafeas/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Grafeas::V1::Grafeas::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Grafeas::V1::UpdateOccurrenceRequest.new - # - # # Call the update_occurrence method. - # result = client.update_occurrence request - # - # # The returned object is of type Grafeas::V1::Occurrence. - # p result - # - def update_occurrence request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::UpdateOccurrenceRequest - - # Converts hash and nil to 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_occurrence.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Grafeas::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_occurrence.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_occurrence.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @grafeas_stub.call_rpc :update_occurrence, request, 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 note attached to the specified occurrence. Consumer projects can - # use this method to get a note that belongs to a provider project. - # - # @overload get_occurrence_note(request, options = nil) - # Pass arguments to `get_occurrence_note` via a request object, either of type - # {::Grafeas::V1::GetOccurrenceNoteRequest} or an equivalent Hash. - # - # @param request [::Grafeas::V1::GetOccurrenceNoteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_occurrence_note(name: nil) - # Pass arguments to `get_occurrence_note` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the occurrence in the form of - # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Grafeas::V1::Note] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Grafeas::V1::Note] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "grafeas/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Grafeas::V1::Grafeas::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Grafeas::V1::GetOccurrenceNoteRequest.new - # - # # Call the get_occurrence_note method. - # result = client.get_occurrence_note request - # - # # The returned object is of type Grafeas::V1::Note. - # p result - # - def get_occurrence_note request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::GetOccurrenceNoteRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_occurrence_note.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Grafeas::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_occurrence_note.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_occurrence_note.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @grafeas_stub.call_rpc :get_occurrence_note, request, 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 specified note. - # - # @overload get_note(request, options = nil) - # Pass arguments to `get_note` via a request object, either of type - # {::Grafeas::V1::GetNoteRequest} or an equivalent Hash. - # - # @param request [::Grafeas::V1::GetNoteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_note(name: nil) - # Pass arguments to `get_note` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the note in the form of - # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Grafeas::V1::Note] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Grafeas::V1::Note] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "grafeas/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Grafeas::V1::Grafeas::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Grafeas::V1::GetNoteRequest.new - # - # # Call the get_note method. - # result = client.get_note request - # - # # The returned object is of type Grafeas::V1::Note. - # p result - # - def get_note request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::GetNoteRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_note.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Grafeas::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_note.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_note.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @grafeas_stub.call_rpc :get_note, request, 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 notes for the specified project. - # - # @overload list_notes(request, options = nil) - # Pass arguments to `list_notes` via a request object, either of type - # {::Grafeas::V1::ListNotesRequest} or an equivalent Hash. - # - # @param request [::Grafeas::V1::ListNotesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_notes(parent: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_notes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the project to list notes for in the form of - # `projects/[PROJECT_ID]`. - # @param filter [::String] - # The filter expression. - # @param page_size [::Integer] - # Number of notes to return in the list. Must be positive. Max allowed page - # size is 1000. If not specified, page size defaults to 20. - # @param page_token [::String] - # Token to provide to skip to a particular spot in the list. - # @param return_partial_success [::Boolean] - # If set, the request will return all reachable Notes - # and report all unreachable regions in the `unreachable` field in - # the response. - # - # Only applicable for requests in the global region. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Grafeas::V1::Note>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Grafeas::V1::Note>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "grafeas/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Grafeas::V1::Grafeas::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Grafeas::V1::ListNotesRequest.new - # - # # Call the list_notes method. - # result = client.list_notes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Grafeas::V1::Note. - # p item - # end - # - def list_notes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::ListNotesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_notes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Grafeas::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_notes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_notes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @grafeas_stub.call_rpc :list_notes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @grafeas_stub, :list_notes, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified note. - # - # @overload delete_note(request, options = nil) - # Pass arguments to `delete_note` via a request object, either of type - # {::Grafeas::V1::DeleteNoteRequest} or an equivalent Hash. - # - # @param request [::Grafeas::V1::DeleteNoteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_note(name: nil) - # Pass arguments to `delete_note` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the note in the form of - # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "grafeas/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Grafeas::V1::Grafeas::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Grafeas::V1::DeleteNoteRequest.new - # - # # Call the delete_note method. - # result = client.delete_note request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_note request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::DeleteNoteRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_note.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Grafeas::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_note.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_note.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @grafeas_stub.call_rpc :delete_note, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new note. - # - # @overload create_note(request, options = nil) - # Pass arguments to `create_note` via a request object, either of type - # {::Grafeas::V1::CreateNoteRequest} or an equivalent Hash. - # - # @param request [::Grafeas::V1::CreateNoteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_note(parent: nil, note_id: nil, note: nil) - # Pass arguments to `create_note` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the project in the form of `projects/[PROJECT_ID]`, under which - # the note is to be created. - # @param note_id [::String] - # The ID to use for this note. - # @param note [::Grafeas::V1::Note, ::Hash] - # The note to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Grafeas::V1::Note] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Grafeas::V1::Note] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "grafeas/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Grafeas::V1::Grafeas::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Grafeas::V1::CreateNoteRequest.new - # - # # Call the create_note method. - # result = client.create_note request - # - # # The returned object is of type Grafeas::V1::Note. - # p result - # - def create_note request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::CreateNoteRequest - - # Converts hash and nil to 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_note.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Grafeas::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_note.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_note.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @grafeas_stub.call_rpc :create_note, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates new notes in batch. - # - # @overload batch_create_notes(request, options = nil) - # Pass arguments to `batch_create_notes` via a request object, either of type - # {::Grafeas::V1::BatchCreateNotesRequest} or an equivalent Hash. - # - # @param request [::Grafeas::V1::BatchCreateNotesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_notes(parent: nil, notes: nil) - # Pass arguments to `batch_create_notes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The name of the project in the form of `projects/[PROJECT_ID]`, under which - # the notes are to be created. - # @param notes [::Hash{::String => ::Grafeas::V1::Note, ::Hash}] - # The notes to create. Max allowed length is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Grafeas::V1::BatchCreateNotesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Grafeas::V1::BatchCreateNotesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "grafeas/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Grafeas::V1::Grafeas::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Grafeas::V1::BatchCreateNotesRequest.new - # - # # Call the batch_create_notes method. - # result = client.batch_create_notes request - # - # # The returned object is of type Grafeas::V1::BatchCreateNotesResponse. - # p result - # - def batch_create_notes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::BatchCreateNotesRequest - - # Converts hash and nil to 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_notes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Grafeas::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_notes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_create_notes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @grafeas_stub.call_rpc :batch_create_notes, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the specified note. - # - # @overload update_note(request, options = nil) - # Pass arguments to `update_note` via a request object, either of type - # {::Grafeas::V1::UpdateNoteRequest} or an equivalent Hash. - # - # @param request [::Grafeas::V1::UpdateNoteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_note(name: nil, note: nil, update_mask: nil) - # Pass arguments to `update_note` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the note in the form of - # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - # @param note [::Grafeas::V1::Note, ::Hash] - # The updated note. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The fields to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Grafeas::V1::Note] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Grafeas::V1::Note] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "grafeas/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Grafeas::V1::Grafeas::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Grafeas::V1::UpdateNoteRequest.new - # - # # Call the update_note method. - # result = client.update_note request - # - # # The returned object is of type Grafeas::V1::Note. - # p result - # - def update_note request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::UpdateNoteRequest - - # Converts hash and nil to 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_note.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Grafeas::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_note.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_note.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @grafeas_stub.call_rpc :update_note, request, 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 occurrences referencing the specified note. Provider projects can use - # this method to get all occurrences across consumer projects referencing the - # specified note. - # - # @overload list_note_occurrences(request, options = nil) - # Pass arguments to `list_note_occurrences` via a request object, either of type - # {::Grafeas::V1::ListNoteOccurrencesRequest} or an equivalent Hash. - # - # @param request [::Grafeas::V1::ListNoteOccurrencesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_note_occurrences(name: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_note_occurrences` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the note to list occurrences for in the form of - # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - # @param filter [::String] - # The filter expression. - # @param page_size [::Integer] - # Number of occurrences to return in the list. - # @param page_token [::String] - # Token to provide to skip to a particular spot in the list. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Grafeas::V1::Occurrence>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Grafeas::V1::Occurrence>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "grafeas/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Grafeas::V1::Grafeas::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Grafeas::V1::ListNoteOccurrencesRequest.new - # - # # Call the list_note_occurrences method. - # result = client.list_note_occurrences request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Grafeas::V1::Occurrence. - # p item - # end - # - def list_note_occurrences request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Grafeas::V1::ListNoteOccurrencesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_note_occurrences.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Grafeas::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_note_occurrences.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_note_occurrences.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @grafeas_stub.call_rpc :list_note_occurrences, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @grafeas_stub, :list_note_occurrences, request, response, 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 Grafeas API. - # - # This class represents the configuration for Grafeas, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Grafeas::V1::Grafeas::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_occurrence to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Grafeas::V1::Grafeas::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_occurrence.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Grafeas::V1::Grafeas::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_occurrence.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Grafeas::V1::Grafeas::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = nil - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Grafeas API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_occurrence` - # @return [::Gapic::Config::Method] - # - attr_reader :get_occurrence - ## - # RPC-specific configuration for `list_occurrences` - # @return [::Gapic::Config::Method] - # - attr_reader :list_occurrences - ## - # RPC-specific configuration for `delete_occurrence` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_occurrence - ## - # RPC-specific configuration for `create_occurrence` - # @return [::Gapic::Config::Method] - # - attr_reader :create_occurrence - ## - # RPC-specific configuration for `batch_create_occurrences` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_occurrences - ## - # RPC-specific configuration for `update_occurrence` - # @return [::Gapic::Config::Method] - # - attr_reader :update_occurrence - ## - # RPC-specific configuration for `get_occurrence_note` - # @return [::Gapic::Config::Method] - # - attr_reader :get_occurrence_note - ## - # RPC-specific configuration for `get_note` - # @return [::Gapic::Config::Method] - # - attr_reader :get_note - ## - # RPC-specific configuration for `list_notes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_notes - ## - # RPC-specific configuration for `delete_note` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_note - ## - # RPC-specific configuration for `create_note` - # @return [::Gapic::Config::Method] - # - attr_reader :create_note - ## - # RPC-specific configuration for `batch_create_notes` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_notes - ## - # RPC-specific configuration for `update_note` - # @return [::Gapic::Config::Method] - # - attr_reader :update_note - ## - # RPC-specific configuration for `list_note_occurrences` - # @return [::Gapic::Config::Method] - # - attr_reader :list_note_occurrences - - # @private - def initialize parent_rpcs = nil - get_occurrence_config = parent_rpcs.get_occurrence if parent_rpcs.respond_to? :get_occurrence - @get_occurrence = ::Gapic::Config::Method.new get_occurrence_config - list_occurrences_config = parent_rpcs.list_occurrences if parent_rpcs.respond_to? :list_occurrences - @list_occurrences = ::Gapic::Config::Method.new list_occurrences_config - delete_occurrence_config = parent_rpcs.delete_occurrence if parent_rpcs.respond_to? :delete_occurrence - @delete_occurrence = ::Gapic::Config::Method.new delete_occurrence_config - create_occurrence_config = parent_rpcs.create_occurrence if parent_rpcs.respond_to? :create_occurrence - @create_occurrence = ::Gapic::Config::Method.new create_occurrence_config - batch_create_occurrences_config = parent_rpcs.batch_create_occurrences if parent_rpcs.respond_to? :batch_create_occurrences - @batch_create_occurrences = ::Gapic::Config::Method.new batch_create_occurrences_config - update_occurrence_config = parent_rpcs.update_occurrence if parent_rpcs.respond_to? :update_occurrence - @update_occurrence = ::Gapic::Config::Method.new update_occurrence_config - get_occurrence_note_config = parent_rpcs.get_occurrence_note if parent_rpcs.respond_to? :get_occurrence_note - @get_occurrence_note = ::Gapic::Config::Method.new get_occurrence_note_config - get_note_config = parent_rpcs.get_note if parent_rpcs.respond_to? :get_note - @get_note = ::Gapic::Config::Method.new get_note_config - list_notes_config = parent_rpcs.list_notes if parent_rpcs.respond_to? :list_notes - @list_notes = ::Gapic::Config::Method.new list_notes_config - delete_note_config = parent_rpcs.delete_note if parent_rpcs.respond_to? :delete_note - @delete_note = ::Gapic::Config::Method.new delete_note_config - create_note_config = parent_rpcs.create_note if parent_rpcs.respond_to? :create_note - @create_note = ::Gapic::Config::Method.new create_note_config - batch_create_notes_config = parent_rpcs.batch_create_notes if parent_rpcs.respond_to? :batch_create_notes - @batch_create_notes = ::Gapic::Config::Method.new batch_create_notes_config - update_note_config = parent_rpcs.update_note if parent_rpcs.respond_to? :update_note - @update_note = ::Gapic::Config::Method.new update_note_config - list_note_occurrences_config = parent_rpcs.list_note_occurrences if parent_rpcs.respond_to? :list_note_occurrences - @list_note_occurrences = ::Gapic::Config::Method.new list_note_occurrences_config - - yield self if block_given? - end - end - end - end - end - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas/paths.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas/paths.rb deleted file mode 100644 index 60475490d391..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas/paths.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 Grafeas - module V1 - module Grafeas - # Path helper methods for the Grafeas API. - module Paths - ## - # Create a fully-qualified Note resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/notes/{note}` - # - # @param project [String] - # @param note [String] - # - # @return [::String] - def note_path project:, note: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/notes/#{note}" - end - - ## - # Create a fully-qualified Occurrence resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/occurrences/{occurrence}` - # - # @param project [String] - # @param occurrence [String] - # - # @return [::String] - def occurrence_path project:, occurrence: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/occurrences/#{occurrence}" - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - extend self - end - end - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas_pb.rb deleted file mode 100644 index f098a03d4b09..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas_pb.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/grafeas.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 'grafeas/v1/attestation_pb' -require 'grafeas/v1/build_pb' -require 'grafeas/v1/common_pb' -require 'grafeas/v1/compliance_pb' -require 'grafeas/v1/deployment_pb' -require 'grafeas/v1/discovery_pb' -require 'grafeas/v1/dsse_attestation_pb' -require 'grafeas/v1/image_pb' -require 'grafeas/v1/package_pb' -require 'grafeas/v1/sbom_pb' -require 'grafeas/v1/secret_pb' -require 'grafeas/v1/upgrade_pb' -require 'grafeas/v1/vex_pb' -require 'grafeas/v1/vulnerability_pb' - - -descriptor_data = "\n\x18grafeas/v1/grafeas.proto\x12\ngrafeas.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\x1cgrafeas/v1/attestation.proto\x1a\x16grafeas/v1/build.proto\x1a\x17grafeas/v1/common.proto\x1a\x1bgrafeas/v1/compliance.proto\x1a\x1bgrafeas/v1/deployment.proto\x1a\x1agrafeas/v1/discovery.proto\x1a!grafeas/v1/dsse_attestation.proto\x1a\x16grafeas/v1/image.proto\x1a\x18grafeas/v1/package.proto\x1a\x15grafeas/v1/sbom.proto\x1a\x17grafeas/v1/secret.proto\x1a\x18grafeas/v1/upgrade.proto\x1a\x14grafeas/v1/vex.proto\x1a\x1egrafeas/v1/vulnerability.proto\"\xea\x07\n\nOccurrence\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cresource_uri\x18\x02 \x01(\t\x12\x11\n\tnote_name\x18\x03 \x01(\t\x12\"\n\x04kind\x18\x04 \x01(\x0e\x32\x14.grafeas.v1.NoteKind\x12\x13\n\x0bremediation\x18\x05 \x01(\t\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\rvulnerability\x18\x08 \x01(\x0b\x32#.grafeas.v1.VulnerabilityOccurrenceH\x00\x12,\n\x05\x62uild\x18\t \x01(\x0b\x32\x1b.grafeas.v1.BuildOccurrenceH\x00\x12,\n\x05image\x18\n \x01(\x0b\x32\x1b.grafeas.v1.ImageOccurrenceH\x00\x12\x30\n\x07package\x18\x0b \x01(\x0b\x32\x1d.grafeas.v1.PackageOccurrenceH\x00\x12\x36\n\ndeployment\x18\x0c \x01(\x0b\x32 .grafeas.v1.DeploymentOccurrenceH\x00\x12\x34\n\tdiscovery\x18\r \x01(\x0b\x32\x1f.grafeas.v1.DiscoveryOccurrenceH\x00\x12\x38\n\x0b\x61ttestation\x18\x0e \x01(\x0b\x32!.grafeas.v1.AttestationOccurrenceH\x00\x12\x30\n\x07upgrade\x18\x0f \x01(\x0b\x32\x1d.grafeas.v1.UpgradeOccurrenceH\x00\x12\x36\n\ncompliance\x18\x10 \x01(\x0b\x32 .grafeas.v1.ComplianceOccurrenceH\x00\x12\x41\n\x10\x64sse_attestation\x18\x11 \x01(\x0b\x32%.grafeas.v1.DSSEAttestationOccurrenceH\x00\x12=\n\x0esbom_reference\x18\x13 \x01(\x0b\x32#.grafeas.v1.SBOMReferenceOccurrenceH\x00\x12.\n\x06secret\x18\x14 \x01(\x0b\x32\x1c.grafeas.v1.SecretOccurrenceH\x00\x12&\n\x08\x65nvelope\x18\x12 \x01(\x0b\x32\x14.grafeas.v1.Envelope:G\xea\x41\x44\n\x15grafeas.io/Occurrence\x12+projects/{project}/occurrences/{occurrence}B\t\n\x07\x64\x65tails\"\xa1\x08\n\x04Note\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x11short_description\x18\x02 \x01(\t\x12\x18\n\x10long_description\x18\x03 \x01(\t\x12\"\n\x04kind\x18\x04 \x01(\x0e\x32\x14.grafeas.v1.NoteKind\x12+\n\x0brelated_url\x18\x05 \x03(\x0b\x32\x16.grafeas.v1.RelatedUrl\x12\x33\n\x0f\x65xpiration_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12related_note_names\x18\t \x03(\t\x12\x36\n\rvulnerability\x18\n \x01(\x0b\x32\x1d.grafeas.v1.VulnerabilityNoteH\x00\x12&\n\x05\x62uild\x18\x0b \x01(\x0b\x32\x15.grafeas.v1.BuildNoteH\x00\x12&\n\x05image\x18\x0c \x01(\x0b\x32\x15.grafeas.v1.ImageNoteH\x00\x12*\n\x07package\x18\r \x01(\x0b\x32\x17.grafeas.v1.PackageNoteH\x00\x12\x30\n\ndeployment\x18\x0e \x01(\x0b\x32\x1a.grafeas.v1.DeploymentNoteH\x00\x12.\n\tdiscovery\x18\x0f \x01(\x0b\x32\x19.grafeas.v1.DiscoveryNoteH\x00\x12\x32\n\x0b\x61ttestation\x18\x10 \x01(\x0b\x32\x1b.grafeas.v1.AttestationNoteH\x00\x12*\n\x07upgrade\x18\x11 \x01(\x0b\x32\x17.grafeas.v1.UpgradeNoteH\x00\x12\x30\n\ncompliance\x18\x12 \x01(\x0b\x32\x1a.grafeas.v1.ComplianceNoteH\x00\x12;\n\x10\x64sse_attestation\x18\x13 \x01(\x0b\x32\x1f.grafeas.v1.DSSEAttestationNoteH\x00\x12K\n\x18vulnerability_assessment\x18\x14 \x01(\x0b\x32\'.grafeas.v1.VulnerabilityAssessmentNoteH\x00\x12\x37\n\x0esbom_reference\x18\x15 \x01(\x0b\x32\x1d.grafeas.v1.SBOMReferenceNoteH\x00\x12(\n\x06secret\x18\x16 \x01(\x0b\x32\x16.grafeas.v1.SecretNoteH\x00:5\xea\x41\x32\n\x0fgrafeas.io/Note\x12\x1fprojects/{project}/notes/{note}B\x06\n\x04type\"C\n\x14GetOccurrenceRequest\x12+\n\x04name\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15grafeas.io/Occurrence\"\x9b\x01\n\x16ListOccurrencesRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x1e\n\x16return_partial_success\x18\x05 \x01(\x08\"y\n\x17ListOccurrencesResponse\x12+\n\x0boccurrences\x18\x01 \x03(\x0b\x32\x16.grafeas.v1.Occurrence\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"F\n\x17\x44\x65leteOccurrenceRequest\x12+\n\x04name\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15grafeas.io/Occurrence\"v\n\x17\x43reateOccurrenceRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12/\n\noccurrence\x18\x02 \x01(\x0b\x32\x16.grafeas.v1.OccurrenceB\x03\xe0\x41\x02\"\xa8\x01\n\x17UpdateOccurrenceRequest\x12+\n\x04name\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15grafeas.io/Occurrence\x12/\n\noccurrence\x18\x02 \x01(\x0b\x32\x16.grafeas.v1.OccurrenceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"7\n\x0eGetNoteRequest\x12%\n\x04name\x18\x01 \x01(\tB\x17\xe0\x41\x02\xfa\x41\x11\n\x0fgrafeas.io/Note\"G\n\x18GetOccurrenceNoteRequest\x12+\n\x04name\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15grafeas.io/Occurrence\"\x95\x01\n\x10ListNotesRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x1e\n\x16return_partial_success\x18\x05 \x01(\x08\"g\n\x11ListNotesResponse\x12\x1f\n\x05notes\x18\x01 \x03(\x0b\x32\x10.grafeas.v1.Note\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\":\n\x11\x44\x65leteNoteRequest\x12%\n\x04name\x18\x01 \x01(\tB\x17\xe0\x41\x02\xfa\x41\x11\n\x0fgrafeas.io/Note\"z\n\x11\x43reateNoteRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12\x14\n\x07note_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12#\n\x04note\x18\x03 \x01(\x0b\x32\x10.grafeas.v1.NoteB\x03\xe0\x41\x02\"\x90\x01\n\x11UpdateNoteRequest\x12%\n\x04name\x18\x01 \x01(\tB\x17\xe0\x41\x02\xfa\x41\x11\n\x0fgrafeas.io/Note\x12#\n\x04note\x18\x02 \x01(\x0b\x32\x10.grafeas.v1.NoteB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"z\n\x1aListNoteOccurrencesRequest\x12%\n\x04name\x18\x01 \x01(\tB\x17\xe0\x41\x02\xfa\x41\x11\n\x0fgrafeas.io/Note\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"c\n\x1bListNoteOccurrencesResponse\x12+\n\x0boccurrences\x18\x01 \x03(\x0b\x32\x16.grafeas.v1.Occurrence\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc9\x01\n\x17\x42\x61tchCreateNotesRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12\x42\n\x05notes\x18\x02 \x03(\x0b\x32..grafeas.v1.BatchCreateNotesRequest.NotesEntryB\x03\xe0\x41\x02\x1a>\n\nNotesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1f\n\x05value\x18\x02 \x01(\x0b\x32\x10.grafeas.v1.Note:\x02\x38\x01\";\n\x18\x42\x61tchCreateNotesResponse\x12\x1f\n\x05notes\x18\x01 \x03(\x0b\x32\x10.grafeas.v1.Note\"}\n\x1d\x42\x61tchCreateOccurrencesRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12grafeas.io/Project\x12\x30\n\x0boccurrences\x18\x02 \x03(\x0b\x32\x16.grafeas.v1.OccurrenceB\x03\xe0\x41\x02\"M\n\x1e\x42\x61tchCreateOccurrencesResponse\x12+\n\x0boccurrences\x18\x01 \x03(\x0b\x32\x16.grafeas.v1.Occurrence2\x8d\x16\n\x07Grafeas\x12\xb0\x01\n\rGetOccurrence\x12 .grafeas.v1.GetOccurrenceRequest\x1a\x16.grafeas.v1.Occurrence\"e\xda\x41\x04name\x82\xd3\xe4\x93\x02X\x12#/v1/{name=projects/*/occurrences/*}Z1\x12//v1/{name=projects/*/locations/*/occurrences/*}\x12\xca\x01\n\x0fListOccurrences\x12\".grafeas.v1.ListOccurrencesRequest\x1a#.grafeas.v1.ListOccurrencesResponse\"n\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02X\x12#/v1/{parent=projects/*}/occurrencesZ1\x12//v1/{parent=projects/*/locations/*}/occurrences\x12\xb6\x01\n\x10\x44\x65leteOccurrence\x12#.grafeas.v1.DeleteOccurrenceRequest\x1a\x16.google.protobuf.Empty\"e\xda\x41\x04name\x82\xd3\xe4\x93\x02X*#/v1/{name=projects/*/occurrences/*}Z1*//v1/{name=projects/*/locations/*/occurrences/*}\x12\xdc\x01\n\x10\x43reateOccurrence\x12#.grafeas.v1.CreateOccurrenceRequest\x1a\x16.grafeas.v1.Occurrence\"\x8a\x01\xda\x41\x11parent,occurrence\x82\xd3\xe4\x93\x02p\"#/v1/{parent=projects/*}/occurrences:\noccurrenceZ=\"//v1/{parent=projects/*/locations/*}/occurrences:\noccurrence\x12\x83\x02\n\x16\x42\x61tchCreateOccurrences\x12).grafeas.v1.BatchCreateOccurrencesRequest\x1a*.grafeas.v1.BatchCreateOccurrencesResponse\"\x91\x01\xda\x41\x12parent,occurrences\x82\xd3\xe4\x93\x02v\"//v1/{parent=projects/*}/occurrences:batchCreate:\x01*Z@\";/v1/{parent=projects/*/locations/*}/occurrences:batchCreate:\x01*\x12\xe6\x01\n\x10UpdateOccurrence\x12#.grafeas.v1.UpdateOccurrenceRequest\x1a\x16.grafeas.v1.Occurrence\"\x94\x01\xda\x41\x1bname,occurrence,update_mask\x82\xd3\xe4\x93\x02p2#/v1/{name=projects/*/occurrences/*}:\noccurrenceZ=2//v1/{name=projects/*/locations/*/occurrences/*}:\noccurrence\x12\xbe\x01\n\x11GetOccurrenceNote\x12$.grafeas.v1.GetOccurrenceNoteRequest\x1a\x10.grafeas.v1.Note\"q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x64\x12)/v1/{name=projects/*/occurrences/*}/notesZ7\x12\x35/v1/{name=projects/*/locations/*/occurrences/*}/notes\x12\x92\x01\n\x07GetNote\x12\x1a.grafeas.v1.GetNoteRequest\x1a\x10.grafeas.v1.Note\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L\x12\x1d/v1/{name=projects/*/notes/*}Z+\x12)/v1/{name=projects/*/locations/*/notes/*}\x12\xac\x01\n\tListNotes\x12\x1c.grafeas.v1.ListNotesRequest\x1a\x1d.grafeas.v1.ListNotesResponse\"b\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02L\x12\x1d/v1/{parent=projects/*}/notesZ+\x12)/v1/{parent=projects/*/locations/*}/notes\x12\x9e\x01\n\nDeleteNote\x12\x1d.grafeas.v1.DeleteNoteRequest\x1a\x16.google.protobuf.Empty\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L*\x1d/v1/{name=projects/*/notes/*}Z+*)/v1/{name=projects/*/locations/*/notes/*}\x12\xb3\x01\n\nCreateNote\x12\x1d.grafeas.v1.CreateNoteRequest\x1a\x10.grafeas.v1.Note\"t\xda\x41\x13parent,note_id,note\x82\xd3\xe4\x93\x02X\"\x1d/v1/{parent=projects/*}/notes:\x04noteZ1\")/v1/{parent=projects/*/locations/*}/notes:\x04note\x12\xde\x01\n\x10\x42\x61tchCreateNotes\x12#.grafeas.v1.BatchCreateNotesRequest\x1a$.grafeas.v1.BatchCreateNotesResponse\"\x7f\xda\x41\x0cparent,notes\x82\xd3\xe4\x93\x02j\")/v1/{parent=projects/*}/notes:batchCreate:\x01*Z:\"5/v1/{parent=projects/*/locations/*}/notes:batchCreate:\x01*\x12\xb5\x01\n\nUpdateNote\x12\x1d.grafeas.v1.UpdateNoteRequest\x1a\x10.grafeas.v1.Note\"v\xda\x41\x15name,note,update_mask\x82\xd3\xe4\x93\x02X2\x1d/v1/{name=projects/*/notes/*}:\x04noteZ12)/v1/{name=projects/*/locations/*/notes/*}:\x04note\x12\xe0\x01\n\x13ListNoteOccurrences\x12&.grafeas.v1.ListNoteOccurrencesRequest\x1a\'.grafeas.v1.ListNoteOccurrencesResponse\"x\xda\x41\x0bname,filter\x82\xd3\xe4\x93\x02\x64\x12)/v1/{name=projects/*/notes/*}/occurrencesZ7\x12\x35/v1/{name=projects/*/locations/*/notes/*}/occurrences\x1a#\xca\x41 containeranalysis.googleapis.comB|\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRA\xea\x41(\n\x12grafeas.io/Project\x12\x12projects/{project}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - Occurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Occurrence").msgclass - Note = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Note").msgclass - GetOccurrenceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.GetOccurrenceRequest").msgclass - ListOccurrencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ListOccurrencesRequest").msgclass - ListOccurrencesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ListOccurrencesResponse").msgclass - DeleteOccurrenceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DeleteOccurrenceRequest").msgclass - CreateOccurrenceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CreateOccurrenceRequest").msgclass - UpdateOccurrenceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.UpdateOccurrenceRequest").msgclass - GetNoteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.GetNoteRequest").msgclass - GetOccurrenceNoteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.GetOccurrenceNoteRequest").msgclass - ListNotesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ListNotesRequest").msgclass - ListNotesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ListNotesResponse").msgclass - DeleteNoteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.DeleteNoteRequest").msgclass - CreateNoteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CreateNoteRequest").msgclass - UpdateNoteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.UpdateNoteRequest").msgclass - ListNoteOccurrencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ListNoteOccurrencesRequest").msgclass - ListNoteOccurrencesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ListNoteOccurrencesResponse").msgclass - BatchCreateNotesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.BatchCreateNotesRequest").msgclass - BatchCreateNotesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.BatchCreateNotesResponse").msgclass - BatchCreateOccurrencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.BatchCreateOccurrencesRequest").msgclass - BatchCreateOccurrencesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.BatchCreateOccurrencesResponse").msgclass - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas_services_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas_services_pb.rb deleted file mode 100644 index aeed0fe3020b..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas_services_pb.rb +++ /dev/null @@ -1,85 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: grafeas/v1/grafeas.proto for package 'grafeas.v1' -# Original file comments: -# Copyright 2019 The Grafeas Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 'grafeas/v1/grafeas_pb' - -module Grafeas - module V1 - module Grafeas - # [Grafeas](https://grafeas.io) API. - # - # Retrieves analysis results of Cloud components such as Docker container - # images. - # - # Analysis results are stored as a series of occurrences. An `Occurrence` - # contains information about a specific analysis instance on a resource. An - # occurrence refers to a `Note`. A note contains details describing the - # analysis and is generally stored in a separate project, called a `Provider`. - # Multiple occurrences can refer to the same note. - # - # For example, an SSL vulnerability could affect multiple images. In this case, - # there would be one note for the vulnerability and an occurrence for each - # image with the vulnerability referring to that note. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'grafeas.v1.Grafeas' - - # Gets the specified occurrence. - rpc :GetOccurrence, ::Grafeas::V1::GetOccurrenceRequest, ::Grafeas::V1::Occurrence - # Lists occurrences for the specified project. - rpc :ListOccurrences, ::Grafeas::V1::ListOccurrencesRequest, ::Grafeas::V1::ListOccurrencesResponse - # Deletes the specified occurrence. For example, use this method to delete an - # occurrence when the occurrence is no longer applicable for the given - # resource. - rpc :DeleteOccurrence, ::Grafeas::V1::DeleteOccurrenceRequest, ::Google::Protobuf::Empty - # Creates a new occurrence. - rpc :CreateOccurrence, ::Grafeas::V1::CreateOccurrenceRequest, ::Grafeas::V1::Occurrence - # Creates new occurrences in batch. - rpc :BatchCreateOccurrences, ::Grafeas::V1::BatchCreateOccurrencesRequest, ::Grafeas::V1::BatchCreateOccurrencesResponse - # Updates the specified occurrence. - rpc :UpdateOccurrence, ::Grafeas::V1::UpdateOccurrenceRequest, ::Grafeas::V1::Occurrence - # Gets the note attached to the specified occurrence. Consumer projects can - # use this method to get a note that belongs to a provider project. - rpc :GetOccurrenceNote, ::Grafeas::V1::GetOccurrenceNoteRequest, ::Grafeas::V1::Note - # Gets the specified note. - rpc :GetNote, ::Grafeas::V1::GetNoteRequest, ::Grafeas::V1::Note - # Lists notes for the specified project. - rpc :ListNotes, ::Grafeas::V1::ListNotesRequest, ::Grafeas::V1::ListNotesResponse - # Deletes the specified note. - rpc :DeleteNote, ::Grafeas::V1::DeleteNoteRequest, ::Google::Protobuf::Empty - # Creates a new note. - rpc :CreateNote, ::Grafeas::V1::CreateNoteRequest, ::Grafeas::V1::Note - # Creates new notes in batch. - rpc :BatchCreateNotes, ::Grafeas::V1::BatchCreateNotesRequest, ::Grafeas::V1::BatchCreateNotesResponse - # Updates the specified note. - rpc :UpdateNote, ::Grafeas::V1::UpdateNoteRequest, ::Grafeas::V1::Note - # Lists occurrences referencing the specified note. Provider projects can use - # this method to get all occurrences across consumer projects referencing the - # specified note. - rpc :ListNoteOccurrences, ::Grafeas::V1::ListNoteOccurrencesRequest, ::Grafeas::V1::ListNoteOccurrencesResponse - end - - Stub = Service.rpc_stub_class - end - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/image_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/image_pb.rb deleted file mode 100644 index 3737d2c9f5a9..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/image_pb.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/image.proto - -require 'google/protobuf' - - -descriptor_data = "\n\x16grafeas/v1/image.proto\x12\ngrafeas.v1\"-\n\x05Layer\x12\x11\n\tdirective\x18\x01 \x01(\t\x12\x11\n\targuments\x18\x02 \x01(\t\"@\n\x0b\x46ingerprint\x12\x0f\n\x07v1_name\x18\x01 \x01(\t\x12\x0f\n\x07v2_blob\x18\x02 \x03(\t\x12\x0f\n\x07v2_name\x18\x03 \x01(\t\"O\n\tImageNote\x12\x14\n\x0cresource_url\x18\x01 \x01(\t\x12,\n\x0b\x66ingerprint\x18\x02 \x01(\x0b\x32\x17.grafeas.v1.Fingerprint\"\x93\x01\n\x0fImageOccurrence\x12,\n\x0b\x66ingerprint\x18\x01 \x01(\x0b\x32\x17.grafeas.v1.Fingerprint\x12\x10\n\x08\x64istance\x18\x02 \x01(\x05\x12%\n\nlayer_info\x18\x03 \x03(\x0b\x32\x11.grafeas.v1.Layer\x12\x19\n\x11\x62\x61se_resource_url\x18\x04 \x01(\tBQ\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - Layer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Layer").msgclass - Fingerprint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Fingerprint").msgclass - ImageNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ImageNote").msgclass - ImageOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ImageOccurrence").msgclass - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/intoto_provenance_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/intoto_provenance_pb.rb deleted file mode 100644 index f8c2e16c13ed..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/intoto_provenance_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/intoto_provenance.proto - -require 'google/protobuf' - -require 'google/protobuf/any_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\"grafeas/v1/intoto_provenance.proto\x12\ngrafeas.v1\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9c\x01\n\x06Recipe\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x1b\n\x13\x64\x65\x66ined_in_material\x18\x02 \x01(\x03\x12\x13\n\x0b\x65ntry_point\x18\x03 \x01(\t\x12\'\n\targuments\x18\x04 \x03(\x0b\x32\x14.google.protobuf.Any\x12)\n\x0b\x65nvironment\x18\x05 \x03(\x0b\x32\x14.google.protobuf.Any\"I\n\x0c\x43ompleteness\x12\x11\n\targuments\x18\x01 \x01(\x08\x12\x13\n\x0b\x65nvironment\x18\x02 \x01(\x08\x12\x11\n\tmaterials\x18\x03 \x01(\x08\"\xda\x01\n\x08Metadata\x12\x1b\n\x13\x62uild_invocation_id\x18\x01 \x01(\t\x12\x34\n\x10\x62uild_started_on\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11\x62uild_finished_on\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\x0c\x63ompleteness\x18\x04 \x01(\x0b\x32\x18.grafeas.v1.Completeness\x12\x14\n\x0creproducible\x18\x05 \x01(\x08\"\x1b\n\rBuilderConfig\x12\n\n\x02id\x18\x01 \x01(\t\"\xa4\x01\n\x10InTotoProvenance\x12\x31\n\x0e\x62uilder_config\x18\x01 \x01(\x0b\x32\x19.grafeas.v1.BuilderConfig\x12\"\n\x06recipe\x18\x02 \x01(\x0b\x32\x12.grafeas.v1.Recipe\x12&\n\x08metadata\x18\x03 \x01(\x0b\x32\x14.grafeas.v1.Metadata\x12\x11\n\tmaterials\x18\x04 \x03(\tBh\n\rio.grafeas.v1B\x15InTotoProvenanceProtoP\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - Recipe = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Recipe").msgclass - Completeness = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Completeness").msgclass - Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Metadata").msgclass - BuilderConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.BuilderConfig").msgclass - InTotoProvenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.InTotoProvenance").msgclass - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/intoto_statement_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/intoto_statement_pb.rb deleted file mode 100644 index 57e0f9e659a1..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/intoto_statement_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/intoto_statement.proto - -require 'google/protobuf' - -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' -require 'grafeas/v1/intoto_provenance_pb' -require 'grafeas/v1/slsa_provenance_pb' -require 'grafeas/v1/slsa_provenance_zero_two_pb' - - -descriptor_data = "\n!grafeas/v1/intoto_statement.proto\x12\ngrafeas.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\"grafeas/v1/intoto_provenance.proto\x1a grafeas/v1/slsa_provenance.proto\x1a)grafeas/v1/slsa_provenance_zero_two.proto\"\xa3\x02\n\x0fInTotoStatement\x12\x13\n\x04type\x18\x01 \x01(\tR\x05_type\x12$\n\x07subject\x18\x02 \x03(\x0b\x32\x13.grafeas.v1.Subject\x12\x16\n\x0epredicate_type\x18\x03 \x01(\t\x12\x32\n\nprovenance\x18\x04 \x01(\x0b\x32\x1c.grafeas.v1.InTotoProvenanceH\x00\x12\x35\n\x0fslsa_provenance\x18\x05 \x01(\x0b\x32\x1a.grafeas.v1.SlsaProvenanceH\x00\x12\x45\n\x18slsa_provenance_zero_two\x18\x06 \x01(\x0b\x32!.grafeas.v1.SlsaProvenanceZeroTwoH\x00\x42\x0b\n\tpredicate\"w\n\x07Subject\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x06\x64igest\x18\x02 \x03(\x0b\x32\x1f.grafeas.v1.Subject.DigestEntry\x1a-\n\x0b\x44igestEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xcb\x0c\n\x16InTotoSlsaProvenanceV1\x12\x13\n\x04type\x18\x01 \x01(\tR\x05_type\x12$\n\x07subject\x18\x02 \x03(\x0b\x32\x13.grafeas.v1.Subject\x12\x16\n\x0epredicate_type\x18\x03 \x01(\t\x12\x46\n\tpredicate\x18\x04 \x01(\x0b\x32\x33.grafeas.v1.InTotoSlsaProvenanceV1.SlsaProvenanceV1\x1a\xa4\x01\n\x10SlsaProvenanceV1\x12L\n\x10\x62uild_definition\x18\x01 \x01(\x0b\x32\x32.grafeas.v1.InTotoSlsaProvenanceV1.BuildDefinition\x12\x42\n\x0brun_details\x18\x02 \x01(\x0b\x32-.grafeas.v1.InTotoSlsaProvenanceV1.RunDetails\x1a\xe7\x01\n\x0f\x42uildDefinition\x12\x12\n\nbuild_type\x18\x01 \x01(\t\x12\x34\n\x13\x65xternal_parameters\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x34\n\x13internal_parameters\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12T\n\x15resolved_dependencies\x18\x04 \x03(\x0b\x32\x35.grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor\x1a\x9a\x03\n\x12ResourceDescriptor\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12Q\n\x06\x64igest\x18\x03 \x03(\x0b\x32\x41.grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor.DigestEntry\x12\x0f\n\x07\x63ontent\x18\x04 \x01(\x0c\x12\x19\n\x11\x64ownload_location\x18\x05 \x01(\t\x12\x12\n\nmedia_type\x18\x06 \x01(\t\x12[\n\x0b\x61nnotations\x18\x07 \x03(\x0b\x32\x46.grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor.AnnotationsEntry\x1a-\n\x0b\x44igestEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aJ\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\xe2\x01\n\nRunDetails\x12\x45\n\x07\x62uilder\x18\x01 \x01(\x0b\x32\x34.grafeas.v1.InTotoSlsaProvenanceV1.ProvenanceBuilder\x12\x42\n\x08metadata\x18\x02 \x01(\x0b\x32\x30.grafeas.v1.InTotoSlsaProvenanceV1.BuildMetadata\x12I\n\nbyproducts\x18\x03 \x03(\x0b\x32\x35.grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor\x1a\xf8\x01\n\x11ProvenanceBuilder\x12\n\n\x02id\x18\x01 \x01(\t\x12R\n\x07version\x18\x02 \x03(\x0b\x32\x41.grafeas.v1.InTotoSlsaProvenanceV1.ProvenanceBuilder.VersionEntry\x12S\n\x14\x62uilder_dependencies\x18\x03 \x03(\x0b\x32\x35.grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor\x1a.\n\x0cVersionEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x87\x01\n\rBuildMetadata\x12\x15\n\rinvocation_id\x18\x01 \x01(\t\x12.\n\nstarted_on\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inished_on\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampBg\n\rio.grafeas.v1B\x14InTotoStatementProtoP\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - InTotoStatement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.InTotoStatement").msgclass - Subject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Subject").msgclass - InTotoSlsaProvenanceV1 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.InTotoSlsaProvenanceV1").msgclass - InTotoSlsaProvenanceV1::SlsaProvenanceV1 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.InTotoSlsaProvenanceV1.SlsaProvenanceV1").msgclass - InTotoSlsaProvenanceV1::BuildDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.InTotoSlsaProvenanceV1.BuildDefinition").msgclass - InTotoSlsaProvenanceV1::ResourceDescriptor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.InTotoSlsaProvenanceV1.ResourceDescriptor").msgclass - InTotoSlsaProvenanceV1::RunDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.InTotoSlsaProvenanceV1.RunDetails").msgclass - InTotoSlsaProvenanceV1::ProvenanceBuilder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.InTotoSlsaProvenanceV1.ProvenanceBuilder").msgclass - InTotoSlsaProvenanceV1::BuildMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.InTotoSlsaProvenanceV1.BuildMetadata").msgclass - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/package_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/package_pb.rb deleted file mode 100644 index 9f9c62800477..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/package_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/package.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'grafeas/v1/common_pb' - - -descriptor_data = "\n\x18grafeas/v1/package.proto\x12\ngrafeas.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17grafeas/v1/common.proto\"\xb7\x01\n\x0c\x44istribution\x12\x14\n\x07\x63pe_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12.\n\x0c\x61rchitecture\x18\x02 \x01(\x0e\x32\x18.grafeas.v1.Architecture\x12+\n\x0elatest_version\x18\x03 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x12\n\nmaintainer\x18\x04 \x01(\t\x12\x0b\n\x03url\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\"O\n\x08Location\x12\x0f\n\x07\x63pe_uri\x18\x01 \x01(\t\x12$\n\x07version\x18\x02 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x0c\n\x04path\x18\x03 \x01(\t\"\xd0\x02\n\x0bPackageNote\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12.\n\x0c\x64istribution\x18\n \x03(\x0b\x32\x18.grafeas.v1.Distribution\x12\x14\n\x0cpackage_type\x18\x0b \x01(\t\x12\x0f\n\x07\x63pe_uri\x18\x0c \x01(\t\x12.\n\x0c\x61rchitecture\x18\r \x01(\x0e\x32\x18.grafeas.v1.Architecture\x12$\n\x07version\x18\x0e \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x12\n\nmaintainer\x18\x0f \x01(\t\x12\x0b\n\x03url\x18\x10 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x11 \x01(\t\x12$\n\x07license\x18\x12 \x01(\x0b\x32\x13.grafeas.v1.License\x12\"\n\x06\x64igest\x18\x13 \x03(\x0b\x32\x12.grafeas.v1.Digest\"\x88\x02\n\x11PackageOccurrence\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x03\x12&\n\x08location\x18\x02 \x03(\x0b\x32\x14.grafeas.v1.Location\x12\x19\n\x0cpackage_type\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x63pe_uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\x0c\x61rchitecture\x18\x05 \x01(\x0e\x32\x18.grafeas.v1.ArchitectureB\x03\xe0\x41\x03\x12$\n\x07license\x18\x06 \x01(\x0b\x32\x13.grafeas.v1.License\x12)\n\x07version\x18\x07 \x01(\x0b\x32\x13.grafeas.v1.VersionB\x03\xe0\x41\x03\"\xe0\x01\n\x07Version\x12\r\n\x05\x65poch\x18\x01 \x01(\x05\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08revision\x18\x03 \x01(\t\x12\x11\n\tinclusive\x18\x06 \x01(\x08\x12-\n\x04kind\x18\x04 \x01(\x0e\x32\x1f.grafeas.v1.Version.VersionKind\x12\x11\n\tfull_name\x18\x05 \x01(\t\"Q\n\x0bVersionKind\x12\x1c\n\x18VERSION_KIND_UNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\x0b\n\x07MINIMUM\x10\x02\x12\x0b\n\x07MAXIMUM\x10\x03*>\n\x0c\x41rchitecture\x12\x1c\n\x18\x41RCHITECTURE_UNSPECIFIED\x10\x00\x12\x07\n\x03X86\x10\x01\x12\x07\n\x03X64\x10\x02\x42Q\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - Distribution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Distribution").msgclass - Location = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Location").msgclass - PackageNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.PackageNote").msgclass - PackageOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.PackageOccurrence").msgclass - Version = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Version").msgclass - Version::VersionKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Version.VersionKind").enummodule - Architecture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Architecture").enummodule - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/provenance_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/provenance_pb.rb deleted file mode 100644 index 1d63130c3751..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/provenance_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/provenance.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\x1bgrafeas/v1/provenance.proto\x12\ngrafeas.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x90\x04\n\x0f\x42uildProvenance\x12\n\n\x02id\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12%\n\x08\x63ommands\x18\x03 \x03(\x0b\x32\x13.grafeas.v1.Command\x12-\n\x0f\x62uilt_artifacts\x18\x04 \x03(\x0b\x32\x14.grafeas.v1.Artifact\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07\x63reator\x18\x08 \x01(\t\x12\x10\n\x08logs_uri\x18\t \x01(\t\x12-\n\x11source_provenance\x18\n \x01(\x0b\x32\x12.grafeas.v1.Source\x12\x12\n\ntrigger_id\x18\x0b \x01(\t\x12\x44\n\rbuild_options\x18\x0c \x03(\x0b\x32-.grafeas.v1.BuildProvenance.BuildOptionsEntry\x12\x17\n\x0f\x62uilder_version\x18\r \x01(\t\x1a\x33\n\x11\x42uildOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x95\x02\n\x06Source\x12#\n\x1b\x61rtifact_storage_source_uri\x18\x01 \x01(\t\x12\x37\n\x0b\x66ile_hashes\x18\x02 \x03(\x0b\x32\".grafeas.v1.Source.FileHashesEntry\x12*\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x19.grafeas.v1.SourceContext\x12\x36\n\x13\x61\x64\x64itional_contexts\x18\x04 \x03(\x0b\x32\x19.grafeas.v1.SourceContext\x1aI\n\x0f\x46ileHashesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.grafeas.v1.FileHashes:\x02\x38\x01\"1\n\nFileHashes\x12#\n\tfile_hash\x18\x01 \x03(\x0b\x32\x10.grafeas.v1.Hash\"#\n\x04Hash\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"]\n\x07\x43ommand\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03\x65nv\x18\x02 \x03(\t\x12\x0c\n\x04\x61rgs\x18\x03 \x03(\t\x12\x0b\n\x03\x64ir\x18\x04 \x01(\t\x12\n\n\x02id\x18\x05 \x01(\t\x12\x10\n\x08wait_for\x18\x06 \x03(\t\"7\n\x08\x41rtifact\x12\x10\n\x08\x63hecksum\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\r\n\x05names\x18\x03 \x03(\t\"\x9a\x02\n\rSourceContext\x12\x38\n\ncloud_repo\x18\x01 \x01(\x0b\x32\".grafeas.v1.CloudRepoSourceContextH\x00\x12\x31\n\x06gerrit\x18\x02 \x01(\x0b\x32\x1f.grafeas.v1.GerritSourceContextH\x00\x12+\n\x03git\x18\x03 \x01(\x0b\x32\x1c.grafeas.v1.GitSourceContextH\x00\x12\x35\n\x06labels\x18\x04 \x03(\x0b\x32%.grafeas.v1.SourceContext.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07\x63ontext\"\x8a\x01\n\x0c\x41liasContext\x12+\n\x04kind\x18\x01 \x01(\x0e\x32\x1d.grafeas.v1.AliasContext.Kind\x12\x0c\n\x04name\x18\x02 \x01(\t\"?\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\t\n\x05\x46IXED\x10\x01\x12\x0b\n\x07MOVABLE\x10\x02\x12\t\n\x05OTHER\x10\x04\"\x93\x01\n\x16\x43loudRepoSourceContext\x12#\n\x07repo_id\x18\x01 \x01(\x0b\x32\x12.grafeas.v1.RepoId\x12\x15\n\x0brevision_id\x18\x02 \x01(\tH\x00\x12\x31\n\ralias_context\x18\x03 \x01(\x0b\x32\x18.grafeas.v1.AliasContextH\x00\x42\n\n\x08revision\"\x95\x01\n\x13GerritSourceContext\x12\x10\n\x08host_uri\x18\x01 \x01(\t\x12\x16\n\x0egerrit_project\x18\x02 \x01(\t\x12\x15\n\x0brevision_id\x18\x03 \x01(\tH\x00\x12\x31\n\ralias_context\x18\x04 \x01(\x0b\x32\x18.grafeas.v1.AliasContextH\x00\x42\n\n\x08revision\"4\n\x10GitSourceContext\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x13\n\x0brevision_id\x18\x02 \x01(\t\"S\n\x06RepoId\x12\x34\n\x0fproject_repo_id\x18\x01 \x01(\x0b\x32\x19.grafeas.v1.ProjectRepoIdH\x00\x12\r\n\x03uid\x18\x02 \x01(\tH\x00\x42\x04\n\x02id\"6\n\rProjectRepoId\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x11\n\trepo_name\x18\x02 \x01(\tBQ\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - BuildProvenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.BuildProvenance").msgclass - Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Source").msgclass - FileHashes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.FileHashes").msgclass - Hash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Hash").msgclass - Command = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Command").msgclass - Artifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Artifact").msgclass - SourceContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SourceContext").msgclass - AliasContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.AliasContext").msgclass - AliasContext::Kind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.AliasContext.Kind").enummodule - CloudRepoSourceContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CloudRepoSourceContext").msgclass - GerritSourceContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.GerritSourceContext").msgclass - GitSourceContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.GitSourceContext").msgclass - RepoId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.RepoId").msgclass - ProjectRepoId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ProjectRepoId").msgclass - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/risk_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/risk_pb.rb deleted file mode 100644 index 970f5ed28d46..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/risk_pb.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/risk.proto - -require 'google/protobuf' - - -descriptor_data = "\n\x15grafeas/v1/risk.proto\x12\ngrafeas.v1\"\x81\x01\n\x04Risk\x12?\n\x08\x63isa_kev\x18\x01 \x01(\x0b\x32-.grafeas.v1.CISAKnownExploitedVulnerabilities\x12\x38\n\x04\x65pss\x18\x02 \x01(\x0b\x32*.grafeas.v1.ExploitPredictionScoringSystem\"J\n!CISAKnownExploitedVulnerabilities\x12%\n\x1dknown_ransomware_campaign_use\x18\x01 \x01(\t\"C\n\x1e\x45xploitPredictionScoringSystem\x12\x12\n\npercentile\x18\x01 \x01(\x01\x12\r\n\x05score\x18\x02 \x01(\x01\x42Q\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - Risk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Risk").msgclass - CISAKnownExploitedVulnerabilities = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.CISAKnownExploitedVulnerabilities").msgclass - ExploitPredictionScoringSystem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.ExploitPredictionScoringSystem").msgclass - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/sbom_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/sbom_pb.rb deleted file mode 100644 index b5db116a7827..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/sbom_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/sbom.proto - -require 'google/protobuf' - -require 'grafeas/v1/common_pb' -require 'grafeas/v1/intoto_statement_pb' - - -descriptor_data = "\n\x15grafeas/v1/sbom.proto\x12\ngrafeas.v1\x1a\x17grafeas/v1/common.proto\x1a!grafeas/v1/intoto_statement.proto\"4\n\x11SBOMReferenceNote\x12\x0e\n\x06\x66ormat\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\"\x9b\x01\n\x17SBOMReferenceOccurrence\x12\x37\n\x07payload\x18\x01 \x01(\x0b\x32&.grafeas.v1.SbomReferenceIntotoPayload\x12\x14\n\x0cpayload_type\x18\x02 \x01(\t\x12\x31\n\nsignatures\x18\x03 \x03(\x0b\x32\x1d.grafeas.v1.EnvelopeSignature\"\xac\x01\n\x1aSbomReferenceIntotoPayload\x12\x13\n\x04type\x18\x01 \x01(\tR\x05_type\x12\x16\n\x0epredicate_type\x18\x02 \x01(\t\x12$\n\x07subject\x18\x03 \x03(\x0b\x32\x13.grafeas.v1.Subject\x12;\n\tpredicate\x18\x04 \x01(\x0b\x32(.grafeas.v1.SbomReferenceIntotoPredicate\"\xcd\x01\n\x1cSbomReferenceIntotoPredicate\x12\x13\n\x0breferrer_id\x18\x01 \x01(\t\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x11\n\tmime_type\x18\x03 \x01(\t\x12\x44\n\x06\x64igest\x18\x04 \x03(\x0b\x32\x34.grafeas.v1.SbomReferenceIntotoPredicate.DigestEntry\x1a-\n\x0b\x44igestEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42Q\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - SBOMReferenceNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SBOMReferenceNote").msgclass - SBOMReferenceOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SBOMReferenceOccurrence").msgclass - SbomReferenceIntotoPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SbomReferenceIntotoPayload").msgclass - SbomReferenceIntotoPredicate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SbomReferenceIntotoPredicate").msgclass - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/secret_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/secret_pb.rb deleted file mode 100644 index 0ca629f57999..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/secret_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/secret.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/any_pb' -require 'google/protobuf/timestamp_pb' -require 'grafeas/v1/common_pb' - - -descriptor_data = "\n\x17grafeas/v1/secret.proto\x12\ngrafeas.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17grafeas/v1/common.proto\"\x0c\n\nSecretNote\"\xea\x01\n\x10SecretOccurrence\x12)\n\x04kind\x18\x01 \x01(\x0e\x32\x16.grafeas.v1.SecretKindB\x03\xe0\x41\x02\x12\x32\n\tlocations\x18\x02 \x03(\x0b\x32\x1a.grafeas.v1.SecretLocationB\x03\xe0\x41\x01\x12/\n\x08statuses\x18\x03 \x03(\x0b\x32\x18.grafeas.v1.SecretStatusB\x03\xe0\x41\x01\x12\"\n\x04\x64\x61ta\x18\x04 \x01(\x0b\x32\x14.google.protobuf.Any\x12\"\n\x06\x64igest\x18\x05 \x01(\x0b\x32\x12.grafeas.v1.Digest\"O\n\x0eSecretLocation\x12\x31\n\rfile_location\x18\x01 \x01(\x0b\x32\x18.grafeas.v1.FileLocationH\x00\x42\n\n\x08location\"\xd7\x01\n\x0cSecretStatus\x12\x34\n\x06status\x18\x01 \x01(\x0e\x32\x1f.grafeas.v1.SecretStatus.StatusB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x14\n\x07message\x18\x03 \x01(\tB\x03\xe0\x41\x01\"E\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\t\n\x05VALID\x10\x02\x12\x0b\n\x07INVALID\x10\x03*\xa5\x07\n\nSecretKind\x12\x1b\n\x17SECRET_KIND_UNSPECIFIED\x10\x00\x12\x17\n\x13SECRET_KIND_UNKNOWN\x10\x01\x12\'\n#SECRET_KIND_GCP_SERVICE_ACCOUNT_KEY\x10\x02\x12\x1b\n\x17SECRET_KIND_GCP_API_KEY\x10\x03\x12-\n)SECRET_KIND_GCP_OAUTH2_CLIENT_CREDENTIALS\x10\x04\x12\'\n#SECRET_KIND_GCP_OAUTH2_ACCESS_TOKEN\x10\x05\x12\'\n#SECRET_KIND_ANTHROPIC_ADMIN_API_KEY\x10\x06\x12!\n\x1dSECRET_KIND_ANTHROPIC_API_KEY\x10\x07\x12\"\n\x1eSECRET_KIND_AZURE_ACCESS_TOKEN\x10\x08\x12$\n SECRET_KIND_AZURE_IDENTITY_TOKEN\x10\t\x12\x30\n,SECRET_KIND_DOCKER_HUB_PERSONAL_ACCESS_TOKEN\x10\n\x12(\n$SECRET_KIND_GITHUB_APP_REFRESH_TOKEN\x10\x0b\x12\x31\n-SECRET_KIND_GITHUB_APP_SERVER_TO_SERVER_TOKEN\x10\x0c\x12/\n+SECRET_KIND_GITHUB_APP_USER_TO_SERVER_TOKEN\x10\r\x12\x34\n0SECRET_KIND_GITHUB_CLASSIC_PERSONAL_ACCESS_TOKEN\x10\x0e\x12\x39\n5SECRET_KIND_GITHUB_FINE_GRAINED_PERSONAL_ACCESS_TOKEN\x10\x0f\x12\"\n\x1eSECRET_KIND_GITHUB_OAUTH_TOKEN\x10\x10\x12#\n\x1fSECRET_KIND_HUGGINGFACE_API_KEY\x10\x11\x12\x1e\n\x1aSECRET_KIND_OPENAI_API_KEY\x10\x12\x12\"\n\x1eSECRET_KIND_PERPLEXITY_API_KEY\x10\x13\x12!\n\x1dSECRET_KIND_STRIPE_SECRET_KEY\x10\x14\x12%\n!SECRET_KIND_STRIPE_RESTRICTED_KEY\x10\x15\x12%\n!SECRET_KIND_STRIPE_WEBHOOK_SECRET\x10\x16\x42Q\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - SecretNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SecretNote").msgclass - SecretOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SecretOccurrence").msgclass - SecretLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SecretLocation").msgclass - SecretStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SecretStatus").msgclass - SecretStatus::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SecretStatus.Status").enummodule - SecretKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SecretKind").enummodule - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/severity_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/severity_pb.rb deleted file mode 100644 index ca838f6d75de..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/severity_pb.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/severity.proto - -require 'google/protobuf' - - -descriptor_data = "\n\x19grafeas/v1/severity.proto\x12\ngrafeas.v1*^\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07MINIMAL\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\x12\x0c\n\x08\x43RITICAL\x10\x05\x42Q\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.Severity").enummodule - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/slsa_provenance_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/slsa_provenance_pb.rb deleted file mode 100644 index a6d5aff1d80a..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/slsa_provenance_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/slsa_provenance.proto - -require 'google/protobuf' - -require 'google/protobuf/any_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n grafeas/v1/slsa_provenance.proto\x12\ngrafeas.v1\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfe\x06\n\x0eSlsaProvenance\x12\x37\n\x07\x62uilder\x18\x01 \x01(\x0b\x32&.grafeas.v1.SlsaProvenance.SlsaBuilder\x12\x35\n\x06recipe\x18\x02 \x01(\x0b\x32%.grafeas.v1.SlsaProvenance.SlsaRecipe\x12\x39\n\x08metadata\x18\x03 \x01(\x0b\x32\'.grafeas.v1.SlsaProvenance.SlsaMetadata\x12\x36\n\tmaterials\x18\x04 \x03(\x0b\x32#.grafeas.v1.SlsaProvenance.Material\x1a\xa0\x01\n\nSlsaRecipe\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x1b\n\x13\x64\x65\x66ined_in_material\x18\x02 \x01(\x03\x12\x13\n\x0b\x65ntry_point\x18\x03 \x01(\t\x12\'\n\targuments\x18\x04 \x01(\x0b\x32\x14.google.protobuf.Any\x12)\n\x0b\x65nvironment\x18\x05 \x01(\x0b\x32\x14.google.protobuf.Any\x1aM\n\x10SlsaCompleteness\x12\x11\n\targuments\x18\x01 \x01(\x08\x12\x13\n\x0b\x65nvironment\x18\x02 \x01(\x08\x12\x11\n\tmaterials\x18\x03 \x01(\x08\x1a\xf1\x01\n\x0cSlsaMetadata\x12\x1b\n\x13\x62uild_invocation_id\x18\x01 \x01(\t\x12\x34\n\x10\x62uild_started_on\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11\x62uild_finished_on\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x41\n\x0c\x63ompleteness\x18\x04 \x01(\x0b\x32+.grafeas.v1.SlsaProvenance.SlsaCompleteness\x12\x14\n\x0creproducible\x18\x05 \x01(\x08\x1a\x19\n\x0bSlsaBuilder\x12\n\n\x02id\x18\x01 \x01(\t\x1a\x87\x01\n\x08Material\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12?\n\x06\x64igest\x18\x02 \x03(\x0b\x32/.grafeas.v1.SlsaProvenance.Material.DigestEntry\x1a-\n\x0b\x44igestEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x66\n\rio.grafeas.v1B\x13SlsaProvenanceProtoP\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - SlsaProvenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenance").msgclass - SlsaProvenance::SlsaRecipe = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenance.SlsaRecipe").msgclass - SlsaProvenance::SlsaCompleteness = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenance.SlsaCompleteness").msgclass - SlsaProvenance::SlsaMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenance.SlsaMetadata").msgclass - SlsaProvenance::SlsaBuilder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenance.SlsaBuilder").msgclass - SlsaProvenance::Material = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenance.Material").msgclass - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/slsa_provenance_zero_two_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/slsa_provenance_zero_two_pb.rb deleted file mode 100644 index 2acddf338bf8..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/slsa_provenance_zero_two_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/slsa_provenance_zero_two.proto - -require 'google/protobuf' - -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n)grafeas/v1/slsa_provenance_zero_two.proto\x12\ngrafeas.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd3\t\n\x15SlsaProvenanceZeroTwo\x12>\n\x07\x62uilder\x18\x01 \x01(\x0b\x32-.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder\x12\x12\n\nbuild_type\x18\x02 \x01(\t\x12\x44\n\ninvocation\x18\x03 \x01(\x0b\x32\x30.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation\x12-\n\x0c\x62uild_config\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12@\n\x08metadata\x18\x05 \x01(\x0b\x32..grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata\x12\x41\n\tmaterials\x18\x06 \x03(\x0b\x32..grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial\x1a\x19\n\x0bSlsaBuilder\x12\n\n\x02id\x18\x01 \x01(\t\x1a\x96\x01\n\x0cSlsaMaterial\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12J\n\x06\x64igest\x18\x02 \x03(\x0b\x32:.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.DigestEntry\x1a-\n\x0b\x44igestEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xb6\x01\n\x0eSlsaInvocation\x12I\n\rconfig_source\x18\x01 \x01(\x0b\x32\x32.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource\x12+\n\nparameters\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12,\n\x0b\x65nvironment\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x1a\xb3\x01\n\x10SlsaConfigSource\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12N\n\x06\x64igest\x18\x02 \x03(\x0b\x32>.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.DigestEntry\x12\x13\n\x0b\x65ntry_point\x18\x03 \x01(\t\x1a-\n\x0b\x44igestEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xf8\x01\n\x0cSlsaMetadata\x12\x1b\n\x13\x62uild_invocation_id\x18\x01 \x01(\t\x12\x34\n\x10\x62uild_started_on\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11\x62uild_finished_on\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12H\n\x0c\x63ompleteness\x18\x04 \x01(\x0b\x32\x32.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness\x12\x14\n\x0creproducible\x18\x05 \x01(\x08\x1aN\n\x10SlsaCompleteness\x12\x12\n\nparameters\x18\x01 \x01(\x08\x12\x13\n\x0b\x65nvironment\x18\x02 \x01(\x08\x12\x11\n\tmaterials\x18\x03 \x01(\x08\x42m\n\rio.grafeas.v1B\x1aSlsaProvenanceZeroTwoProtoP\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - SlsaProvenanceZeroTwo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenanceZeroTwo").msgclass - SlsaProvenanceZeroTwo::SlsaBuilder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder").msgclass - SlsaProvenanceZeroTwo::SlsaMaterial = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial").msgclass - SlsaProvenanceZeroTwo::SlsaInvocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation").msgclass - SlsaProvenanceZeroTwo::SlsaConfigSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource").msgclass - SlsaProvenanceZeroTwo::SlsaMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata").msgclass - SlsaProvenanceZeroTwo::SlsaCompleteness = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness").msgclass - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/upgrade_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/upgrade_pb.rb deleted file mode 100644 index 18d8c849a74f..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/upgrade_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/upgrade.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' -require 'grafeas/v1/package_pb' - - -descriptor_data = "\n\x18grafeas/v1/upgrade.proto\x12\ngrafeas.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x18grafeas/v1/package.proto\"\xaf\x01\n\x0bUpgradeNote\x12\x0f\n\x07package\x18\x01 \x01(\t\x12$\n\x07version\x18\x02 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x36\n\rdistributions\x18\x03 \x03(\x0b\x32\x1f.grafeas.v1.UpgradeDistribution\x12\x31\n\x0ewindows_update\x18\x04 \x01(\x0b\x32\x19.grafeas.v1.WindowsUpdate\"]\n\x13UpgradeDistribution\x12\x0f\n\x07\x63pe_uri\x18\x01 \x01(\t\x12\x16\n\x0e\x63lassification\x18\x02 \x01(\t\x12\x10\n\x08severity\x18\x03 \x01(\t\x12\x0b\n\x03\x63ve\x18\x04 \x03(\t\"\xec\x02\n\rWindowsUpdate\x12\x34\n\x08identity\x18\x01 \x01(\x0b\x32\".grafeas.v1.WindowsUpdate.Identity\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x36\n\ncategories\x18\x04 \x03(\x0b\x32\".grafeas.v1.WindowsUpdate.Category\x12\x16\n\x0ekb_article_ids\x18\x05 \x03(\t\x12\x13\n\x0bsupport_url\x18\x06 \x01(\t\x12<\n\x18last_published_timestamp\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a/\n\x08Identity\x12\x11\n\tupdate_id\x18\x01 \x01(\t\x12\x10\n\x08revision\x18\x02 \x01(\x05\x1a-\n\x08\x43\x61tegory\x12\x13\n\x0b\x63\x61tegory_id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\xbb\x01\n\x11UpgradeOccurrence\x12\x0f\n\x07package\x18\x01 \x01(\t\x12+\n\x0eparsed_version\x18\x03 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x35\n\x0c\x64istribution\x18\x04 \x01(\x0b\x32\x1f.grafeas.v1.UpgradeDistribution\x12\x31\n\x0ewindows_update\x18\x05 \x01(\x0b\x32\x19.grafeas.v1.WindowsUpdateBQ\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - UpgradeNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.UpgradeNote").msgclass - UpgradeDistribution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.UpgradeDistribution").msgclass - WindowsUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.WindowsUpdate").msgclass - WindowsUpdate::Identity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.WindowsUpdate.Identity").msgclass - WindowsUpdate::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.WindowsUpdate.Category").msgclass - UpgradeOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.UpgradeOccurrence").msgclass - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/version.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/version.rb deleted file mode 100644 index fa8f104cf044..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/version.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Grafeas - module V1 - VERSION = "0.0.1" - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/vex_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/vex_pb.rb deleted file mode 100644 index a7bd51fd0e04..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/vex_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/vex.proto - -require 'google/protobuf' - -require 'grafeas/v1/common_pb' - - -descriptor_data = "\n\x14grafeas/v1/vex.proto\x12\ngrafeas.v1\x1a\x17grafeas/v1/common.proto\"\xc8\r\n\x1bVulnerabilityAssessmentNote\x12\r\n\x05title\x18\x01 \x01(\t\x12\x19\n\x11short_description\x18\x02 \x01(\t\x12\x18\n\x10long_description\x18\x03 \x01(\t\x12\x15\n\rlanguage_code\x18\x04 \x01(\t\x12\x44\n\tpublisher\x18\x05 \x01(\x0b\x32\x31.grafeas.v1.VulnerabilityAssessmentNote.Publisher\x12@\n\x07product\x18\x06 \x01(\x0b\x32/.grafeas.v1.VulnerabilityAssessmentNote.Product\x12\x46\n\nassessment\x18\x07 \x01(\x0b\x32\x32.grafeas.v1.VulnerabilityAssessmentNote.Assessment\x1aQ\n\tPublisher\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x11issuing_authority\x18\x02 \x01(\t\x12\x1b\n\x13publisher_namespace\x18\x03 \x01(\t\x1aH\n\x07Product\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x15\n\x0bgeneric_uri\x18\x03 \x01(\tH\x00\x42\x0c\n\nidentifier\x1a\xe0\t\n\nAssessment\x12\x0f\n\x03\x63ve\x18\x01 \x01(\tB\x02\x18\x01\x12\x18\n\x10vulnerability_id\x18\t \x01(\t\x12\x19\n\x11short_description\x18\x02 \x01(\t\x12\x18\n\x10long_description\x18\x03 \x01(\t\x12,\n\x0crelated_uris\x18\x04 \x03(\x0b\x32\x16.grafeas.v1.RelatedUrl\x12G\n\x05state\x18\x05 \x01(\x0e\x32\x38.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State\x12\x0f\n\x07impacts\x18\x06 \x03(\t\x12W\n\rjustification\x18\x07 \x01(\x0b\x32@.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification\x12T\n\x0cremediations\x18\x08 \x03(\x0b\x32>.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation\x1a\x8c\x03\n\rJustification\x12n\n\x12justification_type\x18\x01 \x01(\x0e\x32R.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType\x12\x0f\n\x07\x64\x65tails\x18\x02 \x01(\t\"\xf9\x01\n\x11JustificationType\x12\"\n\x1eJUSTIFICATION_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15\x43OMPONENT_NOT_PRESENT\x10\x01\x12\x1f\n\x1bVULNERABLE_CODE_NOT_PRESENT\x10\x02\x12\'\n#VULNERABLE_CODE_NOT_IN_EXECUTE_PATH\x10\x03\x12\x35\n1VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY\x10\x04\x12$\n INLINE_MITIGATIONS_ALREADY_EXIST\x10\x05\x1a\xc7\x02\n\x0bRemediation\x12h\n\x10remediation_type\x18\x01 \x01(\x0e\x32N.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType\x12\x0f\n\x07\x64\x65tails\x18\x02 \x01(\t\x12/\n\x0fremediation_uri\x18\x03 \x01(\x0b\x32\x16.grafeas.v1.RelatedUrl\"\x8b\x01\n\x0fRemediationType\x12 \n\x1cREMEDIATION_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nMITIGATION\x10\x01\x12\x12\n\x0eNO_FIX_PLANNED\x10\x02\x12\x12\n\x0eNONE_AVAILABLE\x10\x03\x12\x0e\n\nVENDOR_FIX\x10\x04\x12\x0e\n\nWORKAROUND\x10\x05\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x41\x46\x46\x45\x43TED\x10\x01\x12\x10\n\x0cNOT_AFFECTED\x10\x02\x12\t\n\x05\x46IXED\x10\x03\x12\x17\n\x13UNDER_INVESTIGATION\x10\x04\x42Q\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - VulnerabilityAssessmentNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityAssessmentNote").msgclass - VulnerabilityAssessmentNote::Publisher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityAssessmentNote.Publisher").msgclass - VulnerabilityAssessmentNote::Product = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityAssessmentNote.Product").msgclass - VulnerabilityAssessmentNote::Assessment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityAssessmentNote.Assessment").msgclass - VulnerabilityAssessmentNote::Assessment::Justification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification").msgclass - VulnerabilityAssessmentNote::Assessment::Justification::JustificationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityAssessmentNote.Assessment.Justification.JustificationType").enummodule - VulnerabilityAssessmentNote::Assessment::Remediation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation").msgclass - VulnerabilityAssessmentNote::Assessment::Remediation::RemediationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation.RemediationType").enummodule - VulnerabilityAssessmentNote::Assessment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityAssessmentNote.Assessment.State").enummodule - end -end diff --git a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/vulnerability_pb.rb b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/vulnerability_pb.rb deleted file mode 100644 index 9da9440f5085..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/vulnerability_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: grafeas/v1/vulnerability.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' -require 'grafeas/v1/common_pb' -require 'grafeas/v1/cvss_pb' -require 'grafeas/v1/package_pb' -require 'grafeas/v1/risk_pb' -require 'grafeas/v1/severity_pb' -require 'grafeas/v1/vex_pb' - - -descriptor_data = "\n\x1egrafeas/v1/vulnerability.proto\x12\ngrafeas.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17grafeas/v1/common.proto\x1a\x15grafeas/v1/cvss.proto\x1a\x18grafeas/v1/package.proto\x1a\x15grafeas/v1/risk.proto\x1a\x19grafeas/v1/severity.proto\x1a\x14grafeas/v1/vex.proto\"\xca\x08\n\x11VulnerabilityNote\x12\x12\n\ncvss_score\x18\x01 \x01(\x02\x12&\n\x08severity\x18\x02 \x01(\x0e\x32\x14.grafeas.v1.Severity\x12\x35\n\x07\x64\x65tails\x18\x03 \x03(\x0b\x32$.grafeas.v1.VulnerabilityNote.Detail\x12#\n\x07\x63vss_v3\x18\x04 \x01(\x0b\x32\x12.grafeas.v1.CVSSv3\x12\x44\n\x0fwindows_details\x18\x05 \x03(\x0b\x32+.grafeas.v1.VulnerabilityNote.WindowsDetail\x12\x36\n\x12source_update_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12-\n\x0c\x63vss_version\x18\x07 \x01(\x0e\x32\x17.grafeas.v1.CVSSVersion\x12!\n\x07\x63vss_v2\x18\x08 \x01(\x0b\x32\x10.grafeas.v1.CVSS\x12\x39\n\x15\x61\x64visory_publish_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x07\x63vss_v4\x18\n \x01(\x0b\x32\x10.grafeas.v1.CVSS\x1a\xad\x03\n\x06\x44\x65tail\x12\x15\n\rseverity_name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x14\n\x0cpackage_type\x18\x03 \x01(\t\x12\x18\n\x10\x61\x66\x66\x65\x63ted_cpe_uri\x18\x04 \x01(\t\x12\x18\n\x10\x61\x66\x66\x65\x63ted_package\x18\x05 \x01(\t\x12\x33\n\x16\x61\x66\x66\x65\x63ted_version_start\x18\x06 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x31\n\x14\x61\x66\x66\x65\x63ted_version_end\x18\x07 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x15\n\rfixed_cpe_uri\x18\x08 \x01(\t\x12\x15\n\rfixed_package\x18\t \x01(\t\x12*\n\rfixed_version\x18\n \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x13\n\x0bis_obsolete\x18\x0b \x01(\x08\x12\x36\n\x12source_update_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06source\x18\r \x01(\t\x12\x0e\n\x06vendor\x18\x0e \x01(\t\x1a\xbe\x01\n\rWindowsDetail\x12\x0f\n\x07\x63pe_uri\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12M\n\nfixing_kbs\x18\x04 \x03(\x0b\x32\x39.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase\x1a*\n\rKnowledgeBase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\"\xdb\n\n\x17VulnerabilityOccurrence\x12\x0c\n\x04type\x18\x01 \x01(\t\x12&\n\x08severity\x18\x02 \x01(\x0e\x32\x14.grafeas.v1.Severity\x12\x12\n\ncvss_score\x18\x03 \x01(\x02\x12 \n\x06\x63vssv3\x18\n \x01(\x0b\x32\x10.grafeas.v1.CVSS\x12G\n\rpackage_issue\x18\x04 \x03(\x0b\x32\x30.grafeas.v1.VulnerabilityOccurrence.PackageIssue\x12\x19\n\x11short_description\x18\x05 \x01(\t\x12\x18\n\x10long_description\x18\x06 \x01(\t\x12,\n\x0crelated_urls\x18\x07 \x03(\x0b\x32\x16.grafeas.v1.RelatedUrl\x12\x30\n\x12\x65\x66\x66\x65\x63tive_severity\x18\x08 \x01(\x0e\x32\x14.grafeas.v1.Severity\x12\x15\n\rfix_available\x18\t \x01(\x08\x12-\n\x0c\x63vss_version\x18\x0b \x01(\x0e\x32\x17.grafeas.v1.CVSSVersion\x12!\n\x07\x63vss_v2\x18\x0c \x01(\x0b\x32\x10.grafeas.v1.CVSS\x12I\n\x0evex_assessment\x18\r \x01(\x0b\x32\x31.grafeas.v1.VulnerabilityOccurrence.VexAssessment\x12\x15\n\rextra_details\x18\x0e \x01(\t\x12\x1e\n\x04risk\x18\x0f \x01(\x0b\x32\x10.grafeas.v1.Risk\x12!\n\x07\x63vss_v4\x18\x10 \x01(\x0b\x32\x10.grafeas.v1.CVSS\x1a\xe0\x02\n\x0cPackageIssue\x12\x18\n\x10\x61\x66\x66\x65\x63ted_cpe_uri\x18\x01 \x01(\t\x12\x18\n\x10\x61\x66\x66\x65\x63ted_package\x18\x02 \x01(\t\x12-\n\x10\x61\x66\x66\x65\x63ted_version\x18\x03 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x15\n\rfixed_cpe_uri\x18\x04 \x01(\t\x12\x15\n\rfixed_package\x18\x05 \x01(\t\x12*\n\rfixed_version\x18\x06 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x15\n\rfix_available\x18\x07 \x01(\x08\x12\x14\n\x0cpackage_type\x18\x08 \x01(\t\x12\x35\n\x12\x65\x66\x66\x65\x63tive_severity\x18\t \x01(\x0e\x32\x14.grafeas.v1.SeverityB\x03\xe0\x41\x03\x12/\n\rfile_location\x18\n \x03(\x0b\x32\x18.grafeas.v1.FileLocation\x1a\x84\x03\n\rVexAssessment\x12\x0f\n\x03\x63ve\x18\x01 \x01(\tB\x02\x18\x01\x12\x18\n\x10vulnerability_id\x18\x08 \x01(\t\x12,\n\x0crelated_uris\x18\x02 \x03(\x0b\x32\x16.grafeas.v1.RelatedUrl\x12\x11\n\tnote_name\x18\x03 \x01(\t\x12G\n\x05state\x18\x04 \x01(\x0e\x32\x38.grafeas.v1.VulnerabilityAssessmentNote.Assessment.State\x12\x0f\n\x07impacts\x18\x05 \x03(\t\x12T\n\x0cremediations\x18\x06 \x03(\x0b\x32>.grafeas.v1.VulnerabilityAssessmentNote.Assessment.Remediation\x12W\n\rjustification\x18\x07 \x01(\x0b\x32@.grafeas.v1.VulnerabilityAssessmentNote.Assessment.JustificationBQ\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Grafeas - module V1 - VulnerabilityNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityNote").msgclass - VulnerabilityNote::Detail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityNote.Detail").msgclass - VulnerabilityNote::WindowsDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityNote.WindowsDetail").msgclass - VulnerabilityNote::WindowsDetail::KnowledgeBase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase").msgclass - VulnerabilityOccurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityOccurrence").msgclass - VulnerabilityOccurrence::PackageIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityOccurrence.PackageIssue").msgclass - VulnerabilityOccurrence::VexAssessment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("grafeas.v1.VulnerabilityOccurrence.VexAssessment").msgclass - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/README.md b/owl-bot-staging/grafeas-v1/proto_docs/README.md deleted file mode 100644 index 1117465c0da0..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Grafeas 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/grafeas-v1/proto_docs/google/api/client.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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. - # - # Note: This field should not be used in most cases. - 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. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # 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/grafeas-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/grafeas-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/grafeas-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/grafeas-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/grafeas-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/grafeas-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/grafeas-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/grafeas-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/grafeas-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/grafeas-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/grafeas-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/grafeas-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/grafeas-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/grafeas-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/grafeas-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/grafeas-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/grafeas-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/grafeas-v1/proto_docs/grafeas/v1/attestation.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/attestation.rb deleted file mode 100644 index 23895f01f033..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/attestation.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 Grafeas - module V1 - # Note kind that represents a logical attestation "role" or "authority". For - # example, an organization might have one `Authority` for "QA" and one for - # "build". This note is intended to act strictly as a grouping mechanism for - # the attached occurrences (Attestations). This grouping mechanism also - # provides a security boundary, since IAM ACLs gate the ability for a principle - # to attach an occurrence to a given note. It also provides a single point of - # lookup to find all attached attestation occurrences, even if they don't all - # live in the same project. - # @!attribute [rw] hint - # @return [::Grafeas::V1::AttestationNote::Hint] - # Hint hints at the purpose of the attestation authority. - class AttestationNote - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # This submessage provides human-readable hints about the purpose of the - # authority. Because the name of a note acts as its resource reference, it is - # important to disambiguate the canonical name of the Note (which might be a - # UUID for security purposes) from "readable" names more suitable for debug - # output. Note that these hints should not be used to look up authorities in - # security sensitive contexts, such as when looking up attestations to - # verify. - # @!attribute [rw] human_readable_name - # @return [::String] - # Required. The human readable name of this attestation authority, for - # example "qa". - class Hint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] compact_jwt - # @return [::String] - # The compact encoding of a JWS, which is always three base64 encoded strings - # joined by periods. For details, see: - # https://tools.ietf.org/html/rfc7515.html#section-3.1 - class Jwt - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Occurrence that represents a single "attestation". The authenticity of an - # attestation can be verified using the attached signature. If the verifier - # trusts the public key of the signer, then verifying the signature is - # sufficient to establish trust. In this circumstance, the authority to which - # this attestation is attached is primarily useful for lookup (how to find - # this attestation if you already know the authority and artifact to be - # verified) and intent (for which authority this attestation was intended to - # sign. - # @!attribute [rw] serialized_payload - # @return [::String] - # Required. The serialized payload that is verified by one or more - # `signatures`. - # @!attribute [rw] signatures - # @return [::Array<::Grafeas::V1::Signature>] - # One or more signatures over `serialized_payload`. Verifier implementations - # should consider this attestation message verified if at least one - # `signature` verifies `serialized_payload`. See `Signature` in common.proto - # for more details on signature structure and verification. - # @!attribute [rw] jwts - # @return [::Array<::Grafeas::V1::Jwt>] - # One or more JWTs encoding a self-contained attestation. - # Each JWT encodes the payload that it verifies within the JWT itself. - # Verifier implementation SHOULD ignore the `serialized_payload` field - # when verifying these JWTs. - # If only JWTs are present on this AttestationOccurrence, then the - # `serialized_payload` SHOULD be left empty. - # Each JWT SHOULD encode a claim specific to the `resource_uri` of this - # Occurrence, but this is not validated by Grafeas metadata API - # implementations. The JWT itself is opaque to Grafeas. - class AttestationOccurrence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/build.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/build.rb deleted file mode 100644 index e82c88d57153..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/build.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 Grafeas - module V1 - # Note holding the version of the provider's builder and the signature of the - # provenance message in the build details occurrence. - # @!attribute [rw] builder_version - # @return [::String] - # Required. Immutable. Version of the builder which produced this build. - class BuildNote - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of a build occurrence. - # @!attribute [rw] provenance - # @return [::Grafeas::V1::BuildProvenance] - # The actual provenance for the build. - # @!attribute [rw] provenance_bytes - # @return [::String] - # Serialized JSON representation of the provenance, used in generating the - # build signature in the corresponding build note. After verifying the - # signature, `provenance_bytes` can be unmarshalled and compared to the - # provenance to confirm that it is unchanged. A base64-encoded string - # representation of the provenance bytes is used for the signature in order - # to interoperate with openssl which expects this format for signature - # verification. - # - # The serialized form is captured both to avoid ambiguity in how the - # provenance is marshalled to json as well to prevent incompatibilities with - # future changes. - # @!attribute [rw] intoto_provenance - # @return [::Grafeas::V1::InTotoProvenance] - # Deprecated. See InTotoStatement for the replacement. - # In-toto Provenance representation as defined in spec. - # @!attribute [rw] intoto_statement - # @return [::Grafeas::V1::InTotoStatement] - # In-toto Statement representation as defined in spec. - # The intoto_statement can contain any type of provenance. The serialized - # payload of the statement can be stored and signed in the Occurrence's - # envelope. - # @!attribute [rw] in_toto_slsa_provenance_v1 - # @return [::Grafeas::V1::InTotoSlsaProvenanceV1] - # In-Toto Slsa Provenance V1 represents a slsa provenance meeting the slsa - # spec, wrapped in an in-toto statement. This allows for direct - # jsonification of a to-spec in-toto slsa statement with a to-spec - # slsa provenance. - class BuildOccurrence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/common.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/common.rb deleted file mode 100644 index eabafd087790..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/common.rb +++ /dev/null @@ -1,243 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Grafeas - module V1 - # Metadata for any related URL information. - # @!attribute [rw] url - # @return [::String] - # Specific URL associated with the resource. - # @!attribute [rw] label - # @return [::String] - # Label to describe usage of the URL. - class RelatedUrl - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Verifiers (e.g. Kritis implementations) MUST verify signatures - # with respect to the trust anchors defined in policy (e.g. a Kritis policy). - # Typically this means that the verifier has been configured with a map from - # `public_key_id` to public key material (and any required parameters, e.g. - # signing algorithm). - # - # In particular, verification implementations MUST NOT treat the signature - # `public_key_id` as anything more than a key lookup hint. The `public_key_id` - # DOES NOT validate or authenticate a public key; it only provides a mechanism - # for quickly selecting a public key ALREADY CONFIGURED on the verifier through - # a trusted channel. Verification implementations MUST reject signatures in any - # of the following circumstances: - # * The `public_key_id` is not recognized by the verifier. - # * The public key that `public_key_id` refers to does not verify the - # signature with respect to the payload. - # - # The `signature` contents SHOULD NOT be "attached" (where the payload is - # included with the serialized `signature` bytes). Verifiers MUST ignore any - # "attached" payload and only verify signatures with respect to explicitly - # provided payload (e.g. a `payload` field on the proto message that holds - # this Signature, or the canonical serialization of the proto message that - # holds this signature). - # @!attribute [rw] signature - # @return [::String] - # The content of the signature, an opaque bytestring. - # The payload that this signature verifies MUST be unambiguously provided - # with the Signature during verification. A wrapper message might provide - # the payload explicitly. Alternatively, a message might have a canonical - # serialization that can always be unambiguously computed to derive the - # payload. - # @!attribute [rw] public_key_id - # @return [::String] - # The identifier for the public key that verifies this signature. - # * The `public_key_id` is required. - # * The `public_key_id` SHOULD be an RFC3986 conformant URI. - # * When possible, the `public_key_id` SHOULD be an immutable reference, - # such as a cryptographic digest. - # - # Examples of valid `public_key_id`s: - # - # OpenPGP V4 public key fingerprint: - # * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" - # See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more - # details on this scheme. - # - # RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER - # serialization): - # * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" - # * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" - class Signature - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # MUST match - # https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An - # authenticated message of arbitrary type. - # @!attribute [rw] payload - # @return [::String] - # @!attribute [rw] payload_type - # @return [::String] - # @!attribute [rw] signatures - # @return [::Array<::Grafeas::V1::EnvelopeSignature>] - class Envelope - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] sig - # @return [::String] - # @!attribute [rw] keyid - # @return [::String] - class EnvelopeSignature - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Indicates the location at which a package was found. - # @!attribute [rw] file_path - # @return [::String] - # For jars that are contained inside .war files, this filepath - # can indicate the path to war file combined with the path to jar file. - # @!attribute [rw] layer_details - # @return [::Grafeas::V1::LayerDetails] - # Each package found in a file should have its own layer metadata (that is, - # information from the origin layer of the package). - # @!attribute [rw] line_number - # @return [::Integer] - # Line number in the file where the package was found. - # Optional field that only applies to source repository scanning. - class FileLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BaseImage describes a base image of a container image. - # @!attribute [rw] name - # @return [::String] - # The name of the base image. - # @!attribute [rw] repository - # @return [::String] - # The repository name in which the base image is from. - # @!attribute [rw] layer_count - # @return [::Integer] - # The number of layers that the base image is composed of. - # @!attribute [rw] registry - # @return [::String] - # The registry in which the base image is from. - class BaseImage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about the layer a package was found in. - # @!attribute [rw] index - # @return [::Integer] - # The index of the layer in the container image. - # @!attribute [rw] diff_id - # @return [::String] - # The diff ID (typically a sha256 hash) of the layer in the container image. - # @!attribute [rw] chain_id - # @return [::String] - # The layer chain ID (sha256 hash) of the layer in the container image. - # https://github.com/opencontainers/image-spec/blob/main/config.md#layer-chainid - # @!attribute [rw] command - # @return [::String] - # The layer build command that was used to build the layer. This may not be - # found in all layers depending on how the container image is built. - # @!attribute [rw] base_images - # @return [::Array<::Grafeas::V1::BaseImage>] - # The base images the layer is found within. - class LayerDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # License information. - # @!attribute [rw] expression - # @return [::String] - # Often a single license can be used to represent the licensing terms. - # Sometimes it is necessary to include a choice of one or more licenses - # or some combination of license identifiers. - # Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", - # "GPL-2.0-or-later WITH Bison-exception-2.2". - # @!attribute [rw] comments - # @return [::String] - # Comments - class License - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Digest information. - # @!attribute [rw] algo - # @return [::String] - # `SHA1`, `SHA512` etc. - # @!attribute [rw] digest_bytes - # @return [::String] - # Value of the digest. - class Digest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Kind represents the kinds of notes supported. - module NoteKind - # Default value. This value is unused. - NOTE_KIND_UNSPECIFIED = 0 - - # The note and occurrence represent a package vulnerability. - VULNERABILITY = 1 - - # The note and occurrence assert build provenance. - BUILD = 2 - - # This represents an image basis relationship. - IMAGE = 3 - - # This represents a package installed via a package manager. - PACKAGE = 4 - - # The note and occurrence track deployment events. - DEPLOYMENT = 5 - - # The note and occurrence track the initial discovery status of a resource. - DISCOVERY = 6 - - # This represents a logical "role" that can attest to artifacts. - ATTESTATION = 7 - - # This represents an available package upgrade. - UPGRADE = 8 - - # This represents a Compliance Note - COMPLIANCE = 9 - - # This represents a DSSE attestation Note - DSSE_ATTESTATION = 10 - - # This represents a Vulnerability Assessment. - VULNERABILITY_ASSESSMENT = 11 - - # This represents an SBOM Reference. - SBOM_REFERENCE = 12 - - # This represents a secret. - SECRET = 13 - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/compliance.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/compliance.rb deleted file mode 100644 index 9c5f6037ecd1..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/compliance.rb +++ /dev/null @@ -1,107 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Grafeas - module V1 - # @!attribute [rw] title - # @return [::String] - # The title that identifies this compliance check. - # @!attribute [rw] description - # @return [::String] - # A description about this compliance check. - # @!attribute [rw] version - # @return [::Array<::Grafeas::V1::ComplianceVersion>] - # The OS and config versions the benchmark applies to. - # @!attribute [rw] rationale - # @return [::String] - # A rationale for the existence of this compliance check. - # @!attribute [rw] remediation - # @return [::String] - # A description of remediation steps if the compliance check fails. - # @!attribute [rw] cis_benchmark - # @return [::Grafeas::V1::ComplianceNote::CisBenchmark] - # @!attribute [rw] scan_instructions - # @return [::String] - # Serialized scan instructions with a predefined format. - # @!attribute [rw] impact - # @return [::String] - class ComplianceNote - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A compliance check that is a CIS benchmark. - # @!attribute [rw] profile_level - # @return [::Integer] - # @!attribute [rw] severity - # @return [::Grafeas::V1::Severity] - class CisBenchmark - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the CIS benchmark version that is applicable to a given OS and - # os version. - # @!attribute [rw] cpe_uri - # @return [::String] - # The CPE URI (https://cpe.mitre.org/specification/) this benchmark is - # applicable to. - # @!attribute [rw] benchmark_document - # @return [::String] - # The name of the document that defines this benchmark, e.g. "CIS - # Container-Optimized OS". - # @!attribute [rw] version - # @return [::String] - # The version of the benchmark. This is set to the version of the OS-specific - # CIS document the benchmark is defined in. - class ComplianceVersion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An indication that the compliance checks in the associated ComplianceNote - # were not satisfied for particular resources or a specified reason. - # @!attribute [rw] non_compliant_files - # @return [::Array<::Grafeas::V1::NonCompliantFile>] - # @!attribute [rw] non_compliance_reason - # @return [::String] - # @!attribute [rw] version - # @return [::Grafeas::V1::ComplianceVersion] - # The OS and config version the benchmark was run on. - class ComplianceOccurrence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about files that caused a compliance check to fail. - # @!attribute [rw] path - # @return [::String] - # Empty if `display_command` is set. - # @!attribute [rw] display_command - # @return [::String] - # Command to display the non-compliant files. - # @!attribute [rw] reason - # @return [::String] - # Explains why a file is non compliant for a CIS check. - class NonCompliantFile - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/cvss.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/cvss.rb deleted file mode 100644 index b78b9235d922..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/cvss.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 Grafeas - module V1 - # Common Vulnerability Scoring System version 3. - # For details, see https://www.first.org/cvss/specification-document - # @!attribute [rw] base_score - # @return [::Float] - # The base score is a function of the base metric scores. - # @!attribute [rw] exploitability_score - # @return [::Float] - # @!attribute [rw] impact_score - # @return [::Float] - # @!attribute [rw] attack_vector - # @return [::Grafeas::V1::CVSSv3::AttackVector] - # Base Metrics - # Represents the intrinsic characteristics of a vulnerability that are - # constant over time and across user environments. - # @!attribute [rw] attack_complexity - # @return [::Grafeas::V1::CVSSv3::AttackComplexity] - # @!attribute [rw] privileges_required - # @return [::Grafeas::V1::CVSSv3::PrivilegesRequired] - # @!attribute [rw] user_interaction - # @return [::Grafeas::V1::CVSSv3::UserInteraction] - # @!attribute [rw] scope - # @return [::Grafeas::V1::CVSSv3::Scope] - # @!attribute [rw] confidentiality_impact - # @return [::Grafeas::V1::CVSSv3::Impact] - # @!attribute [rw] integrity_impact - # @return [::Grafeas::V1::CVSSv3::Impact] - # @!attribute [rw] availability_impact - # @return [::Grafeas::V1::CVSSv3::Impact] - class CVSSv3 - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - module AttackVector - ATTACK_VECTOR_UNSPECIFIED = 0 - - ATTACK_VECTOR_NETWORK = 1 - - ATTACK_VECTOR_ADJACENT = 2 - - ATTACK_VECTOR_LOCAL = 3 - - ATTACK_VECTOR_PHYSICAL = 4 - end - - module AttackComplexity - ATTACK_COMPLEXITY_UNSPECIFIED = 0 - - ATTACK_COMPLEXITY_LOW = 1 - - ATTACK_COMPLEXITY_HIGH = 2 - end - - module PrivilegesRequired - PRIVILEGES_REQUIRED_UNSPECIFIED = 0 - - PRIVILEGES_REQUIRED_NONE = 1 - - PRIVILEGES_REQUIRED_LOW = 2 - - PRIVILEGES_REQUIRED_HIGH = 3 - end - - module UserInteraction - USER_INTERACTION_UNSPECIFIED = 0 - - USER_INTERACTION_NONE = 1 - - USER_INTERACTION_REQUIRED = 2 - end - - module Scope - SCOPE_UNSPECIFIED = 0 - - SCOPE_UNCHANGED = 1 - - SCOPE_CHANGED = 2 - end - - module Impact - IMPACT_UNSPECIFIED = 0 - - IMPACT_HIGH = 1 - - IMPACT_LOW = 2 - - IMPACT_NONE = 3 - end - end - - # Common Vulnerability Scoring System. - # For details, see https://www.first.org/cvss/specification-document - # This is a message we will try to use for storing various versions of CVSS - # rather than making a separate proto for storing a specific version. - # @!attribute [rw] base_score - # @return [::Float] - # The base score is a function of the base metric scores. - # @!attribute [rw] exploitability_score - # @return [::Float] - # @!attribute [rw] impact_score - # @return [::Float] - # @!attribute [rw] attack_vector - # @return [::Grafeas::V1::CVSS::AttackVector] - # Attack Vector (AV). Defined in CVSS v2, v3, v4. - # @!attribute [rw] attack_complexity - # @return [::Grafeas::V1::CVSS::AttackComplexity] - # Attack Complexity (AC). Defined in CVSS v2, v3, v4. - # @!attribute [rw] authentication - # @return [::Grafeas::V1::CVSS::Authentication] - # Authentication (Au). Defined in CVSS v2. - # @!attribute [rw] privileges_required - # @return [::Grafeas::V1::CVSS::PrivilegesRequired] - # Privileges Required (PR). Defined in CVSS v3, v4. - # @!attribute [rw] user_interaction - # @return [::Grafeas::V1::CVSS::UserInteraction] - # User Interaction (UI). Defined in CVSS v3, v4. - # @!attribute [rw] scope - # @return [::Grafeas::V1::CVSS::Scope] - # Scope (S). Defined in CVSS v3. - # @!attribute [rw] confidentiality_impact - # @return [::Grafeas::V1::CVSS::Impact] - # Confidentiality Impact (C). Defined in CVSS v2, v3. - # @!attribute [rw] integrity_impact - # @return [::Grafeas::V1::CVSS::Impact] - # Integrity Impact (I). Defined in CVSS v2, v3. - # @!attribute [rw] availability_impact - # @return [::Grafeas::V1::CVSS::Impact] - # Availability Impact (A). Defined in CVSS v2, v3. - # @!attribute [rw] attack_requirements - # @return [::Grafeas::V1::CVSS::AttackRequirements] - # Attack Requirements (AT). Defined in CVSS v4. - # @!attribute [rw] vulnerable_system_confidentiality_impact - # @return [::Grafeas::V1::CVSS::Impact] - # Vulnerable System Confidentiality Impact (VC). Defined in CVSS v4. - # @!attribute [rw] vulnerable_system_integrity_impact - # @return [::Grafeas::V1::CVSS::Impact] - # Vulnerable System Integrity Impact (VI). Defined in CVSS v4. - # @!attribute [rw] vulnerable_system_availability_impact - # @return [::Grafeas::V1::CVSS::Impact] - # Vulnerable System Availability Impact (VA). Defined in CVSS v4. - # @!attribute [rw] subsequent_system_confidentiality_impact - # @return [::Grafeas::V1::CVSS::Impact] - # Subsequent System Confidentiality Impact (SC). Defined in CVSS v4. - # @!attribute [rw] subsequent_system_integrity_impact - # @return [::Grafeas::V1::CVSS::Impact] - # Subsequent System Integrity Impact (SI). Defined in CVSS v4. - # @!attribute [rw] subsequent_system_availability_impact - # @return [::Grafeas::V1::CVSS::Impact] - # Subsequent System Availability Impact (SA). Defined in CVSS v4. - # @!attribute [rw] exploit_maturity - # @return [::Grafeas::V1::CVSS::ExploitMaturity] - # Exploit Maturity (E). Defined in CVSS v4. - class CVSS - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Attack Vector. - module AttackVector - # Unspecified. - ATTACK_VECTOR_UNSPECIFIED = 0 - - # Attack Vector: Network (AV:N). Defined in CVSS v2, v3, v4. - ATTACK_VECTOR_NETWORK = 1 - - # Attack Vector: Adjacent (AV:A). Defined in CVSS v2, v3, v4. - ATTACK_VECTOR_ADJACENT = 2 - - # Attack Vector: Local (AV:L). Defined in CVSS v2, v3, v4. - ATTACK_VECTOR_LOCAL = 3 - - # Attack Vector: Physical (AV:P). Defined in CVSS v3, v4. - ATTACK_VECTOR_PHYSICAL = 4 - end - - # Attack Complexity. - module AttackComplexity - # Unspecified. - ATTACK_COMPLEXITY_UNSPECIFIED = 0 - - # Low attack complexity (AC:L). Defined in CVSS v2, v3, v4. - ATTACK_COMPLEXITY_LOW = 1 - - # High attack complexity (AC:H). Defined in CVSS v2, v3, v4. - ATTACK_COMPLEXITY_HIGH = 2 - - # Medium attack complexity (AC:M). Defined in CVSS v2. - ATTACK_COMPLEXITY_MEDIUM = 3 - end - - # Authentication. - module Authentication - # Unspecified. - AUTHENTICATION_UNSPECIFIED = 0 - - # Multiple authentication required (Au:M). Defined in CVSS v2. - AUTHENTICATION_MULTIPLE = 1 - - # Single authentication required (Au:S). Defined in CVSS v2. - AUTHENTICATION_SINGLE = 2 - - # No authentication required (Au:N). Defined in CVSS v2. - AUTHENTICATION_NONE = 3 - end - - # Privileges Required. - module PrivilegesRequired - # Unspecified. - PRIVILEGES_REQUIRED_UNSPECIFIED = 0 - - # No privileges required (PR:N). Defined in CVSS v3, v4. - PRIVILEGES_REQUIRED_NONE = 1 - - # Low privileges required (PR:L). Defined in CVSS v3, v4. - PRIVILEGES_REQUIRED_LOW = 2 - - # High privileges required (PR:H). Defined in CVSS v3, v4. - PRIVILEGES_REQUIRED_HIGH = 3 - end - - # User Interaction. - module UserInteraction - # Unspecified. - USER_INTERACTION_UNSPECIFIED = 0 - - # No user interaction required (UI:N). Defined in CVSS v3, v4. - USER_INTERACTION_NONE = 1 - - # User interaction required (UI:R). Defined in CVSS v3. - USER_INTERACTION_REQUIRED = 2 - - # Passive user interaction required (UI:P). Defined in CVSS v4. - USER_INTERACTION_PASSIVE = 3 - - # Active user interaction required (UI:A). Defined in CVSS v4. - USER_INTERACTION_ACTIVE = 4 - end - - # Scope. - module Scope - # Unspecified. - SCOPE_UNSPECIFIED = 0 - - # Scope: Unchanged (S:U). Defined in CVSS v3. - SCOPE_UNCHANGED = 1 - - # Scope: Changed (S:C). Defined in CVSS v3. - SCOPE_CHANGED = 2 - end - - # Impact. - module Impact - # Unspecified. - IMPACT_UNSPECIFIED = 0 - - # High impact (H). Defined in CVSS v3, v4. - IMPACT_HIGH = 1 - - # Low impact (L). Defined in CVSS v3, v4. - IMPACT_LOW = 2 - - # No impact (N). Defined in CVSS v2, v3, v4. - IMPACT_NONE = 3 - - # Partial impact (P). Defined in CVSS v2. - IMPACT_PARTIAL = 4 - - # Complete impact (C). Defined in CVSS v2. - IMPACT_COMPLETE = 5 - end - - # Attack Requirements. - module AttackRequirements - # Unspecified. - ATTACK_REQUIREMENTS_UNSPECIFIED = 0 - - # No attack requirements (AT:N). Defined in CVSS v4. - ATTACK_REQUIREMENTS_NONE = 1 - - # Attack requirements: Present (AT:P). Defined in CVSS v4. - ATTACK_REQUIREMENTS_PRESENT = 2 - end - - # Exploit Maturity (E). Defined in CVSS v4. - module ExploitMaturity - # Unspecified. - EXPLOIT_MATURITY_UNSPECIFIED = 0 - - # Exploit maturity: Not defined (E:X). Defined in CVSS v4. - EXPLOIT_MATURITY_NOT_DEFINED = 1 - - # Exploit maturity: Attacked (E:A). Defined in CVSS v4. - EXPLOIT_MATURITY_ATTACKED = 2 - - # Exploit maturity: Proof-of-concept (E:P). Defined in CVSS v4. - EXPLOIT_MATURITY_POC = 3 - - # Exploit maturity: Unreported (E:U). Defined in CVSS v4. - EXPLOIT_MATURITY_UNREPORTED = 4 - end - end - - # CVSS Version. - module CVSSVersion - # Unspecified. - CVSS_VERSION_UNSPECIFIED = 0 - - # CVSS v2. - CVSS_VERSION_2 = 1 - - # CVSS v3. - CVSS_VERSION_3 = 2 - - # CVSS v4. - CVSS_VERSION_4 = 3 - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/deployment.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/deployment.rb deleted file mode 100644 index 0ac1498fd779..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/deployment.rb +++ /dev/null @@ -1,74 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Grafeas - module V1 - # An artifact that can be deployed in some runtime. - # @!attribute [rw] resource_uri - # @return [::Array<::String>] - # Required. Resource URI for the artifact being deployed. - class DeploymentNote - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The period during which some deployable was active in a runtime. - # @!attribute [rw] user_email - # @return [::String] - # Identity of the user that triggered this deployment. - # @!attribute [rw] deploy_time - # @return [::Google::Protobuf::Timestamp] - # Required. Beginning of the lifetime of this deployment. - # @!attribute [rw] undeploy_time - # @return [::Google::Protobuf::Timestamp] - # End of the lifetime of this deployment. - # @!attribute [rw] config - # @return [::String] - # Configuration used to create this deployment. - # @!attribute [rw] address - # @return [::String] - # Address of the runtime element hosting this deployment. - # @!attribute [rw] resource_uri - # @return [::Array<::String>] - # Output only. Resource URI for the artifact being deployed taken from - # the deployable field with the same name. - # @!attribute [rw] platform - # @return [::Grafeas::V1::DeploymentOccurrence::Platform] - # Platform hosting this deployment. - class DeploymentOccurrence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Types of platforms. - module Platform - # Unknown. - PLATFORM_UNSPECIFIED = 0 - - # Google Container Engine. - GKE = 1 - - # Google App Engine: Flexible Environment. - FLEX = 2 - - # Custom user-defined platform. - CUSTOM = 3 - end - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/discovery.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/discovery.rb deleted file mode 100644 index afc178d1339c..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/discovery.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 Grafeas - module V1 - # A note that indicates a type of analysis a provider would perform. This note - # exists in a provider's project. A `Discovery` occurrence is created in a - # consumer's project at the start of analysis. - # @!attribute [rw] analysis_kind - # @return [::Grafeas::V1::NoteKind] - # Required. Immutable. The kind of analysis that is handled by this - # discovery. - class DiscoveryNote - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides information about the analysis status of a discovered resource. - # @!attribute [rw] continuous_analysis - # @return [::Grafeas::V1::DiscoveryOccurrence::ContinuousAnalysis] - # Whether the resource is continuously analyzed. - # @!attribute [rw] analysis_status - # @return [::Grafeas::V1::DiscoveryOccurrence::AnalysisStatus] - # The status of discovery for the resource. - # @!attribute [rw] analysis_completed - # @return [::Grafeas::V1::DiscoveryOccurrence::AnalysisCompleted] - # @!attribute [rw] analysis_error - # @return [::Array<::Google::Rpc::Status>] - # Indicates any errors encountered during analysis of a resource. There - # could be 0 or more of these errors. - # @!attribute [rw] analysis_status_error - # @return [::Google::Rpc::Status] - # When an error is encountered this will contain a LocalizedMessage under - # details to show to the user. The LocalizedMessage is output only and - # populated by the API. - # @!attribute [rw] cpe - # @return [::String] - # The CPE of the resource being scanned. - # @!attribute [rw] last_scan_time - # @return [::Google::Protobuf::Timestamp] - # The last time this resource was scanned. - # @!attribute [r] archive_time - # @return [::Google::Protobuf::Timestamp] - # The time occurrences related to this discovery occurrence were archived. - # @!attribute [rw] sbom_status - # @return [::Grafeas::V1::DiscoveryOccurrence::SBOMStatus] - # The status of an SBOM generation. - # @!attribute [rw] vulnerability_attestation - # @return [::Grafeas::V1::DiscoveryOccurrence::VulnerabilityAttestation] - # The status of an vulnerability attestation generation. - # @!attribute [rw] files - # @return [::Array<::Grafeas::V1::DiscoveryOccurrence::File>] - # Files that make up the resource described by the occurrence. - # @!attribute [rw] last_vulnerability_update_time - # @return [::Google::Protobuf::Timestamp] - # The last time vulnerability scan results changed. - class DiscoveryOccurrence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates which analysis completed successfully. Multiple types of - # analysis can be performed on a single resource. - # @!attribute [rw] analysis_type - # @return [::Array<::String>] - class AnalysisCompleted - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The status of an SBOM generation. - # @!attribute [rw] sbom_state - # @return [::Grafeas::V1::DiscoveryOccurrence::SBOMStatus::SBOMState] - # The progress of the SBOM generation. - # @!attribute [rw] error - # @return [::String] - # If there was an error generating an SBOM, this will indicate what that - # error was. - class SBOMStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An enum indicating the progress of the SBOM generation. - module SBOMState - # Default unknown state. - SBOM_STATE_UNSPECIFIED = 0 - - # SBOM scanning is pending. - PENDING = 1 - - # SBOM scanning has completed. - COMPLETE = 2 - end - end - - # The status of an vulnerability attestation generation. - # @!attribute [rw] last_attempt_time - # @return [::Google::Protobuf::Timestamp] - # The last time we attempted to generate an attestation. - # @!attribute [rw] state - # @return [::Grafeas::V1::DiscoveryOccurrence::VulnerabilityAttestation::VulnerabilityAttestationState] - # The success/failure state of the latest attestation attempt. - # @!attribute [rw] error - # @return [::String] - # If failure, the error reason for why the attestation generation failed. - class VulnerabilityAttestation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An enum indicating the state of the attestation generation. - module VulnerabilityAttestationState - # Default unknown state. - VULNERABILITY_ATTESTATION_STATE_UNSPECIFIED = 0 - - # Attestation was successfully generated and stored. - SUCCESS = 1 - - # Attestation was unsuccessfully generated and stored. - FAILURE = 2 - end - end - - # @!attribute [rw] name - # @return [::String] - # @!attribute [rw] digest - # @return [::Google::Protobuf::Map{::String => ::String}] - class File - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class DigestEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Whether the resource is continuously analyzed. - module ContinuousAnalysis - # Unknown. - CONTINUOUS_ANALYSIS_UNSPECIFIED = 0 - - # The resource is continuously analyzed. - ACTIVE = 1 - - # The resource is ignored for continuous analysis. - INACTIVE = 2 - end - - # Analysis status for a resource. Currently for initial analysis only (not - # updated in continuous analysis). - module AnalysisStatus - # Unknown. - ANALYSIS_STATUS_UNSPECIFIED = 0 - - # Resource is known but no action has been taken yet. - PENDING = 1 - - # Resource is being analyzed. - SCANNING = 2 - - # Analysis has finished successfully. - FINISHED_SUCCESS = 3 - - # Analysis has completed. - COMPLETE = 3 - - # Analysis has finished unsuccessfully, the analysis itself is in a bad - # state. - FINISHED_FAILED = 4 - - # The resource is known not to be supported. - FINISHED_UNSUPPORTED = 5 - end - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/dsse_attestation.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/dsse_attestation.rb deleted file mode 100644 index 322be7281007..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/dsse_attestation.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! - - -module Grafeas - module V1 - # @!attribute [rw] hint - # @return [::Grafeas::V1::DSSEAttestationNote::DSSEHint] - # DSSEHint hints at the purpose of the attestation authority. - class DSSEAttestationNote - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # This submessage provides human-readable hints about the purpose of the - # authority. Because the name of a note acts as its resource reference, it is - # important to disambiguate the canonical name of the Note (which might be a - # UUID for security purposes) from "readable" names more suitable for debug - # output. Note that these hints should not be used to look up authorities in - # security sensitive contexts, such as when looking up attestations to - # verify. - # @!attribute [rw] human_readable_name - # @return [::String] - # Required. The human readable name of this attestation authority, for - # example "cloudbuild-prod". - class DSSEHint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Deprecated. Prefer to use a regular Occurrence, and populate the - # Envelope at the top level of the Occurrence. - # @!attribute [rw] envelope - # @return [::Grafeas::V1::Envelope] - # If doing something security critical, make sure to verify the signatures in - # this metadata. - # @!attribute [rw] statement - # @return [::Grafeas::V1::InTotoStatement] - class DSSEAttestationOccurrence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/grafeas.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/grafeas.rb deleted file mode 100644 index e9e28629e628..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/grafeas.rb +++ /dev/null @@ -1,510 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Grafeas - module V1 - # An instance of an analysis type that has been found on a resource. - # @!attribute [rw] name - # @return [::String] - # Output only. The name of the occurrence in the form of - # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - # @!attribute [rw] resource_uri - # @return [::String] - # Required. Immutable. A URI that represents the resource for which the - # occurrence applies. For example, - # `https://gcr.io/project/image@sha256:123abc` for a Docker image. - # @!attribute [rw] note_name - # @return [::String] - # Required. Immutable. The analysis note associated with this occurrence, in - # the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be - # used as a filter in list requests. - # @!attribute [rw] kind - # @return [::Grafeas::V1::NoteKind] - # Output only. This explicitly denotes which of the occurrence details are - # specified. This field can be used as a filter in list requests. - # @!attribute [rw] remediation - # @return [::String] - # A description of actions that can be taken to remedy the note. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time this occurrence was created. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time this occurrence was last updated. - # @!attribute [rw] vulnerability - # @return [::Grafeas::V1::VulnerabilityOccurrence] - # Describes a security vulnerability. - # - # Note: The following fields are mutually exclusive: `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] build - # @return [::Grafeas::V1::BuildOccurrence] - # Describes a verifiable build. - # - # Note: The following fields are mutually exclusive: `build`, `vulnerability`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image - # @return [::Grafeas::V1::ImageOccurrence] - # Describes how this resource derives from the basis in the associated - # note. - # - # Note: The following fields are mutually exclusive: `image`, `vulnerability`, `build`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] package - # @return [::Grafeas::V1::PackageOccurrence] - # Describes the installation of a package on the linked resource. - # - # Note: The following fields are mutually exclusive: `package`, `vulnerability`, `build`, `image`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] deployment - # @return [::Grafeas::V1::DeploymentOccurrence] - # Describes the deployment of an artifact on a runtime. - # - # Note: The following fields are mutually exclusive: `deployment`, `vulnerability`, `build`, `image`, `package`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] discovery - # @return [::Grafeas::V1::DiscoveryOccurrence] - # Describes when a resource was discovered. - # - # Note: The following fields are mutually exclusive: `discovery`, `vulnerability`, `build`, `image`, `package`, `deployment`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] attestation - # @return [::Grafeas::V1::AttestationOccurrence] - # Describes an attestation of an artifact. - # - # Note: The following fields are mutually exclusive: `attestation`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `upgrade`, `compliance`, `dsse_attestation`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] upgrade - # @return [::Grafeas::V1::UpgradeOccurrence] - # Describes an available package upgrade on the linked resource. - # - # Note: The following fields are mutually exclusive: `upgrade`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `compliance`, `dsse_attestation`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] compliance - # @return [::Grafeas::V1::ComplianceOccurrence] - # Describes a compliance violation on a linked resource. - # - # Note: The following fields are mutually exclusive: `compliance`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `dsse_attestation`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] dsse_attestation - # @return [::Grafeas::V1::DSSEAttestationOccurrence] - # Describes an attestation of an artifact using dsse. - # - # Note: The following fields are mutually exclusive: `dsse_attestation`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sbom_reference - # @return [::Grafeas::V1::SBOMReferenceOccurrence] - # Describes a specific SBOM reference occurrences. - # - # Note: The following fields are mutually exclusive: `sbom_reference`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] secret - # @return [::Grafeas::V1::SecretOccurrence] - # Describes a secret. - # - # Note: The following fields are mutually exclusive: `secret`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `sbom_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] envelope - # @return [::Grafeas::V1::Envelope] - # https://github.com/secure-systems-lab/dsse - class Occurrence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A type of analysis that can be done for a resource. - # @!attribute [rw] name - # @return [::String] - # Output only. The name of the note in the form of - # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - # @!attribute [rw] short_description - # @return [::String] - # A one sentence description of this note. - # @!attribute [rw] long_description - # @return [::String] - # A detailed description of this note. - # @!attribute [rw] kind - # @return [::Grafeas::V1::NoteKind] - # Output only. The type of analysis. This field can be used as a filter in - # list requests. - # @!attribute [rw] related_url - # @return [::Array<::Grafeas::V1::RelatedUrl>] - # URLs associated with this note. - # @!attribute [rw] expiration_time - # @return [::Google::Protobuf::Timestamp] - # Time of expiration for this note. Empty if note does not expire. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time this note was created. This field can be used as a - # filter in list requests. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time this note was last updated. This field can be used as - # a filter in list requests. - # @!attribute [rw] related_note_names - # @return [::Array<::String>] - # Other notes related to this note. - # @!attribute [rw] vulnerability - # @return [::Grafeas::V1::VulnerabilityNote] - # A note describing a package vulnerability. - # - # Note: The following fields are mutually exclusive: `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `vulnerability_assessment`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] build - # @return [::Grafeas::V1::BuildNote] - # A note describing build provenance for a verifiable build. - # - # Note: The following fields are mutually exclusive: `build`, `vulnerability`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `vulnerability_assessment`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image - # @return [::Grafeas::V1::ImageNote] - # A note describing a base image. - # - # Note: The following fields are mutually exclusive: `image`, `vulnerability`, `build`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `vulnerability_assessment`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] package - # @return [::Grafeas::V1::PackageNote] - # A note describing a package hosted by various package managers. - # - # Note: The following fields are mutually exclusive: `package`, `vulnerability`, `build`, `image`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `vulnerability_assessment`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] deployment - # @return [::Grafeas::V1::DeploymentNote] - # A note describing something that can be deployed. - # - # Note: The following fields are mutually exclusive: `deployment`, `vulnerability`, `build`, `image`, `package`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `vulnerability_assessment`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] discovery - # @return [::Grafeas::V1::DiscoveryNote] - # A note describing the initial analysis of a resource. - # - # Note: The following fields are mutually exclusive: `discovery`, `vulnerability`, `build`, `image`, `package`, `deployment`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `vulnerability_assessment`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] attestation - # @return [::Grafeas::V1::AttestationNote] - # A note describing an attestation role. - # - # Note: The following fields are mutually exclusive: `attestation`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `upgrade`, `compliance`, `dsse_attestation`, `vulnerability_assessment`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] upgrade - # @return [::Grafeas::V1::UpgradeNote] - # A note describing available package upgrades. - # - # Note: The following fields are mutually exclusive: `upgrade`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `compliance`, `dsse_attestation`, `vulnerability_assessment`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] compliance - # @return [::Grafeas::V1::ComplianceNote] - # A note describing a compliance check. - # - # Note: The following fields are mutually exclusive: `compliance`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `dsse_attestation`, `vulnerability_assessment`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] dsse_attestation - # @return [::Grafeas::V1::DSSEAttestationNote] - # A note describing a dsse attestation note. - # - # Note: The following fields are mutually exclusive: `dsse_attestation`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `vulnerability_assessment`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] vulnerability_assessment - # @return [::Grafeas::V1::VulnerabilityAssessmentNote] - # A note describing a vulnerability assessment. - # - # Note: The following fields are mutually exclusive: `vulnerability_assessment`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `sbom_reference`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sbom_reference - # @return [::Grafeas::V1::SBOMReferenceNote] - # A note describing an SBOM reference. - # - # Note: The following fields are mutually exclusive: `sbom_reference`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `vulnerability_assessment`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] secret - # @return [::Grafeas::V1::SecretNote] - # A note describing a secret. - # - # Note: The following fields are mutually exclusive: `secret`, `vulnerability`, `build`, `image`, `package`, `deployment`, `discovery`, `attestation`, `upgrade`, `compliance`, `dsse_attestation`, `vulnerability_assessment`, `sbom_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Note - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get an occurrence. - # @!attribute [rw] name - # @return [::String] - # The name of the occurrence in the form of - # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - class GetOccurrenceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list occurrences. - # @!attribute [rw] parent - # @return [::String] - # The name of the project to list occurrences for in the form of - # `projects/[PROJECT_ID]`. - # @!attribute [rw] filter - # @return [::String] - # The filter expression. - # @!attribute [rw] page_size - # @return [::Integer] - # Number of occurrences to return in the list. Must be positive. Max allowed - # page size is 1000. If not specified, page size defaults to 20. - # @!attribute [rw] page_token - # @return [::String] - # Token to provide to skip to a particular spot in the list. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # If set, the request will return all reachable Occurrences - # and report all unreachable regions in the `unreachable` field in - # the response. - # - # Only applicable for requests in the global region. - class ListOccurrencesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for listing occurrences. - # @!attribute [rw] occurrences - # @return [::Array<::Grafeas::V1::Occurrence>] - # The occurrences requested. - # @!attribute [rw] next_page_token - # @return [::String] - # The next pagination token in the list response. It should be used as - # `page_token` for the following request. An empty value means no more - # results. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable regions. Populated for requests from the global region - # when `return_partial_success` is set. - # - # Format: `projects/[PROJECT_ID]/locations/[LOCATION]` - class ListOccurrencesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to delete an occurrence. - # @!attribute [rw] name - # @return [::String] - # The name of the occurrence in the form of - # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - class DeleteOccurrenceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to create a new occurrence. - # @!attribute [rw] parent - # @return [::String] - # The name of the project in the form of `projects/[PROJECT_ID]`, under which - # the occurrence is to be created. - # @!attribute [rw] occurrence - # @return [::Grafeas::V1::Occurrence] - # The occurrence to create. - class CreateOccurrenceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to update an occurrence. - # @!attribute [rw] name - # @return [::String] - # The name of the occurrence in the form of - # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - # @!attribute [rw] occurrence - # @return [::Grafeas::V1::Occurrence] - # The updated occurrence. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The fields to update. - class UpdateOccurrenceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get a note. - # @!attribute [rw] name - # @return [::String] - # The name of the note in the form of - # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - class GetNoteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get the note to which the specified occurrence is attached. - # @!attribute [rw] name - # @return [::String] - # The name of the occurrence in the form of - # `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - class GetOccurrenceNoteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list notes. - # @!attribute [rw] parent - # @return [::String] - # The name of the project to list notes for in the form of - # `projects/[PROJECT_ID]`. - # @!attribute [rw] filter - # @return [::String] - # The filter expression. - # @!attribute [rw] page_size - # @return [::Integer] - # Number of notes to return in the list. Must be positive. Max allowed page - # size is 1000. If not specified, page size defaults to 20. - # @!attribute [rw] page_token - # @return [::String] - # Token to provide to skip to a particular spot in the list. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # If set, the request will return all reachable Notes - # and report all unreachable regions in the `unreachable` field in - # the response. - # - # Only applicable for requests in the global region. - class ListNotesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for listing notes. - # @!attribute [rw] notes - # @return [::Array<::Grafeas::V1::Note>] - # The notes requested. - # @!attribute [rw] next_page_token - # @return [::String] - # The next pagination token in the list response. It should be used as - # `page_token` for the following request. An empty value means no more - # results. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable regions. Populated for requests from the global region - # when `return_partial_success` is set. - # - # Format: `projects/[PROJECT_ID]/locations/[LOCATION]` - class ListNotesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to delete a note. - # @!attribute [rw] name - # @return [::String] - # The name of the note in the form of - # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - class DeleteNoteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to create a new note. - # @!attribute [rw] parent - # @return [::String] - # The name of the project in the form of `projects/[PROJECT_ID]`, under which - # the note is to be created. - # @!attribute [rw] note_id - # @return [::String] - # The ID to use for this note. - # @!attribute [rw] note - # @return [::Grafeas::V1::Note] - # The note to create. - class CreateNoteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to update a note. - # @!attribute [rw] name - # @return [::String] - # The name of the note in the form of - # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - # @!attribute [rw] note - # @return [::Grafeas::V1::Note] - # The updated note. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The fields to update. - class UpdateNoteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list occurrences for a note. - # @!attribute [rw] name - # @return [::String] - # The name of the note to list occurrences for in the form of - # `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - # @!attribute [rw] filter - # @return [::String] - # The filter expression. - # @!attribute [rw] page_size - # @return [::Integer] - # Number of occurrences to return in the list. - # @!attribute [rw] page_token - # @return [::String] - # Token to provide to skip to a particular spot in the list. - class ListNoteOccurrencesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for listing occurrences for a note. - # @!attribute [rw] occurrences - # @return [::Array<::Grafeas::V1::Occurrence>] - # The occurrences attached to the specified note. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to provide to skip to a particular spot in the list. - class ListNoteOccurrencesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to create notes in batch. - # @!attribute [rw] parent - # @return [::String] - # The name of the project in the form of `projects/[PROJECT_ID]`, under which - # the notes are to be created. - # @!attribute [rw] notes - # @return [::Google::Protobuf::Map{::String => ::Grafeas::V1::Note}] - # The notes to create. Max allowed length is 1000. - class BatchCreateNotesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Grafeas::V1::Note] - class NotesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Response for creating notes in batch. - # @!attribute [rw] notes - # @return [::Array<::Grafeas::V1::Note>] - # The notes that were created. - class BatchCreateNotesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to create occurrences in batch. - # @!attribute [rw] parent - # @return [::String] - # The name of the project in the form of `projects/[PROJECT_ID]`, under which - # the occurrences are to be created. - # @!attribute [rw] occurrences - # @return [::Array<::Grafeas::V1::Occurrence>] - # The occurrences to create. Max allowed length is 1000. - class BatchCreateOccurrencesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for creating occurrences in batch. - # @!attribute [rw] occurrences - # @return [::Array<::Grafeas::V1::Occurrence>] - # The occurrences that were created. - class BatchCreateOccurrencesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/image.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/image.rb deleted file mode 100644 index 546d369f44fc..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/image.rb +++ /dev/null @@ -1,95 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Grafeas - module V1 - # Layer holds metadata specific to a layer of a Docker image. - # @!attribute [rw] directive - # @return [::String] - # Required. The recovered Dockerfile directive used to construct this layer. - # See https://docs.docker.com/engine/reference/builder/ for more information. - # @!attribute [rw] arguments - # @return [::String] - # The recovered arguments to the Dockerfile directive. - class Layer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A set of properties that uniquely identify a given Docker image. - # @!attribute [rw] v1_name - # @return [::String] - # Required. The layer ID of the final layer in the Docker image's v1 - # representation. - # @!attribute [rw] v2_blob - # @return [::Array<::String>] - # Required. The ordered list of v2 blobs that represent a given image. - # @!attribute [rw] v2_name - # @return [::String] - # Output only. The name of the image's v2 blobs computed via: - # [bottom] := v2_blob[bottom] - # [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) - # Only the name of the final blob is kept. - class Fingerprint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Basis describes the base image portion (Note) of the DockerImage - # relationship. Linked occurrences are derived from this or an equivalent image - # via: - # FROM - # Or an equivalent reference, e.g., a tag of the resource_url. - # @!attribute [rw] resource_url - # @return [::String] - # Required. Immutable. The resource_url for the resource representing the - # basis of associated occurrence images. - # @!attribute [rw] fingerprint - # @return [::Grafeas::V1::Fingerprint] - # Required. Immutable. The fingerprint of the base image. - class ImageNote - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of the derived image portion of the DockerImage relationship. This - # image would be produced from a Dockerfile with FROM . - # @!attribute [rw] fingerprint - # @return [::Grafeas::V1::Fingerprint] - # Required. The fingerprint of the derived image. - # @!attribute [rw] distance - # @return [::Integer] - # Output only. The number of layers by which this image differs from the - # associated image basis. - # @!attribute [rw] layer_info - # @return [::Array<::Grafeas::V1::Layer>] - # This contains layer-specific metadata, if populated it has length - # "distance" and is ordered with [distance] being the layer immediately - # following the base image and [1] being the final layer. - # @!attribute [rw] base_resource_url - # @return [::String] - # Output only. This contains the base image URL for the derived image - # occurrence. - class ImageOccurrence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/intoto_provenance.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/intoto_provenance.rb deleted file mode 100644 index c808aee223da..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/intoto_provenance.rb +++ /dev/null @@ -1,134 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Grafeas - module V1 - # Steps taken to build the artifact. - # For a TaskRun, typically each container corresponds to one step in the - # recipe. - # @!attribute [rw] type - # @return [::String] - # URI indicating what type of recipe was performed. It determines the meaning - # of recipe.entryPoint, recipe.arguments, recipe.environment, and materials. - # @!attribute [rw] defined_in_material - # @return [::Integer] - # Index in materials containing the recipe steps that are not implied by - # recipe.type. For example, if the recipe type were "make", then this would - # point to the source containing the Makefile, not the make program itself. - # Set to -1 if the recipe doesn't come from a material, as zero is default - # unset value for int64. - # @!attribute [rw] entry_point - # @return [::String] - # String identifying the entry point into the build. - # This is often a path to a configuration file and/or a target label within - # that file. The syntax and meaning are defined by recipe.type. For example, - # if the recipe type were "make", then this would reference the directory in - # which to run make as well as which target to use. - # @!attribute [rw] arguments - # @return [::Array<::Google::Protobuf::Any>] - # Collection of all external inputs that influenced the build on top of - # recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe - # type were "make", then this might be the flags passed to make aside from - # the target, which is captured in recipe.entryPoint. Since the arguments - # field can greatly vary in structure, depending on the builder and recipe - # type, this is of form "Any". - # @!attribute [rw] environment - # @return [::Array<::Google::Protobuf::Any>] - # Any other builder-controlled inputs necessary for correctly evaluating the - # recipe. Usually only needed for reproducing the build but not evaluated as - # part of policy. Since the environment field can greatly vary in structure, - # depending on the builder and recipe type, this is of form "Any". - class Recipe - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Indicates that the builder claims certain fields in this message to be - # complete. - # @!attribute [rw] arguments - # @return [::Boolean] - # If true, the builder claims that recipe.arguments is complete, meaning that - # all external inputs are properly captured in the recipe. - # @!attribute [rw] environment - # @return [::Boolean] - # If true, the builder claims that recipe.environment is claimed to be - # complete. - # @!attribute [rw] materials - # @return [::Boolean] - # If true, the builder claims that materials are complete, usually through - # some controls to prevent network access. Sometimes called "hermetic". - class Completeness - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Other properties of the build. - # @!attribute [rw] build_invocation_id - # @return [::String] - # Identifies the particular build invocation, which can be useful for finding - # associated logs or other ad-hoc analysis. The value SHOULD be globally - # unique, per in-toto Provenance spec. - # @!attribute [rw] build_started_on - # @return [::Google::Protobuf::Timestamp] - # The timestamp of when the build started. - # @!attribute [rw] build_finished_on - # @return [::Google::Protobuf::Timestamp] - # The timestamp of when the build completed. - # @!attribute [rw] completeness - # @return [::Grafeas::V1::Completeness] - # Indicates that the builder claims certain fields in this message to be - # complete. - # @!attribute [rw] reproducible - # @return [::Boolean] - # If true, the builder claims that running the recipe on materials will - # produce bit-for-bit identical output. - class Metadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] id - # @return [::String] - class BuilderConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] builder_config - # @return [::Grafeas::V1::BuilderConfig] - # @!attribute [rw] recipe - # @return [::Grafeas::V1::Recipe] - # Identifies the configuration used for the build. - # When combined with materials, this SHOULD fully describe the build, - # such that re-running this recipe results in bit-for-bit identical output - # (if the build is reproducible). - # @!attribute [rw] metadata - # @return [::Grafeas::V1::Metadata] - # @!attribute [rw] materials - # @return [::Array<::String>] - # The collection of artifacts that influenced the build including sources, - # dependencies, build tools, base images, and so on. This is considered to be - # incomplete unless metadata.completeness.materials is true. Unset or null is - # equivalent to empty. - class InTotoProvenance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/intoto_statement.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/intoto_statement.rb deleted file mode 100644 index 290e99770158..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/intoto_statement.rb +++ /dev/null @@ -1,189 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Grafeas - module V1 - # Spec defined at - # https://github.com/in-toto/attestation/tree/main/spec#statement The - # serialized InTotoStatement will be stored as Envelope.payload. - # Envelope.payloadType is always "application/vnd.in-toto+json". - # @!attribute [rw] type - # @return [::String] - # Always `https://in-toto.io/Statement/v0.1`. - # @!attribute [rw] subject - # @return [::Array<::Grafeas::V1::Subject>] - # @!attribute [rw] predicate_type - # @return [::String] - # `https://slsa.dev/provenance/v0.1` for SlsaProvenance. - # @!attribute [rw] provenance - # @return [::Grafeas::V1::InTotoProvenance] - # Note: The following fields are mutually exclusive: `provenance`, `slsa_provenance`, `slsa_provenance_zero_two`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] slsa_provenance - # @return [::Grafeas::V1::SlsaProvenance] - # Note: The following fields are mutually exclusive: `slsa_provenance`, `provenance`, `slsa_provenance_zero_two`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] slsa_provenance_zero_two - # @return [::Grafeas::V1::SlsaProvenanceZeroTwo] - # Note: The following fields are mutually exclusive: `slsa_provenance_zero_two`, `provenance`, `slsa_provenance`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class InTotoStatement - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] name - # @return [::String] - # @!attribute [rw] digest - # @return [::Google::Protobuf::Map{::String => ::String}] - # `"": ""` - # Algorithms can be e.g. sha256, sha512 - # See - # https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet - class Subject - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class DigestEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] type - # @return [::String] - # InToto spec defined at - # https://github.com/in-toto/attestation/tree/main/spec#statement - # @!attribute [rw] subject - # @return [::Array<::Grafeas::V1::Subject>] - # @!attribute [rw] predicate_type - # @return [::String] - # @!attribute [rw] predicate - # @return [::Grafeas::V1::InTotoSlsaProvenanceV1::SlsaProvenanceV1] - class InTotoSlsaProvenanceV1 - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Keep in sync with schema at - # https://github.com/slsa-framework/slsa/blob/main/docs/provenance/schema/v1/provenance.proto - # Builder renamed to ProvenanceBuilder because of Java conflicts. - # @!attribute [rw] build_definition - # @return [::Grafeas::V1::InTotoSlsaProvenanceV1::BuildDefinition] - # @!attribute [rw] run_details - # @return [::Grafeas::V1::InTotoSlsaProvenanceV1::RunDetails] - class SlsaProvenanceV1 - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] build_type - # @return [::String] - # @!attribute [rw] external_parameters - # @return [::Google::Protobuf::Struct] - # @!attribute [rw] internal_parameters - # @return [::Google::Protobuf::Struct] - # @!attribute [rw] resolved_dependencies - # @return [::Array<::Grafeas::V1::InTotoSlsaProvenanceV1::ResourceDescriptor>] - class BuildDefinition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] name - # @return [::String] - # @!attribute [rw] uri - # @return [::String] - # @!attribute [rw] digest - # @return [::Google::Protobuf::Map{::String => ::String}] - # @!attribute [rw] content - # @return [::String] - # @!attribute [rw] download_location - # @return [::String] - # @!attribute [rw] media_type - # @return [::String] - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class DigestEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] builder - # @return [::Grafeas::V1::InTotoSlsaProvenanceV1::ProvenanceBuilder] - # @!attribute [rw] metadata - # @return [::Grafeas::V1::InTotoSlsaProvenanceV1::BuildMetadata] - # @!attribute [rw] byproducts - # @return [::Array<::Grafeas::V1::InTotoSlsaProvenanceV1::ResourceDescriptor>] - class RunDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] id - # @return [::String] - # @!attribute [rw] version - # @return [::Google::Protobuf::Map{::String => ::String}] - # @!attribute [rw] builder_dependencies - # @return [::Array<::Grafeas::V1::InTotoSlsaProvenanceV1::ResourceDescriptor>] - class ProvenanceBuilder - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class VersionEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] invocation_id - # @return [::String] - # @!attribute [rw] started_on - # @return [::Google::Protobuf::Timestamp] - # @!attribute [rw] finished_on - # @return [::Google::Protobuf::Timestamp] - class BuildMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/package.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/package.rb deleted file mode 100644 index 1b795022499a..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/package.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! - - -module Grafeas - module V1 - # This represents a particular channel of distribution for a given package. - # E.g., Debian's jessie-backports dpkg mirror. - # @!attribute [rw] cpe_uri - # @return [::String] - # The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - # denoting the package manager version distributing a package. - # @!attribute [rw] architecture - # @return [::Grafeas::V1::Architecture] - # The CPU architecture for which packages in this distribution channel were - # built. - # @!attribute [rw] latest_version - # @return [::Grafeas::V1::Version] - # The latest available version of this package in this distribution channel. - # @!attribute [rw] maintainer - # @return [::String] - # A freeform string denoting the maintainer of this package. - # @!attribute [rw] url - # @return [::String] - # The distribution channel-specific homepage for this package. - # @!attribute [rw] description - # @return [::String] - # The distribution channel-specific description of this package. - class Distribution - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An occurrence of a particular package installation found within a system's - # filesystem. E.g., glibc was found in `/var/lib/dpkg/status`. - # @!attribute [rw] cpe_uri - # @return [::String] - # Deprecated. - # The CPE URI in [CPE format](https://cpe.mitre.org/specification/) - # @!attribute [rw] version - # @return [::Grafeas::V1::Version] - # Deprecated. - # The version installed at this location. - # @!attribute [rw] path - # @return [::String] - # The path from which we gathered that this package/version is installed. - class Location - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # PackageNote represents a particular package version. - # @!attribute [rw] name - # @return [::String] - # The name of the package. - # @!attribute [rw] distribution - # @return [::Array<::Grafeas::V1::Distribution>] - # Deprecated. - # The various channels by which a package is distributed. - # @!attribute [rw] package_type - # @return [::String] - # The type of package; whether native or non native (e.g., ruby gems, - # node.js packages, etc.). - # @!attribute [rw] cpe_uri - # @return [::String] - # The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - # denoting the package manager version distributing a package. - # The cpe_uri will be blank for language packages. - # @!attribute [rw] architecture - # @return [::Grafeas::V1::Architecture] - # The CPU architecture for which packages in this distribution channel were - # built. Architecture will be blank for language packages. - # @!attribute [rw] version - # @return [::Grafeas::V1::Version] - # The version of the package. - # @!attribute [rw] maintainer - # @return [::String] - # A freeform text denoting the maintainer of this package. - # @!attribute [rw] url - # @return [::String] - # The homepage for this package. - # @!attribute [rw] description - # @return [::String] - # The description of this package. - # @!attribute [rw] license - # @return [::Grafeas::V1::License] - # Licenses that have been declared by the authors of the package. - # @!attribute [rw] digest - # @return [::Array<::Grafeas::V1::Digest>] - # Hash value, typically a file digest, that allows unique - # identification a specific package. - class PackageNote - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details on how a particular software package was installed on a system. - # @!attribute [r] name - # @return [::String] - # The name of the installed package. - # @!attribute [rw] location - # @return [::Array<::Grafeas::V1::Location>] - # All of the places within the filesystem versions of this package - # have been found. - # @!attribute [r] package_type - # @return [::String] - # The type of package; whether native or non native (e.g., ruby gems, - # node.js packages, etc.). - # @!attribute [r] cpe_uri - # @return [::String] - # The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - # denoting the package manager version distributing a package. - # The cpe_uri will be blank for language packages. - # @!attribute [r] architecture - # @return [::Grafeas::V1::Architecture] - # The CPU architecture for which packages in this distribution channel were - # built. Architecture will be blank for language packages. - # @!attribute [rw] license - # @return [::Grafeas::V1::License] - # Licenses that have been declared by the authors of the package. - # @!attribute [r] version - # @return [::Grafeas::V1::Version] - # The version of the package. - class PackageOccurrence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Version contains structured information about the version of a package. - # @!attribute [rw] epoch - # @return [::Integer] - # Used to correct mistakes in the version numbering scheme. - # @!attribute [rw] name - # @return [::String] - # Required only when version kind is NORMAL. The main part of the version - # name. - # @!attribute [rw] revision - # @return [::String] - # The iteration of the package build from the above version. - # @!attribute [rw] inclusive - # @return [::Boolean] - # Whether this version is specifying part of an inclusive range. Grafeas - # does not have the capability to specify version ranges; instead we have - # fields that specify start version and end versions. At times this is - # insufficient - we also need to specify whether the version is included in - # the range or is excluded from the range. This boolean is expected to be set - # to true when the version is included in a range. - # @!attribute [rw] kind - # @return [::Grafeas::V1::Version::VersionKind] - # Required. Distinguishes between sentinel MIN/MAX versions and normal - # versions. - # @!attribute [rw] full_name - # @return [::String] - # Human readable version string. This string is of the form - # :- and is only set when kind is NORMAL. - class Version - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Whether this is an ordinary package version or a sentinel MIN/MAX version. - module VersionKind - # Unknown. - VERSION_KIND_UNSPECIFIED = 0 - - # A standard package version. - NORMAL = 1 - - # A special version representing negative infinity. - MINIMUM = 2 - - # A special version representing positive infinity. - MAXIMUM = 3 - end - end - - # Instruction set architectures supported by various package managers. - module Architecture - # Unknown architecture. - ARCHITECTURE_UNSPECIFIED = 0 - - # X86 architecture. - X86 = 1 - - # X64 architecture. - X64 = 2 - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/provenance.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/provenance.rb deleted file mode 100644 index a7454aeaabbf..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/provenance.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 Grafeas - module V1 - # Provenance of a build. Contains all information needed to verify the full - # details about the build from source to completion. - # @!attribute [rw] id - # @return [::String] - # Required. Unique identifier of the build. - # @!attribute [rw] project_id - # @return [::String] - # ID of the project. - # @!attribute [rw] commands - # @return [::Array<::Grafeas::V1::Command>] - # Commands requested by the build. - # @!attribute [rw] built_artifacts - # @return [::Array<::Grafeas::V1::Artifact>] - # Output of the build. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Time at which the build was created. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Time at which execution of the build was started. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Time at which execution of the build was finished. - # @!attribute [rw] creator - # @return [::String] - # E-mail address of the user who initiated this build. Note that this was the - # user's e-mail address at the time the build was initiated; this address may - # not represent the same end-user for all time. - # @!attribute [rw] logs_uri - # @return [::String] - # URI where any logs for this provenance were written. - # @!attribute [rw] source_provenance - # @return [::Grafeas::V1::Source] - # Details of the Source input to the build. - # @!attribute [rw] trigger_id - # @return [::String] - # Trigger identifier if the build was triggered automatically; empty if not. - # @!attribute [rw] build_options - # @return [::Google::Protobuf::Map{::String => ::String}] - # Special options applied to this build. This is a catch-all field where - # build providers can enter any desired additional details. - # @!attribute [rw] builder_version - # @return [::String] - # Version string of the builder at the time this build was executed. - class BuildProvenance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class BuildOptionsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Source describes the location of the source used for the build. - # @!attribute [rw] artifact_storage_source_uri - # @return [::String] - # If provided, the input binary artifacts for the build came from this - # location. - # @!attribute [rw] file_hashes - # @return [::Google::Protobuf::Map{::String => ::Grafeas::V1::FileHashes}] - # Hash(es) of the build source, which can be used to verify that the original - # source integrity was maintained in the build. - # - # The keys to this map are file paths used as build source and the values - # contain the hash values for those files. - # - # If the build source came in a single package such as a gzipped tarfile - # (.tar.gz), the FileHash will be for the single path to that file. - # @!attribute [rw] context - # @return [::Grafeas::V1::SourceContext] - # If provided, the source code used for the build came from this location. - # @!attribute [rw] additional_contexts - # @return [::Array<::Grafeas::V1::SourceContext>] - # If provided, some of the source code used for the build may be found in - # these locations, in the case where the source repository had multiple - # remotes or submodules. This list will not include the context specified in - # the context field. - class Source - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Grafeas::V1::FileHashes] - class FileHashesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Container message for hashes of byte content of files, used in source - # messages to verify integrity of source input to the build. - # @!attribute [rw] file_hash - # @return [::Array<::Grafeas::V1::Hash>] - # Required. Collection of file hashes. - class FileHashes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Container message for hash values. - # @!attribute [rw] type - # @return [::String] - # Required. The type of hash that was performed, e.g. "SHA-256". - # @!attribute [rw] value - # @return [::String] - # Required. The hash value. - class Hash - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Command describes a step performed as part of the build pipeline. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the command, as presented on the command line, or if the - # command is packaged as a Docker container, as presented to `docker pull`. - # @!attribute [rw] env - # @return [::Array<::String>] - # Environment variables set before running this command. - # @!attribute [rw] args - # @return [::Array<::String>] - # Command-line arguments used when executing this command. - # @!attribute [rw] dir - # @return [::String] - # Working directory (relative to project source root) used when running this - # command. - # @!attribute [rw] id - # @return [::String] - # Optional unique identifier for this command, used in wait_for to reference - # this command as a dependency. - # @!attribute [rw] wait_for - # @return [::Array<::String>] - # The ID(s) of the command(s) that this command depends on. - class Command - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Artifact describes a build product. - # @!attribute [rw] checksum - # @return [::String] - # Hash or checksum value of a binary, or Docker Registry 2.0 digest of a - # container. - # @!attribute [rw] id - # @return [::String] - # Artifact ID, if any; for container images, this will be a URL by digest - # like `gcr.io/projectID/imagename@sha256:123456`. - # @!attribute [rw] names - # @return [::Array<::String>] - # Related artifact names. This may be the path to a binary or jar file, or in - # the case of a container build, the name used to push the container image to - # Google Container Registry, as presented to `docker push`. Note that a - # single Artifact ID can have multiple names, for example if two tags are - # applied to one image. - class Artifact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A SourceContext is a reference to a tree of files. A SourceContext together - # with a path point to a unique revision of a single file or directory. - # @!attribute [rw] cloud_repo - # @return [::Grafeas::V1::CloudRepoSourceContext] - # A SourceContext referring to a revision in a Google Cloud Source Repo. - # - # Note: The following fields are mutually exclusive: `cloud_repo`, `gerrit`, `git`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gerrit - # @return [::Grafeas::V1::GerritSourceContext] - # A SourceContext referring to a Gerrit project. - # - # Note: The following fields are mutually exclusive: `gerrit`, `cloud_repo`, `git`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] git - # @return [::Grafeas::V1::GitSourceContext] - # A SourceContext referring to any third party Git repo (e.g., GitHub). - # - # Note: The following fields are mutually exclusive: `git`, `cloud_repo`, `gerrit`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels with user defined metadata. - class SourceContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # An alias to a repo revision. - # @!attribute [rw] kind - # @return [::Grafeas::V1::AliasContext::Kind] - # The alias kind. - # @!attribute [rw] name - # @return [::String] - # The alias name. - class AliasContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of an alias. - module Kind - # Unknown. - KIND_UNSPECIFIED = 0 - - # Git tag. - FIXED = 1 - - # Git branch. - MOVABLE = 2 - - # Used to specify non-standard aliases. For example, if a Git repo has a - # ref named "refs/foo/bar". - OTHER = 4 - end - end - - # A CloudRepoSourceContext denotes a particular revision in a Google Cloud - # Source Repo. - # @!attribute [rw] repo_id - # @return [::Grafeas::V1::RepoId] - # The ID of the repo. - # @!attribute [rw] revision_id - # @return [::String] - # A revision ID. - # - # Note: The following fields are mutually exclusive: `revision_id`, `alias_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] alias_context - # @return [::Grafeas::V1::AliasContext] - # An alias, which may be a branch or tag. - # - # Note: The following fields are mutually exclusive: `alias_context`, `revision_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class CloudRepoSourceContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A SourceContext referring to a Gerrit project. - # @!attribute [rw] host_uri - # @return [::String] - # The URI of a running Gerrit instance. - # @!attribute [rw] gerrit_project - # @return [::String] - # The full project name within the host. Projects may be nested, so - # "project/subproject" is a valid project name. The "repo name" is the - # hostURI/project. - # @!attribute [rw] revision_id - # @return [::String] - # A revision (commit) ID. - # - # Note: The following fields are mutually exclusive: `revision_id`, `alias_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] alias_context - # @return [::Grafeas::V1::AliasContext] - # An alias, which may be a branch or tag. - # - # Note: The following fields are mutually exclusive: `alias_context`, `revision_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class GerritSourceContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A GitSourceContext denotes a particular revision in a third party Git - # repository (e.g., GitHub). - # @!attribute [rw] url - # @return [::String] - # Git repository URL. - # @!attribute [rw] revision_id - # @return [::String] - # Git commit hash. - class GitSourceContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A unique identifier for a Cloud Repo. - # @!attribute [rw] project_repo_id - # @return [::Grafeas::V1::ProjectRepoId] - # A combination of a project ID and a repo name. - # - # Note: The following fields are mutually exclusive: `project_repo_id`, `uid`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] uid - # @return [::String] - # A server-assigned, globally unique identifier. - # - # Note: The following fields are mutually exclusive: `uid`, `project_repo_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class RepoId - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Selects a repo using a Google Cloud Platform project ID (e.g., - # winged-cargo-31) and a repo name within that project. - # @!attribute [rw] project_id - # @return [::String] - # The ID of the project. - # @!attribute [rw] repo_name - # @return [::String] - # The name of the repo. Leave empty for the default repo. - class ProjectRepoId - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/risk.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/risk.rb deleted file mode 100644 index 368497cf719b..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/risk.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! - - -module Grafeas - module V1 - # @!attribute [rw] cisa_kev - # @return [::Grafeas::V1::CISAKnownExploitedVulnerabilities] - # CISA maintains the authoritative source of vulnerabilities that have been - # exploited in the wild. - # @!attribute [rw] epss - # @return [::Grafeas::V1::ExploitPredictionScoringSystem] - # The Exploit Prediction Scoring System (EPSS) estimates the likelihood - # (probability) that a software vulnerability will be exploited in the wild. - class Risk - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] known_ransomware_campaign_use - # @return [::String] - # Whether the vulnerability is known to have been leveraged as part of a - # ransomware campaign. - class CISAKnownExploitedVulnerabilities - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] percentile - # @return [::Float] - # The percentile of the current score, the proportion of all scored - # vulnerabilities with the same or a lower EPSS score - # @!attribute [rw] score - # @return [::Float] - # The EPSS score representing the probability [0-1] of exploitation in the - # wild in the next 30 days - class ExploitPredictionScoringSystem - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/sbom.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/sbom.rb deleted file mode 100644 index c058bcfa65f6..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/sbom.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Grafeas - module V1 - # The note representing an SBOM reference. - # @!attribute [rw] format - # @return [::String] - # The format that SBOM takes. E.g. may be spdx, cyclonedx, etc... - # @!attribute [rw] version - # @return [::String] - # The version of the format that the SBOM takes. E.g. if the format - # is spdx, the version may be 2.3. - class SBOMReferenceNote - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The occurrence representing an SBOM reference as applied to a specific - # resource. The occurrence follows the DSSE specification. See - # https://github.com/secure-systems-lab/dsse/blob/master/envelope.md for more - # details. - # @!attribute [rw] payload - # @return [::Grafeas::V1::SbomReferenceIntotoPayload] - # The actual payload that contains the SBOM reference data. - # @!attribute [rw] payload_type - # @return [::String] - # The kind of payload that SbomReferenceIntotoPayload takes. Since it's in - # the intoto format, this value is expected to be - # 'application/vnd.in-toto+json'. - # @!attribute [rw] signatures - # @return [::Array<::Grafeas::V1::EnvelopeSignature>] - # The signatures over the payload. - class SBOMReferenceOccurrence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The actual payload that contains the SBOM Reference data. - # The payload follows the intoto statement specification. See - # https://github.com/in-toto/attestation/blob/main/spec/v1.0/statement.md - # for more details. - # @!attribute [rw] type - # @return [::String] - # Identifier for the schema of the Statement. - # @!attribute [rw] predicate_type - # @return [::String] - # URI identifying the type of the Predicate. - # @!attribute [rw] subject - # @return [::Array<::Grafeas::V1::Subject>] - # Set of software artifacts that the attestation applies to. Each element - # represents a single software artifact. - # @!attribute [rw] predicate - # @return [::Grafeas::V1::SbomReferenceIntotoPredicate] - # Additional parameters of the Predicate. Includes the actual data about the - # SBOM. - class SbomReferenceIntotoPayload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A predicate which describes the SBOM being referenced. - # @!attribute [rw] referrer_id - # @return [::String] - # The person or system referring this predicate to the consumer. - # @!attribute [rw] location - # @return [::String] - # The location of the SBOM. - # @!attribute [rw] mime_type - # @return [::String] - # The mime type of the SBOM. - # @!attribute [rw] digest - # @return [::Google::Protobuf::Map{::String => ::String}] - # A map of algorithm to digest of the contents of the SBOM. - class SbomReferenceIntotoPredicate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class DigestEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/secret.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/secret.rb deleted file mode 100644 index 19111283e758..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/secret.rb +++ /dev/null @@ -1,165 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Grafeas - module V1 - # The note representing a secret. - class SecretNote - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The occurrence provides details of a secret. - # @!attribute [rw] kind - # @return [::Grafeas::V1::SecretKind] - # Type of secret. - # @!attribute [rw] locations - # @return [::Array<::Grafeas::V1::SecretLocation>] - # Locations where the secret is detected. - # @!attribute [rw] statuses - # @return [::Array<::Grafeas::V1::SecretStatus>] - # Status of the secret. - # @!attribute [rw] data - # @return [::Google::Protobuf::Any] - # Scan result of the secret. - # @!attribute [rw] digest - # @return [::Grafeas::V1::Digest] - # Hash value, typically a digest for the secret data, that allows unique - # identification of a specific secret. - class SecretOccurrence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The location of the secret. - # @!attribute [rw] file_location - # @return [::Grafeas::V1::FileLocation] - # The secret is found from a file. - class SecretLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The status of the secret with a timestamp. - # @!attribute [rw] status - # @return [::Grafeas::V1::SecretStatus::Status] - # The status of the secret. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time the secret status was last updated. - # @!attribute [rw] message - # @return [::String] - # Optional message about the status code. - class SecretStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The status of the secret. - module Status - # Unspecified - STATUS_UNSPECIFIED = 0 - - # The status of the secret is unknown. - UNKNOWN = 1 - - # The secret is valid. - VALID = 2 - - # The secret is invalid. - INVALID = 3 - end - end - - # Kind of secret. - module SecretKind - # Unspecified - SECRET_KIND_UNSPECIFIED = 0 - - # The secret kind is unknown. - SECRET_KIND_UNKNOWN = 1 - - # A Google Cloud service account key per: - # https://cloud.google.com/iam/docs/creating-managing-service-account-keys - SECRET_KIND_GCP_SERVICE_ACCOUNT_KEY = 2 - - # A Google Cloud API key per: - # https://cloud.google.com/docs/authentication/api-keys - SECRET_KIND_GCP_API_KEY = 3 - - # A Google Cloud OAuth2 client credentials per: - # https://developers.google.com/identity/protocols/oauth2 - SECRET_KIND_GCP_OAUTH2_CLIENT_CREDENTIALS = 4 - - # A Google Cloud OAuth2 access token per: - # https://cloud.google.com/docs/authentication/token-types#access - SECRET_KIND_GCP_OAUTH2_ACCESS_TOKEN = 5 - - # An Anthropic Admin API key. - SECRET_KIND_ANTHROPIC_ADMIN_API_KEY = 6 - - # An Anthropic API key. - SECRET_KIND_ANTHROPIC_API_KEY = 7 - - # An Azure access token. - SECRET_KIND_AZURE_ACCESS_TOKEN = 8 - - # An Azure Identity Platform ID token. - SECRET_KIND_AZURE_IDENTITY_TOKEN = 9 - - # A Docker Hub personal access token. - SECRET_KIND_DOCKER_HUB_PERSONAL_ACCESS_TOKEN = 10 - - # A GitHub App refresh token. - SECRET_KIND_GITHUB_APP_REFRESH_TOKEN = 11 - - # A GitHub App server-to-server token. - SECRET_KIND_GITHUB_APP_SERVER_TO_SERVER_TOKEN = 12 - - # A GitHub App user-to-server token. - SECRET_KIND_GITHUB_APP_USER_TO_SERVER_TOKEN = 13 - - # A GitHub personal access token (classic). - SECRET_KIND_GITHUB_CLASSIC_PERSONAL_ACCESS_TOKEN = 14 - - # A GitHub fine-grained personal access token. - SECRET_KIND_GITHUB_FINE_GRAINED_PERSONAL_ACCESS_TOKEN = 15 - - # A GitHub OAuth token. - SECRET_KIND_GITHUB_OAUTH_TOKEN = 16 - - # A Hugging Face API key. - SECRET_KIND_HUGGINGFACE_API_KEY = 17 - - # An OpenAI API key. - SECRET_KIND_OPENAI_API_KEY = 18 - - # A Perplexity API key. - SECRET_KIND_PERPLEXITY_API_KEY = 19 - - # A Stripe secret key. - SECRET_KIND_STRIPE_SECRET_KEY = 20 - - # A Stripe restricted key. - SECRET_KIND_STRIPE_RESTRICTED_KEY = 21 - - # A Stripe webhook secret. - SECRET_KIND_STRIPE_WEBHOOK_SECRET = 22 - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/severity.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/severity.rb deleted file mode 100644 index 49d42db38b43..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/severity.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 Grafeas - module V1 - # Note provider assigned severity/impact ranking. - module Severity - # Unknown. - SEVERITY_UNSPECIFIED = 0 - - # Minimal severity. - MINIMAL = 1 - - # Low severity. - LOW = 2 - - # Medium severity. - MEDIUM = 3 - - # High severity. - HIGH = 4 - - # Critical severity. - CRITICAL = 5 - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance.rb deleted file mode 100644 index de245b5e9238..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance.rb +++ /dev/null @@ -1,152 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Grafeas - module V1 - # @!attribute [rw] builder - # @return [::Grafeas::V1::SlsaProvenance::SlsaBuilder] - # @!attribute [rw] recipe - # @return [::Grafeas::V1::SlsaProvenance::SlsaRecipe] - # Identifies the configuration used for the build. - # When combined with materials, this SHOULD fully describe the build, - # such that re-running this recipe results in bit-for-bit identical output - # (if the build is reproducible). - # @!attribute [rw] metadata - # @return [::Grafeas::V1::SlsaProvenance::SlsaMetadata] - # @!attribute [rw] materials - # @return [::Array<::Grafeas::V1::SlsaProvenance::Material>] - # The collection of artifacts that influenced the build including sources, - # dependencies, build tools, base images, and so on. This is considered to be - # incomplete unless metadata.completeness.materials is true. Unset or null is - # equivalent to empty. - class SlsaProvenance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Steps taken to build the artifact. - # For a TaskRun, typically each container corresponds to one step in the - # recipe. - # @!attribute [rw] type - # @return [::String] - # URI indicating what type of recipe was performed. It determines the - # meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and - # materials. - # @!attribute [rw] defined_in_material - # @return [::Integer] - # Index in materials containing the recipe steps that are not implied by - # recipe.type. For example, if the recipe type were "make", then this would - # point to the source containing the Makefile, not the make program itself. - # Set to -1 if the recipe doesn't come from a material, as zero is default - # unset value for int64. - # @!attribute [rw] entry_point - # @return [::String] - # String identifying the entry point into the build. - # This is often a path to a configuration file and/or a target label within - # that file. The syntax and meaning are defined by recipe.type. For - # example, if the recipe type were "make", then this would reference the - # directory in which to run make as well as which target to use. - # @!attribute [rw] arguments - # @return [::Google::Protobuf::Any] - # Collection of all external inputs that influenced the build on top of - # recipe.definedInMaterial and recipe.entryPoint. For example, if the - # recipe type were "make", then this might be the flags passed to make - # aside from the target, which is captured in recipe.entryPoint. Depending - # on the recipe Type, the structure may be different. - # @!attribute [rw] environment - # @return [::Google::Protobuf::Any] - # Any other builder-controlled inputs necessary for correctly evaluating - # the recipe. Usually only needed for reproducing the build but not - # evaluated as part of policy. Depending on the recipe Type, the structure - # may be different. - class SlsaRecipe - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Indicates that the builder claims certain fields in this message to be - # complete. - # @!attribute [rw] arguments - # @return [::Boolean] - # If true, the builder claims that recipe.arguments is complete, meaning - # that all external inputs are properly captured in the recipe. - # @!attribute [rw] environment - # @return [::Boolean] - # If true, the builder claims that recipe.environment is claimed to be - # complete. - # @!attribute [rw] materials - # @return [::Boolean] - # If true, the builder claims that materials are complete, usually through - # some controls to prevent network access. Sometimes called "hermetic". - class SlsaCompleteness - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Other properties of the build. - # @!attribute [rw] build_invocation_id - # @return [::String] - # Identifies the particular build invocation, which can be useful for - # finding associated logs or other ad-hoc analysis. The value SHOULD be - # globally unique, per in-toto Provenance spec. - # @!attribute [rw] build_started_on - # @return [::Google::Protobuf::Timestamp] - # The timestamp of when the build started. - # @!attribute [rw] build_finished_on - # @return [::Google::Protobuf::Timestamp] - # The timestamp of when the build completed. - # @!attribute [rw] completeness - # @return [::Grafeas::V1::SlsaProvenance::SlsaCompleteness] - # Indicates that the builder claims certain fields in this message to be - # complete. - # @!attribute [rw] reproducible - # @return [::Boolean] - # If true, the builder claims that running the recipe on materials will - # produce bit-for-bit identical output. - class SlsaMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] id - # @return [::String] - class SlsaBuilder - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] uri - # @return [::String] - # @!attribute [rw] digest - # @return [::Google::Protobuf::Map{::String => ::String}] - class Material - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class DigestEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance_zero_two.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance_zero_two.rb deleted file mode 100644 index 8cbf519a6aea..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/slsa_provenance_zero_two.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 Grafeas - module V1 - # @!attribute [rw] builder - # @return [::Grafeas::V1::SlsaProvenanceZeroTwo::SlsaBuilder] - # @!attribute [rw] build_type - # @return [::String] - # @!attribute [rw] invocation - # @return [::Grafeas::V1::SlsaProvenanceZeroTwo::SlsaInvocation] - # @!attribute [rw] build_config - # @return [::Google::Protobuf::Struct] - # @!attribute [rw] metadata - # @return [::Grafeas::V1::SlsaProvenanceZeroTwo::SlsaMetadata] - # @!attribute [rw] materials - # @return [::Array<::Grafeas::V1::SlsaProvenanceZeroTwo::SlsaMaterial>] - class SlsaProvenanceZeroTwo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Identifies the entity that executed the recipe, which is trusted to have - # correctly performed the operation and populated this provenance. - # @!attribute [rw] id - # @return [::String] - class SlsaBuilder - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The collection of artifacts that influenced the build including sources, - # dependencies, build tools, base images, and so on. - # @!attribute [rw] uri - # @return [::String] - # @!attribute [rw] digest - # @return [::Google::Protobuf::Map{::String => ::String}] - class SlsaMaterial - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class DigestEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Identifies the event that kicked off the build. - # @!attribute [rw] config_source - # @return [::Grafeas::V1::SlsaProvenanceZeroTwo::SlsaConfigSource] - # @!attribute [rw] parameters - # @return [::Google::Protobuf::Struct] - # @!attribute [rw] environment - # @return [::Google::Protobuf::Struct] - class SlsaInvocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes where the config file that kicked off the build came from. - # This is effectively a pointer to the source where buildConfig came from. - # @!attribute [rw] uri - # @return [::String] - # @!attribute [rw] digest - # @return [::Google::Protobuf::Map{::String => ::String}] - # @!attribute [rw] entry_point - # @return [::String] - class SlsaConfigSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class DigestEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Other properties of the build. - # @!attribute [rw] build_invocation_id - # @return [::String] - # @!attribute [rw] build_started_on - # @return [::Google::Protobuf::Timestamp] - # @!attribute [rw] build_finished_on - # @return [::Google::Protobuf::Timestamp] - # @!attribute [rw] completeness - # @return [::Grafeas::V1::SlsaProvenanceZeroTwo::SlsaCompleteness] - # @!attribute [rw] reproducible - # @return [::Boolean] - class SlsaMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Indicates that the builder claims certain fields in this message to be - # complete. - # @!attribute [rw] parameters - # @return [::Boolean] - # @!attribute [rw] environment - # @return [::Boolean] - # @!attribute [rw] materials - # @return [::Boolean] - class SlsaCompleteness - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/upgrade.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/upgrade.rb deleted file mode 100644 index d5353ac7f060..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/upgrade.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 Grafeas - module V1 - # An Upgrade Note represents a potential upgrade of a package to a given - # version. For each package version combination (i.e. bash 4.0, bash 4.1, - # bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field - # represents the information related to the update. - # @!attribute [rw] package - # @return [::String] - # Required for non-Windows OS. The package this Upgrade is for. - # @!attribute [rw] version - # @return [::Grafeas::V1::Version] - # Required for non-Windows OS. The version of the package in machine + human - # readable form. - # @!attribute [rw] distributions - # @return [::Array<::Grafeas::V1::UpgradeDistribution>] - # Metadata about the upgrade for each specific operating system. - # @!attribute [rw] windows_update - # @return [::Grafeas::V1::WindowsUpdate] - # Required for Windows OS. Represents the metadata about the Windows update. - class UpgradeNote - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Upgrade Distribution represents metadata about the Upgrade for each - # operating system (CPE). Some distributions have additional metadata around - # updates, classifying them into various categories and severities. - # @!attribute [rw] cpe_uri - # @return [::String] - # Required - The specific operating system this metadata applies to. See - # https://cpe.mitre.org/specification/. - # @!attribute [rw] classification - # @return [::String] - # The operating system classification of this Upgrade, as specified by the - # upstream operating system upgrade feed. For Windows the classification is - # one of the category_ids listed at - # https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) - # @!attribute [rw] severity - # @return [::String] - # The severity as specified by the upstream operating system. - # @!attribute [rw] cve - # @return [::Array<::String>] - # The cve tied to this Upgrade. - class UpgradeDistribution - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Windows Update represents the metadata about the update for the Windows - # operating system. The fields in this message come from the Windows Update API - # documented at - # https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate. - # @!attribute [rw] identity - # @return [::Grafeas::V1::WindowsUpdate::Identity] - # Required - The unique identifier for the update. - # @!attribute [rw] title - # @return [::String] - # The localized title of the update. - # @!attribute [rw] description - # @return [::String] - # The localized description of the update. - # @!attribute [rw] categories - # @return [::Array<::Grafeas::V1::WindowsUpdate::Category>] - # The list of categories to which the update belongs. - # @!attribute [rw] kb_article_ids - # @return [::Array<::String>] - # The Microsoft Knowledge Base article IDs that are associated with the - # update. - # @!attribute [rw] support_url - # @return [::String] - # The hyperlink to the support information for the update. - # @!attribute [rw] last_published_timestamp - # @return [::Google::Protobuf::Timestamp] - # The last published timestamp of the update. - class WindowsUpdate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The unique identifier of the update. - # @!attribute [rw] update_id - # @return [::String] - # The revision independent identifier of the update. - # @!attribute [rw] revision - # @return [::Integer] - # The revision number of the update. - class Identity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The category to which the update belongs. - # @!attribute [rw] category_id - # @return [::String] - # The identifier of the category. - # @!attribute [rw] name - # @return [::String] - # The localized name of the category. - class Category - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # An Upgrade Occurrence represents that a specific resource_url could install a - # specific upgrade. This presence is supplied via local sources (i.e. it is - # present in the mirror and the running system has noticed its availability). - # For Windows, both distribution and windows_update contain information for the - # Windows update. - # @!attribute [rw] package - # @return [::String] - # Required for non-Windows OS. The package this Upgrade is for. - # @!attribute [rw] parsed_version - # @return [::Grafeas::V1::Version] - # Required for non-Windows OS. The version of the package in a machine + - # human readable form. - # @!attribute [rw] distribution - # @return [::Grafeas::V1::UpgradeDistribution] - # Metadata about the upgrade for available for the specific operating system - # for the resource_url. This allows efficient filtering, as well as - # making it easier to use the occurrence. - # @!attribute [rw] windows_update - # @return [::Grafeas::V1::WindowsUpdate] - # Required for Windows OS. Represents the metadata about the Windows update. - class UpgradeOccurrence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/vex.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/vex.rb deleted file mode 100644 index d0cf29a1341c..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/vex.rb +++ /dev/null @@ -1,237 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Grafeas - module V1 - # A single VulnerabilityAssessmentNote represents - # one particular product's vulnerability assessment for one CVE. - # @!attribute [rw] title - # @return [::String] - # The title of the note. E.g. `Vex-Debian-11.4` - # @!attribute [rw] short_description - # @return [::String] - # A one sentence description of this Vex. - # @!attribute [rw] long_description - # @return [::String] - # A detailed description of this Vex. - # @!attribute [rw] language_code - # @return [::String] - # Identifies the language used by this document, - # corresponding to IETF BCP 47 / RFC 5646. - # @!attribute [rw] publisher - # @return [::Grafeas::V1::VulnerabilityAssessmentNote::Publisher] - # Publisher details of this Note. - # @!attribute [rw] product - # @return [::Grafeas::V1::VulnerabilityAssessmentNote::Product] - # The product affected by this vex. - # @!attribute [rw] assessment - # @return [::Grafeas::V1::VulnerabilityAssessmentNote::Assessment] - # Represents a vulnerability assessment for the product. - class VulnerabilityAssessmentNote - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Publisher contains information about the publisher of - # this Note. - # (-- api-linter: core::0123::resource-annotation=disabled - # aip.dev/not-precedent: Publisher is not a separate resource. --) - # @!attribute [rw] name - # @return [::String] - # Name of the publisher. - # Examples: 'Google', 'Google Cloud Platform'. - # @!attribute [rw] issuing_authority - # @return [::String] - # Provides information about the authority of the issuing party to - # release the document, in particular, the party's constituency and - # responsibilities or other obligations. - # @!attribute [rw] publisher_namespace - # @return [::String] - # The context or namespace. - # Contains a URL which is under control of the issuing party and can - # be used as a globally unique identifier for that issuing party. - # Example: https://csaf.io - class Publisher - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Product contains information about a product and how to uniquely identify - # it. - # (-- api-linter: core::0123::resource-annotation=disabled - # aip.dev/not-precedent: Product is not a separate resource. --) - # @!attribute [rw] name - # @return [::String] - # Name of the product. - # @!attribute [rw] id - # @return [::String] - # Token that identifies a product so that it can be referred to from other - # parts in the document. There is no predefined format as long as it - # uniquely identifies a group in the context of the current document. - # @!attribute [rw] generic_uri - # @return [::String] - # Contains a URI which is vendor-specific. - # Example: The artifact repository URL of an image. - class Product - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Assessment provides all information that is related to a single - # vulnerability for this product. - # @!attribute [rw] cve - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) - # tracking number for the vulnerability. - # Deprecated: Use vulnerability_id instead to denote CVEs. - # @!attribute [rw] vulnerability_id - # @return [::String] - # The vulnerability identifier for this Assessment. Will hold one of - # common identifiers e.g. CVE, GHSA etc. - # @!attribute [rw] short_description - # @return [::String] - # A one sentence description of this Vex. - # @!attribute [rw] long_description - # @return [::String] - # A detailed description of this Vex. - # @!attribute [rw] related_uris - # @return [::Array<::Grafeas::V1::RelatedUrl>] - # Holds a list of references associated with this vulnerability item and - # assessment. These uris have additional information about the - # vulnerability and the assessment itself. E.g. Link to a document which - # details how this assessment concluded the state of this vulnerability. - # @!attribute [rw] state - # @return [::Grafeas::V1::VulnerabilityAssessmentNote::Assessment::State] - # Provides the state of this Vulnerability assessment. - # @!attribute [rw] impacts - # @return [::Array<::String>] - # Contains information about the impact of this vulnerability, - # this will change with time. - # @!attribute [rw] justification - # @return [::Grafeas::V1::VulnerabilityAssessmentNote::Assessment::Justification] - # Justification provides the justification when the state of the - # assessment if NOT_AFFECTED. - # @!attribute [rw] remediations - # @return [::Array<::Grafeas::V1::VulnerabilityAssessmentNote::Assessment::Remediation>] - # Specifies details on how to handle (and presumably, fix) a vulnerability. - class Assessment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Justification provides the justification when the state of the - # assessment if NOT_AFFECTED. - # @!attribute [rw] justification_type - # @return [::Grafeas::V1::VulnerabilityAssessmentNote::Assessment::Justification::JustificationType] - # The justification type for this vulnerability. - # @!attribute [rw] details - # @return [::String] - # Additional details on why this justification was chosen. - class Justification - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Provides the type of justification. - module JustificationType - # JUSTIFICATION_TYPE_UNSPECIFIED. - JUSTIFICATION_TYPE_UNSPECIFIED = 0 - - # The vulnerable component is not present in the product. - COMPONENT_NOT_PRESENT = 1 - - # The vulnerable code is not present. Typically this case - # occurs when source code is configured or built in a way that excludes - # the vulnerable code. - VULNERABLE_CODE_NOT_PRESENT = 2 - - # The vulnerable code can not be executed. - # Typically this case occurs when the product includes the vulnerable - # code but does not call or use the vulnerable code. - VULNERABLE_CODE_NOT_IN_EXECUTE_PATH = 3 - - # The vulnerable code cannot be controlled by an attacker to exploit - # the vulnerability. - VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY = 4 - - # The product includes built-in protections or features that prevent - # exploitation of the vulnerability. These built-in protections cannot - # be subverted by the attacker and cannot be configured or disabled by - # the user. These mitigations completely prevent exploitation based on - # known attack vectors. - INLINE_MITIGATIONS_ALREADY_EXIST = 5 - end - end - - # Specifies details on how to handle (and presumably, fix) a vulnerability. - # @!attribute [rw] remediation_type - # @return [::Grafeas::V1::VulnerabilityAssessmentNote::Assessment::Remediation::RemediationType] - # The type of remediation that can be applied. - # @!attribute [rw] details - # @return [::String] - # Contains a comprehensive human-readable discussion of the remediation. - # @!attribute [rw] remediation_uri - # @return [::Grafeas::V1::RelatedUrl] - # Contains the URL where to obtain the remediation. - class Remediation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of remediation that can be applied. - module RemediationType - # No remediation type specified. - REMEDIATION_TYPE_UNSPECIFIED = 0 - - # A MITIGATION is available. - MITIGATION = 1 - - # No fix is planned. - NO_FIX_PLANNED = 2 - - # Not available. - NONE_AVAILABLE = 3 - - # A vendor fix is available. - VENDOR_FIX = 4 - - # A workaround is available. - WORKAROUND = 5 - end - end - - # Provides the state of this Vulnerability assessment. - module State - # No state is specified. - STATE_UNSPECIFIED = 0 - - # This product is known to be affected by this vulnerability. - AFFECTED = 1 - - # This product is known to be not affected by this vulnerability. - NOT_AFFECTED = 2 - - # This product contains a fix for this vulnerability. - FIXED = 3 - - # It is not known yet whether these versions are or are not affected - # by the vulnerability. However, it is still under investigation. - UNDER_INVESTIGATION = 4 - end - end - end - end -end diff --git a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/vulnerability.rb b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/vulnerability.rb deleted file mode 100644 index 1c116d3d5f83..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/vulnerability.rb +++ /dev/null @@ -1,323 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Grafeas - module V1 - # A security vulnerability that can be found in resources. - # @!attribute [rw] cvss_score - # @return [::Float] - # The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 - # where 0 indicates low severity and 10 indicates high severity. - # @!attribute [rw] severity - # @return [::Grafeas::V1::Severity] - # The note provider assigned severity of this vulnerability. - # @!attribute [rw] details - # @return [::Array<::Grafeas::V1::VulnerabilityNote::Detail>] - # Details of all known distros and packages affected by this vulnerability. - # @!attribute [rw] cvss_v3 - # @return [::Grafeas::V1::CVSSv3] - # The full description of the CVSSv3 for this vulnerability. - # @!attribute [rw] windows_details - # @return [::Array<::Grafeas::V1::VulnerabilityNote::WindowsDetail>] - # Windows details get their own format because the information format and - # model don't match a normal detail. Specifically Windows updates are done as - # patches, thus Windows vulnerabilities really are a missing package, rather - # than a package being at an incorrect version. - # @!attribute [rw] source_update_time - # @return [::Google::Protobuf::Timestamp] - # The time this information was last changed at the source. This is an - # upstream timestamp from the underlying information source - e.g. Ubuntu - # security tracker. - # @!attribute [rw] cvss_version - # @return [::Grafeas::V1::CVSSVersion] - # CVSS version used to populate cvss_score and severity. - # @!attribute [rw] cvss_v2 - # @return [::Grafeas::V1::CVSS] - # The full description of the v2 CVSS for this vulnerability. - # @!attribute [rw] advisory_publish_time - # @return [::Google::Protobuf::Timestamp] - # The time this advisory was published by the source. - # @!attribute [rw] cvss_v4 - # @return [::Grafeas::V1::CVSS] - # The full description of the v4 CVSS for this vulnerability. - class VulnerabilityNote - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A detail for a distro and package affected by this vulnerability and its - # associated fix (if one is available). - # @!attribute [rw] severity_name - # @return [::String] - # The distro assigned severity of this vulnerability. - # @!attribute [rw] description - # @return [::String] - # A vendor-specific description of this vulnerability. - # @!attribute [rw] package_type - # @return [::String] - # The type of package; whether native or non native (e.g., ruby gems, - # node.js packages, etc.). - # @!attribute [rw] affected_cpe_uri - # @return [::String] - # Required. The [CPE URI](https://cpe.mitre.org/specification/) this - # vulnerability affects. - # @!attribute [rw] affected_package - # @return [::String] - # Required. The package this vulnerability affects. - # @!attribute [rw] affected_version_start - # @return [::Grafeas::V1::Version] - # The version number at the start of an interval in which this - # vulnerability exists. A vulnerability can affect a package between - # version numbers that are disjoint sets of intervals (example: - # [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be - # represented in its own Detail. If a specific affected version is provided - # by a vulnerability database, affected_version_start and - # affected_version_end will be the same in that Detail. - # @!attribute [rw] affected_version_end - # @return [::Grafeas::V1::Version] - # The version number at the end of an interval in which this vulnerability - # exists. A vulnerability can affect a package between version numbers - # that are disjoint sets of intervals (example: [1.0.0-1.1.0], - # [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its - # own Detail. If a specific affected version is provided by a vulnerability - # database, affected_version_start and affected_version_end will be the - # same in that Detail. - # @!attribute [rw] fixed_cpe_uri - # @return [::String] - # The distro recommended [CPE URI](https://cpe.mitre.org/specification/) - # to update to that contains a fix for this vulnerability. It is possible - # for this to be different from the affected_cpe_uri. - # @!attribute [rw] fixed_package - # @return [::String] - # The distro recommended package to update to that contains a fix for this - # vulnerability. It is possible for this to be different from the - # affected_package. - # @!attribute [rw] fixed_version - # @return [::Grafeas::V1::Version] - # The distro recommended version to update to that contains a - # fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no - # such version is yet available. - # @!attribute [rw] is_obsolete - # @return [::Boolean] - # Whether this detail is obsolete. Occurrences are expected not to point to - # obsolete details. - # @!attribute [rw] source_update_time - # @return [::Google::Protobuf::Timestamp] - # The time this information was last changed at the source. This is an - # upstream timestamp from the underlying information source - e.g. Ubuntu - # security tracker. - # @!attribute [rw] source - # @return [::String] - # The source from which the information in this Detail was obtained. - # @!attribute [rw] vendor - # @return [::String] - # The name of the vendor of the product. - class Detail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] cpe_uri - # @return [::String] - # Required. The [CPE URI](https://cpe.mitre.org/specification/) this - # vulnerability affects. - # @!attribute [rw] name - # @return [::String] - # Required. The name of this vulnerability. - # @!attribute [rw] description - # @return [::String] - # The description of this vulnerability. - # @!attribute [rw] fixing_kbs - # @return [::Array<::Grafeas::V1::VulnerabilityNote::WindowsDetail::KnowledgeBase>] - # Required. The names of the KBs which have hotfixes to mitigate this - # vulnerability. Note that there may be multiple hotfixes (and thus - # multiple KBs) that mitigate a given vulnerability. Currently any listed - # KBs presence is considered a fix. - class WindowsDetail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] name - # @return [::String] - # The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). - # @!attribute [rw] url - # @return [::String] - # A link to the KB in the [Windows update catalog] - # (https://www.catalog.update.microsoft.com/). - class KnowledgeBase - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # An occurrence of a severity vulnerability on a resource. - # @!attribute [rw] type - # @return [::String] - # The type of package; whether native or non native (e.g., ruby gems, node.js - # packages, etc.). - # @!attribute [rw] severity - # @return [::Grafeas::V1::Severity] - # Output only. The note provider assigned severity of this vulnerability. - # @!attribute [rw] cvss_score - # @return [::Float] - # Output only. The CVSS score of this vulnerability. CVSS score is on a - # scale of 0 - 10 where 0 indicates low severity and 10 indicates high - # severity. - # @!attribute [rw] cvssv3 - # @return [::Grafeas::V1::CVSS] - # The cvss v3 score for the vulnerability. - # @!attribute [rw] package_issue - # @return [::Array<::Grafeas::V1::VulnerabilityOccurrence::PackageIssue>] - # Required. The set of affected locations and their fixes (if available) - # within the associated resource. - # @!attribute [rw] short_description - # @return [::String] - # Output only. A one sentence description of this vulnerability. - # @!attribute [rw] long_description - # @return [::String] - # Output only. A detailed description of this vulnerability. - # @!attribute [rw] related_urls - # @return [::Array<::Grafeas::V1::RelatedUrl>] - # Output only. URLs related to this vulnerability. - # @!attribute [rw] effective_severity - # @return [::Grafeas::V1::Severity] - # The distro assigned severity for this vulnerability when it is available, - # otherwise this is the note provider assigned severity. - # - # When there are multiple PackageIssues for this vulnerability, they can have - # different effective severities because some might be provided by the distro - # while others are provided by the language ecosystem for a language pack. - # For this reason, it is advised to use the effective severity on the - # PackageIssue level. In the case where multiple PackageIssues have differing - # effective severities, this field should be the highest severity for any of - # the PackageIssues. - # @!attribute [rw] fix_available - # @return [::Boolean] - # Output only. Whether at least one of the affected packages has a fix - # available. - # @!attribute [rw] cvss_version - # @return [::Grafeas::V1::CVSSVersion] - # Output only. CVSS version used to populate cvss_score and severity. - # @!attribute [rw] cvss_v2 - # @return [::Grafeas::V1::CVSS] - # The cvss v2 score for the vulnerability. - # @!attribute [rw] vex_assessment - # @return [::Grafeas::V1::VulnerabilityOccurrence::VexAssessment] - # @!attribute [rw] extra_details - # @return [::String] - # Occurrence-specific extra details about the vulnerability. - # @!attribute [rw] risk - # @return [::Grafeas::V1::Risk] - # Risk information about the vulnerability, such as CISA, EPSS, etc. - # @!attribute [rw] cvss_v4 - # @return [::Grafeas::V1::CVSS] - # The cvss v4 score for the vulnerability. - class VulnerabilityOccurrence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A detail for a distro and package this vulnerability occurrence was found - # in and its associated fix (if one is available). - # @!attribute [rw] affected_cpe_uri - # @return [::String] - # Required. The [CPE URI](https://cpe.mitre.org/specification/) this - # vulnerability was found in. - # @!attribute [rw] affected_package - # @return [::String] - # Required. The package this vulnerability was found in. - # @!attribute [rw] affected_version - # @return [::Grafeas::V1::Version] - # Required. The version of the package that is installed on the resource - # affected by this vulnerability. - # @!attribute [rw] fixed_cpe_uri - # @return [::String] - # The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability - # was fixed in. It is possible for this to be different from the - # affected_cpe_uri. - # @!attribute [rw] fixed_package - # @return [::String] - # The package this vulnerability was fixed in. It is possible for this to - # be different from the affected_package. - # @!attribute [rw] fixed_version - # @return [::Grafeas::V1::Version] - # Required. The version of the package this vulnerability was fixed in. - # Setting this to VersionKind.MAXIMUM means no fix is yet available. - # @!attribute [rw] fix_available - # @return [::Boolean] - # Output only. Whether a fix is available for this package. - # @!attribute [rw] package_type - # @return [::String] - # The type of package (e.g. OS, MAVEN, GO). - # @!attribute [r] effective_severity - # @return [::Grafeas::V1::Severity] - # The distro or language system assigned severity for this vulnerability - # when that is available and note provider assigned severity when it is not - # available. - # @!attribute [rw] file_location - # @return [::Array<::Grafeas::V1::FileLocation>] - # The location at which this package was found. - class PackageIssue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # VexAssessment provides all publisher provided Vex information that is - # related to this vulnerability. - # @!attribute [rw] cve - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) - # tracking number for the vulnerability. - # Deprecated: Use vulnerability_id instead to denote CVEs. - # @!attribute [rw] vulnerability_id - # @return [::String] - # The vulnerability identifier for this Assessment. Will hold one of - # common identifiers e.g. CVE, GHSA etc. - # @!attribute [rw] related_uris - # @return [::Array<::Grafeas::V1::RelatedUrl>] - # Holds a list of references associated with this vulnerability item and - # assessment. - # @!attribute [rw] note_name - # @return [::String] - # The VulnerabilityAssessment note from which this VexAssessment was - # generated. - # This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`. - # (-- api-linter: core::0122::name-suffix=disabled - # aip.dev/not-precedent: The suffix is kept for consistency. --) - # @!attribute [rw] state - # @return [::Grafeas::V1::VulnerabilityAssessmentNote::Assessment::State] - # Provides the state of this Vulnerability assessment. - # @!attribute [rw] impacts - # @return [::Array<::String>] - # Contains information about the impact of this vulnerability, - # this will change with time. - # @!attribute [rw] remediations - # @return [::Array<::Grafeas::V1::VulnerabilityAssessmentNote::Assessment::Remediation>] - # Specifies details on how to handle (and presumably, fix) a vulnerability. - # @!attribute [rw] justification - # @return [::Grafeas::V1::VulnerabilityAssessmentNote::Assessment::Justification] - # Justification provides the justification when the state of the - # assessment if NOT_AFFECTED. - class VexAssessment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/grafeas-v1/snippets/Gemfile b/owl-bot-staging/grafeas-v1/snippets/Gemfile deleted file mode 100644 index 549551d9d158..000000000000 --- a/owl-bot-staging/grafeas-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 "grafeas-v1", path: "../" -else - gem "grafeas-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/grafeas-v1/snippets/grafeas/batch_create_notes.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/batch_create_notes.rb deleted file mode 100644 index 3dca19f5e30c..000000000000 --- a/owl-bot-staging/grafeas-v1/snippets/grafeas/batch_create_notes.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START containeranalysis_v1_generated_Grafeas_BatchCreateNotes_sync] -require "grafeas/v1" - -## -# Snippet for the batch_create_notes call in the Grafeas service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Grafeas::V1::Grafeas::Client#batch_create_notes. -# -def batch_create_notes - # Create a client object. The client can be reused for multiple calls. - client = Grafeas::V1::Grafeas::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Grafeas::V1::BatchCreateNotesRequest.new - - # Call the batch_create_notes method. - result = client.batch_create_notes request - - # The returned object is of type Grafeas::V1::BatchCreateNotesResponse. - p result -end -# [END containeranalysis_v1_generated_Grafeas_BatchCreateNotes_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/batch_create_occurrences.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/batch_create_occurrences.rb deleted file mode 100644 index 7fb0e10e68bd..000000000000 --- a/owl-bot-staging/grafeas-v1/snippets/grafeas/batch_create_occurrences.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START containeranalysis_v1_generated_Grafeas_BatchCreateOccurrences_sync] -require "grafeas/v1" - -## -# Snippet for the batch_create_occurrences call in the Grafeas service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Grafeas::V1::Grafeas::Client#batch_create_occurrences. -# -def batch_create_occurrences - # Create a client object. The client can be reused for multiple calls. - client = Grafeas::V1::Grafeas::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Grafeas::V1::BatchCreateOccurrencesRequest.new - - # Call the batch_create_occurrences method. - result = client.batch_create_occurrences request - - # The returned object is of type Grafeas::V1::BatchCreateOccurrencesResponse. - p result -end -# [END containeranalysis_v1_generated_Grafeas_BatchCreateOccurrences_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/create_note.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/create_note.rb deleted file mode 100644 index 78afb9c5c326..000000000000 --- a/owl-bot-staging/grafeas-v1/snippets/grafeas/create_note.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START containeranalysis_v1_generated_Grafeas_CreateNote_sync] -require "grafeas/v1" - -## -# Snippet for the create_note call in the Grafeas service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Grafeas::V1::Grafeas::Client#create_note. -# -def create_note - # Create a client object. The client can be reused for multiple calls. - client = Grafeas::V1::Grafeas::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Grafeas::V1::CreateNoteRequest.new - - # Call the create_note method. - result = client.create_note request - - # The returned object is of type Grafeas::V1::Note. - p result -end -# [END containeranalysis_v1_generated_Grafeas_CreateNote_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/create_occurrence.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/create_occurrence.rb deleted file mode 100644 index f096444c8a9a..000000000000 --- a/owl-bot-staging/grafeas-v1/snippets/grafeas/create_occurrence.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START containeranalysis_v1_generated_Grafeas_CreateOccurrence_sync] -require "grafeas/v1" - -## -# Snippet for the create_occurrence call in the Grafeas service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Grafeas::V1::Grafeas::Client#create_occurrence. -# -def create_occurrence - # Create a client object. The client can be reused for multiple calls. - client = Grafeas::V1::Grafeas::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Grafeas::V1::CreateOccurrenceRequest.new - - # Call the create_occurrence method. - result = client.create_occurrence request - - # The returned object is of type Grafeas::V1::Occurrence. - p result -end -# [END containeranalysis_v1_generated_Grafeas_CreateOccurrence_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/delete_note.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/delete_note.rb deleted file mode 100644 index 130f3650ad78..000000000000 --- a/owl-bot-staging/grafeas-v1/snippets/grafeas/delete_note.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START containeranalysis_v1_generated_Grafeas_DeleteNote_sync] -require "grafeas/v1" - -## -# Snippet for the delete_note call in the Grafeas service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Grafeas::V1::Grafeas::Client#delete_note. -# -def delete_note - # Create a client object. The client can be reused for multiple calls. - client = Grafeas::V1::Grafeas::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Grafeas::V1::DeleteNoteRequest.new - - # Call the delete_note method. - result = client.delete_note request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END containeranalysis_v1_generated_Grafeas_DeleteNote_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/delete_occurrence.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/delete_occurrence.rb deleted file mode 100644 index 345a7bafaffb..000000000000 --- a/owl-bot-staging/grafeas-v1/snippets/grafeas/delete_occurrence.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START containeranalysis_v1_generated_Grafeas_DeleteOccurrence_sync] -require "grafeas/v1" - -## -# Snippet for the delete_occurrence call in the Grafeas service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Grafeas::V1::Grafeas::Client#delete_occurrence. -# -def delete_occurrence - # Create a client object. The client can be reused for multiple calls. - client = Grafeas::V1::Grafeas::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Grafeas::V1::DeleteOccurrenceRequest.new - - # Call the delete_occurrence method. - result = client.delete_occurrence request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END containeranalysis_v1_generated_Grafeas_DeleteOccurrence_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/get_note.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/get_note.rb deleted file mode 100644 index fb90bd7d7bf7..000000000000 --- a/owl-bot-staging/grafeas-v1/snippets/grafeas/get_note.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START containeranalysis_v1_generated_Grafeas_GetNote_sync] -require "grafeas/v1" - -## -# Snippet for the get_note call in the Grafeas service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Grafeas::V1::Grafeas::Client#get_note. -# -def get_note - # Create a client object. The client can be reused for multiple calls. - client = Grafeas::V1::Grafeas::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Grafeas::V1::GetNoteRequest.new - - # Call the get_note method. - result = client.get_note request - - # The returned object is of type Grafeas::V1::Note. - p result -end -# [END containeranalysis_v1_generated_Grafeas_GetNote_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/get_occurrence.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/get_occurrence.rb deleted file mode 100644 index 34efaee3033e..000000000000 --- a/owl-bot-staging/grafeas-v1/snippets/grafeas/get_occurrence.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START containeranalysis_v1_generated_Grafeas_GetOccurrence_sync] -require "grafeas/v1" - -## -# Snippet for the get_occurrence call in the Grafeas service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Grafeas::V1::Grafeas::Client#get_occurrence. -# -def get_occurrence - # Create a client object. The client can be reused for multiple calls. - client = Grafeas::V1::Grafeas::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Grafeas::V1::GetOccurrenceRequest.new - - # Call the get_occurrence method. - result = client.get_occurrence request - - # The returned object is of type Grafeas::V1::Occurrence. - p result -end -# [END containeranalysis_v1_generated_Grafeas_GetOccurrence_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/get_occurrence_note.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/get_occurrence_note.rb deleted file mode 100644 index eb5c20b49106..000000000000 --- a/owl-bot-staging/grafeas-v1/snippets/grafeas/get_occurrence_note.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START containeranalysis_v1_generated_Grafeas_GetOccurrenceNote_sync] -require "grafeas/v1" - -## -# Snippet for the get_occurrence_note call in the Grafeas service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Grafeas::V1::Grafeas::Client#get_occurrence_note. -# -def get_occurrence_note - # Create a client object. The client can be reused for multiple calls. - client = Grafeas::V1::Grafeas::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Grafeas::V1::GetOccurrenceNoteRequest.new - - # Call the get_occurrence_note method. - result = client.get_occurrence_note request - - # The returned object is of type Grafeas::V1::Note. - p result -end -# [END containeranalysis_v1_generated_Grafeas_GetOccurrenceNote_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/list_note_occurrences.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/list_note_occurrences.rb deleted file mode 100644 index 176aadb8a24c..000000000000 --- a/owl-bot-staging/grafeas-v1/snippets/grafeas/list_note_occurrences.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 containeranalysis_v1_generated_Grafeas_ListNoteOccurrences_sync] -require "grafeas/v1" - -## -# Snippet for the list_note_occurrences call in the Grafeas service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Grafeas::V1::Grafeas::Client#list_note_occurrences. -# -def list_note_occurrences - # Create a client object. The client can be reused for multiple calls. - client = Grafeas::V1::Grafeas::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Grafeas::V1::ListNoteOccurrencesRequest.new - - # Call the list_note_occurrences method. - result = client.list_note_occurrences request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Grafeas::V1::Occurrence. - p item - end -end -# [END containeranalysis_v1_generated_Grafeas_ListNoteOccurrences_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/list_notes.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/list_notes.rb deleted file mode 100644 index 75a6d5fed888..000000000000 --- a/owl-bot-staging/grafeas-v1/snippets/grafeas/list_notes.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 containeranalysis_v1_generated_Grafeas_ListNotes_sync] -require "grafeas/v1" - -## -# Snippet for the list_notes call in the Grafeas service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Grafeas::V1::Grafeas::Client#list_notes. -# -def list_notes - # Create a client object. The client can be reused for multiple calls. - client = Grafeas::V1::Grafeas::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Grafeas::V1::ListNotesRequest.new - - # Call the list_notes method. - result = client.list_notes request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Grafeas::V1::Note. - p item - end -end -# [END containeranalysis_v1_generated_Grafeas_ListNotes_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/list_occurrences.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/list_occurrences.rb deleted file mode 100644 index e23051faf761..000000000000 --- a/owl-bot-staging/grafeas-v1/snippets/grafeas/list_occurrences.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 containeranalysis_v1_generated_Grafeas_ListOccurrences_sync] -require "grafeas/v1" - -## -# Snippet for the list_occurrences call in the Grafeas service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Grafeas::V1::Grafeas::Client#list_occurrences. -# -def list_occurrences - # Create a client object. The client can be reused for multiple calls. - client = Grafeas::V1::Grafeas::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Grafeas::V1::ListOccurrencesRequest.new - - # Call the list_occurrences method. - result = client.list_occurrences request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Grafeas::V1::Occurrence. - p item - end -end -# [END containeranalysis_v1_generated_Grafeas_ListOccurrences_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/update_note.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/update_note.rb deleted file mode 100644 index 7744b6a35993..000000000000 --- a/owl-bot-staging/grafeas-v1/snippets/grafeas/update_note.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START containeranalysis_v1_generated_Grafeas_UpdateNote_sync] -require "grafeas/v1" - -## -# Snippet for the update_note call in the Grafeas service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Grafeas::V1::Grafeas::Client#update_note. -# -def update_note - # Create a client object. The client can be reused for multiple calls. - client = Grafeas::V1::Grafeas::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Grafeas::V1::UpdateNoteRequest.new - - # Call the update_note method. - result = client.update_note request - - # The returned object is of type Grafeas::V1::Note. - p result -end -# [END containeranalysis_v1_generated_Grafeas_UpdateNote_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/grafeas/update_occurrence.rb b/owl-bot-staging/grafeas-v1/snippets/grafeas/update_occurrence.rb deleted file mode 100644 index 8f2301dba810..000000000000 --- a/owl-bot-staging/grafeas-v1/snippets/grafeas/update_occurrence.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START containeranalysis_v1_generated_Grafeas_UpdateOccurrence_sync] -require "grafeas/v1" - -## -# Snippet for the update_occurrence call in the Grafeas service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Grafeas::V1::Grafeas::Client#update_occurrence. -# -def update_occurrence - # Create a client object. The client can be reused for multiple calls. - client = Grafeas::V1::Grafeas::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Grafeas::V1::UpdateOccurrenceRequest.new - - # Call the update_occurrence method. - result = client.update_occurrence request - - # The returned object is of type Grafeas::V1::Occurrence. - p result -end -# [END containeranalysis_v1_generated_Grafeas_UpdateOccurrence_sync] diff --git a/owl-bot-staging/grafeas-v1/snippets/snippet_metadata_grafeas.v1.json b/owl-bot-staging/grafeas-v1/snippets/snippet_metadata_grafeas.v1.json deleted file mode 100644 index 75b0689c6fff..000000000000 --- a/owl-bot-staging/grafeas-v1/snippets/snippet_metadata_grafeas.v1.json +++ /dev/null @@ -1,575 +0,0 @@ -{ - "client_library": { - "name": "grafeas-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "grafeas.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "containeranalysis_v1_generated_Grafeas_GetOccurrence_sync", - "title": "Snippet for the get_occurrence call in the Grafeas service", - "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#get_occurrence.", - "file": "grafeas/get_occurrence.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_occurrence", - "full_name": "::Grafeas::V1::Grafeas::Client#get_occurrence", - "async": false, - "parameters": [ - { - "type": "::Grafeas::V1::GetOccurrenceRequest", - "name": "request" - } - ], - "result_type": "::Grafeas::V1::Occurrence", - "client": { - "short_name": "Grafeas::Client", - "full_name": "::Grafeas::V1::Grafeas::Client" - }, - "method": { - "short_name": "GetOccurrence", - "full_name": "grafeas.v1.Grafeas.GetOccurrence", - "service": { - "short_name": "Grafeas", - "full_name": "grafeas.v1.Grafeas" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "containeranalysis_v1_generated_Grafeas_ListOccurrences_sync", - "title": "Snippet for the list_occurrences call in the Grafeas service", - "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#list_occurrences.", - "file": "grafeas/list_occurrences.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_occurrences", - "full_name": "::Grafeas::V1::Grafeas::Client#list_occurrences", - "async": false, - "parameters": [ - { - "type": "::Grafeas::V1::ListOccurrencesRequest", - "name": "request" - } - ], - "result_type": "::Grafeas::V1::ListOccurrencesResponse", - "client": { - "short_name": "Grafeas::Client", - "full_name": "::Grafeas::V1::Grafeas::Client" - }, - "method": { - "short_name": "ListOccurrences", - "full_name": "grafeas.v1.Grafeas.ListOccurrences", - "service": { - "short_name": "Grafeas", - "full_name": "grafeas.v1.Grafeas" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "containeranalysis_v1_generated_Grafeas_DeleteOccurrence_sync", - "title": "Snippet for the delete_occurrence call in the Grafeas service", - "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#delete_occurrence.", - "file": "grafeas/delete_occurrence.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_occurrence", - "full_name": "::Grafeas::V1::Grafeas::Client#delete_occurrence", - "async": false, - "parameters": [ - { - "type": "::Grafeas::V1::DeleteOccurrenceRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Grafeas::Client", - "full_name": "::Grafeas::V1::Grafeas::Client" - }, - "method": { - "short_name": "DeleteOccurrence", - "full_name": "grafeas.v1.Grafeas.DeleteOccurrence", - "service": { - "short_name": "Grafeas", - "full_name": "grafeas.v1.Grafeas" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "containeranalysis_v1_generated_Grafeas_CreateOccurrence_sync", - "title": "Snippet for the create_occurrence call in the Grafeas service", - "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#create_occurrence.", - "file": "grafeas/create_occurrence.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_occurrence", - "full_name": "::Grafeas::V1::Grafeas::Client#create_occurrence", - "async": false, - "parameters": [ - { - "type": "::Grafeas::V1::CreateOccurrenceRequest", - "name": "request" - } - ], - "result_type": "::Grafeas::V1::Occurrence", - "client": { - "short_name": "Grafeas::Client", - "full_name": "::Grafeas::V1::Grafeas::Client" - }, - "method": { - "short_name": "CreateOccurrence", - "full_name": "grafeas.v1.Grafeas.CreateOccurrence", - "service": { - "short_name": "Grafeas", - "full_name": "grafeas.v1.Grafeas" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "containeranalysis_v1_generated_Grafeas_BatchCreateOccurrences_sync", - "title": "Snippet for the batch_create_occurrences call in the Grafeas service", - "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#batch_create_occurrences.", - "file": "grafeas/batch_create_occurrences.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_create_occurrences", - "full_name": "::Grafeas::V1::Grafeas::Client#batch_create_occurrences", - "async": false, - "parameters": [ - { - "type": "::Grafeas::V1::BatchCreateOccurrencesRequest", - "name": "request" - } - ], - "result_type": "::Grafeas::V1::BatchCreateOccurrencesResponse", - "client": { - "short_name": "Grafeas::Client", - "full_name": "::Grafeas::V1::Grafeas::Client" - }, - "method": { - "short_name": "BatchCreateOccurrences", - "full_name": "grafeas.v1.Grafeas.BatchCreateOccurrences", - "service": { - "short_name": "Grafeas", - "full_name": "grafeas.v1.Grafeas" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "containeranalysis_v1_generated_Grafeas_UpdateOccurrence_sync", - "title": "Snippet for the update_occurrence call in the Grafeas service", - "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#update_occurrence.", - "file": "grafeas/update_occurrence.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_occurrence", - "full_name": "::Grafeas::V1::Grafeas::Client#update_occurrence", - "async": false, - "parameters": [ - { - "type": "::Grafeas::V1::UpdateOccurrenceRequest", - "name": "request" - } - ], - "result_type": "::Grafeas::V1::Occurrence", - "client": { - "short_name": "Grafeas::Client", - "full_name": "::Grafeas::V1::Grafeas::Client" - }, - "method": { - "short_name": "UpdateOccurrence", - "full_name": "grafeas.v1.Grafeas.UpdateOccurrence", - "service": { - "short_name": "Grafeas", - "full_name": "grafeas.v1.Grafeas" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "containeranalysis_v1_generated_Grafeas_GetOccurrenceNote_sync", - "title": "Snippet for the get_occurrence_note call in the Grafeas service", - "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#get_occurrence_note.", - "file": "grafeas/get_occurrence_note.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_occurrence_note", - "full_name": "::Grafeas::V1::Grafeas::Client#get_occurrence_note", - "async": false, - "parameters": [ - { - "type": "::Grafeas::V1::GetOccurrenceNoteRequest", - "name": "request" - } - ], - "result_type": "::Grafeas::V1::Note", - "client": { - "short_name": "Grafeas::Client", - "full_name": "::Grafeas::V1::Grafeas::Client" - }, - "method": { - "short_name": "GetOccurrenceNote", - "full_name": "grafeas.v1.Grafeas.GetOccurrenceNote", - "service": { - "short_name": "Grafeas", - "full_name": "grafeas.v1.Grafeas" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "containeranalysis_v1_generated_Grafeas_GetNote_sync", - "title": "Snippet for the get_note call in the Grafeas service", - "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#get_note.", - "file": "grafeas/get_note.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_note", - "full_name": "::Grafeas::V1::Grafeas::Client#get_note", - "async": false, - "parameters": [ - { - "type": "::Grafeas::V1::GetNoteRequest", - "name": "request" - } - ], - "result_type": "::Grafeas::V1::Note", - "client": { - "short_name": "Grafeas::Client", - "full_name": "::Grafeas::V1::Grafeas::Client" - }, - "method": { - "short_name": "GetNote", - "full_name": "grafeas.v1.Grafeas.GetNote", - "service": { - "short_name": "Grafeas", - "full_name": "grafeas.v1.Grafeas" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "containeranalysis_v1_generated_Grafeas_ListNotes_sync", - "title": "Snippet for the list_notes call in the Grafeas service", - "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#list_notes.", - "file": "grafeas/list_notes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_notes", - "full_name": "::Grafeas::V1::Grafeas::Client#list_notes", - "async": false, - "parameters": [ - { - "type": "::Grafeas::V1::ListNotesRequest", - "name": "request" - } - ], - "result_type": "::Grafeas::V1::ListNotesResponse", - "client": { - "short_name": "Grafeas::Client", - "full_name": "::Grafeas::V1::Grafeas::Client" - }, - "method": { - "short_name": "ListNotes", - "full_name": "grafeas.v1.Grafeas.ListNotes", - "service": { - "short_name": "Grafeas", - "full_name": "grafeas.v1.Grafeas" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "containeranalysis_v1_generated_Grafeas_DeleteNote_sync", - "title": "Snippet for the delete_note call in the Grafeas service", - "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#delete_note.", - "file": "grafeas/delete_note.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_note", - "full_name": "::Grafeas::V1::Grafeas::Client#delete_note", - "async": false, - "parameters": [ - { - "type": "::Grafeas::V1::DeleteNoteRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Grafeas::Client", - "full_name": "::Grafeas::V1::Grafeas::Client" - }, - "method": { - "short_name": "DeleteNote", - "full_name": "grafeas.v1.Grafeas.DeleteNote", - "service": { - "short_name": "Grafeas", - "full_name": "grafeas.v1.Grafeas" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "containeranalysis_v1_generated_Grafeas_CreateNote_sync", - "title": "Snippet for the create_note call in the Grafeas service", - "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#create_note.", - "file": "grafeas/create_note.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_note", - "full_name": "::Grafeas::V1::Grafeas::Client#create_note", - "async": false, - "parameters": [ - { - "type": "::Grafeas::V1::CreateNoteRequest", - "name": "request" - } - ], - "result_type": "::Grafeas::V1::Note", - "client": { - "short_name": "Grafeas::Client", - "full_name": "::Grafeas::V1::Grafeas::Client" - }, - "method": { - "short_name": "CreateNote", - "full_name": "grafeas.v1.Grafeas.CreateNote", - "service": { - "short_name": "Grafeas", - "full_name": "grafeas.v1.Grafeas" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "containeranalysis_v1_generated_Grafeas_BatchCreateNotes_sync", - "title": "Snippet for the batch_create_notes call in the Grafeas service", - "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#batch_create_notes.", - "file": "grafeas/batch_create_notes.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_create_notes", - "full_name": "::Grafeas::V1::Grafeas::Client#batch_create_notes", - "async": false, - "parameters": [ - { - "type": "::Grafeas::V1::BatchCreateNotesRequest", - "name": "request" - } - ], - "result_type": "::Grafeas::V1::BatchCreateNotesResponse", - "client": { - "short_name": "Grafeas::Client", - "full_name": "::Grafeas::V1::Grafeas::Client" - }, - "method": { - "short_name": "BatchCreateNotes", - "full_name": "grafeas.v1.Grafeas.BatchCreateNotes", - "service": { - "short_name": "Grafeas", - "full_name": "grafeas.v1.Grafeas" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "containeranalysis_v1_generated_Grafeas_UpdateNote_sync", - "title": "Snippet for the update_note call in the Grafeas service", - "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#update_note.", - "file": "grafeas/update_note.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_note", - "full_name": "::Grafeas::V1::Grafeas::Client#update_note", - "async": false, - "parameters": [ - { - "type": "::Grafeas::V1::UpdateNoteRequest", - "name": "request" - } - ], - "result_type": "::Grafeas::V1::Note", - "client": { - "short_name": "Grafeas::Client", - "full_name": "::Grafeas::V1::Grafeas::Client" - }, - "method": { - "short_name": "UpdateNote", - "full_name": "grafeas.v1.Grafeas.UpdateNote", - "service": { - "short_name": "Grafeas", - "full_name": "grafeas.v1.Grafeas" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "containeranalysis_v1_generated_Grafeas_ListNoteOccurrences_sync", - "title": "Snippet for the list_note_occurrences call in the Grafeas service", - "description": "This is an auto-generated example demonstrating basic usage of Grafeas::V1::Grafeas::Client#list_note_occurrences.", - "file": "grafeas/list_note_occurrences.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_note_occurrences", - "full_name": "::Grafeas::V1::Grafeas::Client#list_note_occurrences", - "async": false, - "parameters": [ - { - "type": "::Grafeas::V1::ListNoteOccurrencesRequest", - "name": "request" - } - ], - "result_type": "::Grafeas::V1::ListNoteOccurrencesResponse", - "client": { - "short_name": "Grafeas::Client", - "full_name": "::Grafeas::V1::Grafeas::Client" - }, - "method": { - "short_name": "ListNoteOccurrences", - "full_name": "grafeas.v1.Grafeas.ListNoteOccurrences", - "service": { - "short_name": "Grafeas", - "full_name": "grafeas.v1.Grafeas" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/grafeas-v1/test/grafeas/v1/grafeas_paths_test.rb b/owl-bot-staging/grafeas-v1/test/grafeas/v1/grafeas_paths_test.rb deleted file mode 100644 index c1ca7ff02579..000000000000 --- a/owl-bot-staging/grafeas-v1/test/grafeas/v1/grafeas_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 "grafeas/v1/grafeas" - -class ::Grafeas::V1::Grafeas::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_note_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.note_path project: "value0", note: "value1" - assert_equal "projects/value0/notes/value1", path - end - end - - def test_occurrence_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.occurrence_path project: "value0", occurrence: "value1" - assert_equal "projects/value0/occurrences/value1", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end -end diff --git a/owl-bot-staging/grafeas-v1/test/grafeas/v1/grafeas_test.rb b/owl-bot-staging/grafeas-v1/test/grafeas/v1/grafeas_test.rb deleted file mode 100644 index 507c27f7fff2..000000000000 --- a/owl-bot-staging/grafeas-v1/test/grafeas/v1/grafeas_test.rb +++ /dev/null @@ -1,971 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "grafeas/v1/grafeas_pb" -require "grafeas/v1/grafeas" - -class ::Grafeas::V1::Grafeas::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_occurrence - # Create GRPC objects. - grpc_response = ::Grafeas::V1::Occurrence.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_occurrence_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_occurrence, name - assert_kind_of ::Grafeas::V1::GetOccurrenceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_occurrence_client_stub do - # Create client - c = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_occurrence({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_occurrence name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_occurrence ::Grafeas::V1::GetOccurrenceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_occurrence({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_occurrence(::Grafeas::V1::GetOccurrenceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_occurrence_client_stub.call_rpc_count - end - end - - def test_list_occurrences - # Create GRPC objects. - grpc_response = ::Grafeas::V1::ListOccurrencesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_occurrences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_occurrences, name - assert_kind_of ::Grafeas::V1::ListOccurrencesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_occurrences_client_stub do - # Create client - c = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_occurrences({ parent: parent, 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 - c.list_occurrences parent: parent, 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 - c.list_occurrences ::Grafeas::V1::ListOccurrencesRequest.new(parent: parent, 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 - c.list_occurrences({ parent: parent, 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 - c.list_occurrences(::Grafeas::V1::ListOccurrencesRequest.new(parent: parent, 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_occurrences_client_stub.call_rpc_count - end - end - - def test_delete_occurrence - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_occurrence_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_occurrence, name - assert_kind_of ::Grafeas::V1::DeleteOccurrenceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_occurrence_client_stub do - # Create client - c = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_occurrence({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_occurrence name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_occurrence ::Grafeas::V1::DeleteOccurrenceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_occurrence({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_occurrence(::Grafeas::V1::DeleteOccurrenceRequest.new(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_occurrence_client_stub.call_rpc_count - end - end - - def test_create_occurrence - # Create GRPC objects. - grpc_response = ::Grafeas::V1::Occurrence.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - occurrence = {} - - create_occurrence_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_occurrence, name - assert_kind_of ::Grafeas::V1::CreateOccurrenceRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Grafeas::V1::Occurrence), request["occurrence"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_occurrence_client_stub do - # Create client - c = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_occurrence({ parent: parent, occurrence: occurrence }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_occurrence parent: parent, occurrence: occurrence do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_occurrence ::Grafeas::V1::CreateOccurrenceRequest.new(parent: parent, occurrence: occurrence) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_occurrence({ parent: parent, occurrence: occurrence }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_occurrence(::Grafeas::V1::CreateOccurrenceRequest.new(parent: parent, occurrence: occurrence), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_occurrence_client_stub.call_rpc_count - end - end - - def test_batch_create_occurrences - # Create GRPC objects. - grpc_response = ::Grafeas::V1::BatchCreateOccurrencesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - occurrences = [{}] - - batch_create_occurrences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_create_occurrences, name - assert_kind_of ::Grafeas::V1::BatchCreateOccurrencesRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Grafeas::V1::Occurrence, request["occurrences"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_create_occurrences_client_stub do - # Create client - c = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.batch_create_occurrences({ parent: parent, occurrences: occurrences }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.batch_create_occurrences parent: parent, occurrences: occurrences do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.batch_create_occurrences ::Grafeas::V1::BatchCreateOccurrencesRequest.new(parent: parent, occurrences: occurrences) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.batch_create_occurrences({ parent: parent, occurrences: occurrences }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.batch_create_occurrences(::Grafeas::V1::BatchCreateOccurrencesRequest.new(parent: parent, occurrences: occurrences), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_create_occurrences_client_stub.call_rpc_count - end - end - - def test_update_occurrence - # Create GRPC objects. - grpc_response = ::Grafeas::V1::Occurrence.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - occurrence = {} - update_mask = {} - - update_occurrence_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_occurrence, name - assert_kind_of ::Grafeas::V1::UpdateOccurrenceRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Grafeas::V1::Occurrence), request["occurrence"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_occurrence_client_stub do - # Create client - c = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_occurrence({ name: name, occurrence: occurrence, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_occurrence name: name, occurrence: occurrence, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_occurrence ::Grafeas::V1::UpdateOccurrenceRequest.new(name: name, occurrence: occurrence, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_occurrence({ name: name, occurrence: occurrence, 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 - c.update_occurrence(::Grafeas::V1::UpdateOccurrenceRequest.new(name: name, occurrence: occurrence, 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_occurrence_client_stub.call_rpc_count - end - end - - def test_get_occurrence_note - # Create GRPC objects. - grpc_response = ::Grafeas::V1::Note.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_occurrence_note_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_occurrence_note, name - assert_kind_of ::Grafeas::V1::GetOccurrenceNoteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_occurrence_note_client_stub do - # Create client - c = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_occurrence_note({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_occurrence_note name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_occurrence_note ::Grafeas::V1::GetOccurrenceNoteRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_occurrence_note({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_occurrence_note(::Grafeas::V1::GetOccurrenceNoteRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_occurrence_note_client_stub.call_rpc_count - end - end - - def test_get_note - # Create GRPC objects. - grpc_response = ::Grafeas::V1::Note.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_note_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_note, name - assert_kind_of ::Grafeas::V1::GetNoteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_note_client_stub do - # Create client - c = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_note({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_note name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_note ::Grafeas::V1::GetNoteRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_note({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_note(::Grafeas::V1::GetNoteRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_note_client_stub.call_rpc_count - end - end - - def test_list_notes - # Create GRPC objects. - grpc_response = ::Grafeas::V1::ListNotesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_notes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_notes, name - assert_kind_of ::Grafeas::V1::ListNotesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_notes_client_stub do - # Create client - c = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_notes({ parent: parent, 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 - c.list_notes parent: parent, 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 - c.list_notes ::Grafeas::V1::ListNotesRequest.new(parent: parent, 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 - c.list_notes({ parent: parent, 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 - c.list_notes(::Grafeas::V1::ListNotesRequest.new(parent: parent, 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_notes_client_stub.call_rpc_count - end - end - - def test_delete_note - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_note_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_note, name - assert_kind_of ::Grafeas::V1::DeleteNoteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_note_client_stub do - # Create client - c = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_note({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_note name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_note ::Grafeas::V1::DeleteNoteRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_note({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_note(::Grafeas::V1::DeleteNoteRequest.new(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_note_client_stub.call_rpc_count - end - end - - def test_create_note - # Create GRPC objects. - grpc_response = ::Grafeas::V1::Note.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - note_id = "hello world" - note = {} - - create_note_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_note, name - assert_kind_of ::Grafeas::V1::CreateNoteRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["note_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Grafeas::V1::Note), request["note"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_note_client_stub do - # Create client - c = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_note({ parent: parent, note_id: note_id, note: note }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_note parent: parent, note_id: note_id, note: note do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_note ::Grafeas::V1::CreateNoteRequest.new(parent: parent, note_id: note_id, note: note) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_note({ parent: parent, note_id: note_id, note: note }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_note(::Grafeas::V1::CreateNoteRequest.new(parent: parent, note_id: note_id, note: note), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_note_client_stub.call_rpc_count - end - end - - def test_batch_create_notes - # Create GRPC objects. - grpc_response = ::Grafeas::V1::BatchCreateNotesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - notes = {} - - batch_create_notes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_create_notes, name - assert_kind_of ::Grafeas::V1::BatchCreateNotesRequest, request - assert_equal "hello world", request["parent"] - assert_equal({}, request["notes"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_create_notes_client_stub do - # Create client - c = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.batch_create_notes({ parent: parent, notes: notes }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.batch_create_notes parent: parent, notes: notes do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.batch_create_notes ::Grafeas::V1::BatchCreateNotesRequest.new(parent: parent, notes: notes) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.batch_create_notes({ parent: parent, notes: notes }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.batch_create_notes(::Grafeas::V1::BatchCreateNotesRequest.new(parent: parent, notes: notes), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_create_notes_client_stub.call_rpc_count - end - end - - def test_update_note - # Create GRPC objects. - grpc_response = ::Grafeas::V1::Note.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - note = {} - update_mask = {} - - update_note_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_note, name - assert_kind_of ::Grafeas::V1::UpdateNoteRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Grafeas::V1::Note), request["note"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_note_client_stub do - # Create client - c = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_note({ name: name, note: note, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_note name: name, note: note, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_note ::Grafeas::V1::UpdateNoteRequest.new(name: name, note: note, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_note({ name: name, note: note, 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 - c.update_note(::Grafeas::V1::UpdateNoteRequest.new(name: name, note: note, 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_note_client_stub.call_rpc_count - end - end - - def test_list_note_occurrences - # Create GRPC objects. - grpc_response = ::Grafeas::V1::ListNoteOccurrencesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - - list_note_occurrences_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_note_occurrences, name - assert_kind_of ::Grafeas::V1::ListNoteOccurrencesRequest, 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"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_note_occurrences_client_stub do - # Create client - c = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_note_occurrences({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_note_occurrences name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_note_occurrences ::Grafeas::V1::ListNoteOccurrencesRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_note_occurrences({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_note_occurrences(::Grafeas::V1::ListNoteOccurrencesRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_note_occurrences_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Grafeas::V1::Grafeas::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 ::Grafeas::V1::Grafeas::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 = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Grafeas::V1::Grafeas::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/grafeas-v1/test/helper.rb b/owl-bot-staging/grafeas-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/grafeas-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct"