From 88c5cd376fcf022832c4c75e0664d19add8340d7 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 1 Apr 2026 08:17:41 +0000 Subject: [PATCH 1/2] docs: update SelectiveGapicGeneration usage doc PiperOrigin-RevId: 892649773 Source-Link: https://github.com/googleapis/googleapis/commit/06a20b286850ebcb792cd2085ae6d0556a7c5498 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d9ae66451f81c9df99dbdc9b23bd75d007380f4e Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LW9yZGVyX3RyYWNraW5nLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkOWFlNjY0NTFmODFjOWRmOTlkYmRjOWIyM2JkNzVkMDA3MzgwZjRlIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LW9yZGVyX3RyYWNraW5nLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiZDlhZTY2NDUxZjgxYzlkZjk5ZGJkYzliMjNiZDc1ZDAwNzM4MGY0ZSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXByb2R1Y3RzLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkOWFlNjY0NTFmODFjOWRmOTlkYmRjOWIyM2JkNzVkMDA3MzgwZjRlIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXByb2R1Y3RzLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiZDlhZTY2NDUxZjgxYzlkZjk5ZGJkYzliMjNiZDc1ZDAwNzM4MGY0ZSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXByb21vdGlvbnMtdjEvLk93bEJvdC55YW1sIiwiaCI6ImQ5YWU2NjQ1MWY4MWM5ZGY5OWRiZGM5YjIzYmQ3NWQwMDczODBmNGUifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXByb21vdGlvbnMtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiJkOWFlNjY0NTFmODFjOWRmOTlkYmRjOWIyM2JkNzVkMDA3MzgwZjRlIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXF1b3RhLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkOWFlNjY0NTFmODFjOWRmOTlkYmRjOWIyM2JkNzVkMDA3MzgwZjRlIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXF1b3RhLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiZDlhZTY2NDUxZjgxYzlkZjk5ZGJkYzliMjNiZDc1ZDAwNzM4MGY0ZSJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXJlcG9ydHMtdjEvLk93bEJvdC55YW1sIiwiaCI6ImQ5YWU2NjQ1MWY4MWM5ZGY5OWRiZGM5YjIzYmQ3NWQwMDczODBmNGUifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXJlcG9ydHMtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiJkOWFlNjY0NTFmODFjOWRmOTlkYmRjOWIyM2JkNzVkMDA3MzgwZjRlIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLXNob3BwaW5nLW1lcmNoYW50LXJldmlld3MtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiJkOWFlNjY0NTFmODFjOWRmOTlkYmRjOWIyM2JkNzVkMDA3MzgwZjRlIn0= Copy-Tag: eyJwIjoiZ3JhZmVhcy12MS8uT3dsQm90LnlhbWwiLCJoIjoiZDlhZTY2NDUxZjgxYzlkZjk5ZGJkYzliMjNiZDc1ZDAwNzM4MGY0ZSJ9 --- .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 ++ .../README.md | 154 ++ .../Rakefile | 169 ++ .../gapic_metadata.json | 23 + ...hopping-merchant-order_tracking-v1.gemspec | 29 + ...gle-shopping-merchant-order_tracking-v1.rb | 21 + .../shopping/merchant/order_tracking/v1.rb | 47 + .../v1/order_tracking_signals_service.rb | 57 + .../order_tracking_signals_service/client.rb | 484 +++++ .../credentials.rb | 49 + .../order_tracking_signals_service/paths.rb | 49 + .../v1/order_tracking_signals_service/rest.rb | 54 + .../rest/client.rb | 434 ++++ .../rest/service_stub.rb | 145 ++ .../merchant/order_tracking/v1/rest.rb | 39 + .../merchant/order_tracking/v1/version.rb | 30 + .../v1/order_tracking_signals_pb.rb | 35 + .../v1/order_tracking_signals_services_pb.rb | 47 + .../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 + .../v1/order_tracking_signals.rb | 211 ++ .../proto_docs/google/shopping/type/types.rb | 248 +++ .../proto_docs/google/type/datetime.rb | 104 + .../snippets/Gemfile | 32 + .../create_order_tracking_signal.rb | 47 + ...le.shopping.merchant.ordertracking.v1.json | 55 + ...der_tracking_signals_service_paths_test.rb | 55 + ...rder_tracking_signals_service_rest_test.rb | 155 ++ .../v1/order_tracking_signals_service_test.rb | 166 ++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 ++ .../README.md | 154 ++ .../Rakefile | 169 ++ .../gapic_metadata.json | 23 + ...ing-merchant-order_tracking-v1beta.gemspec | 29 + ...shopping-merchant-order_tracking-v1beta.rb | 21 + .../merchant/order_tracking/v1beta.rb | 47 + .../v1beta/order_tracking_signals_service.rb | 57 + .../order_tracking_signals_service/client.rb | 484 +++++ .../credentials.rb | 49 + .../order_tracking_signals_service/paths.rb | 49 + .../order_tracking_signals_service/rest.rb | 54 + .../rest/client.rb | 434 ++++ .../rest/service_stub.rb | 145 ++ .../merchant/order_tracking/v1beta/rest.rb | 39 + .../merchant/order_tracking/v1beta/version.rb | 30 + .../v1beta/order_tracking_signals_pb.rb | 35 + .../order_tracking_signals_services_pb.rb | 47 + .../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 + .../v1beta/order_tracking_signals.rb | 211 ++ .../proto_docs/google/shopping/type/types.rb | 248 +++ .../proto_docs/google/type/datetime.rb | 104 + .../snippets/Gemfile | 32 + .../create_order_tracking_signal.rb | 47 + ...hopping.merchant.ordertracking.v1beta.json | 55 + ...der_tracking_signals_service_paths_test.rb | 55 + ...rder_tracking_signals_service_rest_test.rb | 155 ++ .../order_tracking_signals_service_test.rb | 166 ++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 ++ .../README.md | 154 ++ .../Rakefile | 169 ++ .../gapic_metadata.json | 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 | 767 +++++++ .../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 | 703 +++++++ .../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 | 72 + .../merchant/products/v1/products_pb.rb | 33 + .../merchant/products/v1/products_service.rb | 57 + .../products/v1/products_service/client.rb | 634 ++++++ .../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 | 577 ++++++ .../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 | 127 ++ .../merchant/products/v1/productinputs.rb | 282 +++ .../shopping/merchant/products/v1/products.rb | 201 ++ .../merchant/products/v1/products_common.rb | 1818 +++++++++++++++++ .../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 | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 ++ .../README.md | 154 ++ .../Rakefile | 169 ++ .../gapic_metadata.json | 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 | 731 +++++++ .../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 | 667 ++++++ .../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 | 604 ++++++ .../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 | 547 +++++ .../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 | 127 ++ .../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 | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 ++ .../README.md | 154 ++ .../Rakefile | 169 ++ .../gapic_metadata.json | 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 | 701 +++++++ .../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 | 637 ++++++ .../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 | 127 ++ .../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 | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 ++ .../README.md | 153 ++ .../Rakefile | 169 ++ .../gapic_metadata.json | 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 | 690 +++++++ .../v1beta/promotions_service/credentials.rb | 49 + .../v1beta/promotions_service/paths.rb | 52 + .../v1beta/promotions_service/rest.rb | 54 + .../v1beta/promotions_service/rest/client.rb | 626 ++++++ .../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 | 127 ++ .../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 | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../google-shopping-merchant-quota-v1/Gemfile | 14 + .../LICENSE.md | 201 ++ .../README.md | 154 ++ .../Rakefile | 169 ++ .../gapic_metadata.json | 42 + .../google-shopping-merchant-quota-v1.gemspec | 28 + .../lib/google-shopping-merchant-quota-v1.rb | 21 + .../lib/google/shopping/merchant/quota/v1.rb | 48 + .../quota/v1/account_limits_service.rb | 57 + .../quota/v1/account_limits_service/client.rb | 595 ++++++ .../v1/account_limits_service/credentials.rb | 49 + .../quota/v1/account_limits_service/paths.rb | 66 + .../quota/v1/account_limits_service/rest.rb | 54 + .../v1/account_limits_service/rest/client.rb | 538 +++++ .../rest/service_stub.rb | 205 ++ .../merchant/quota/v1/accountlimits_pb.rb | 33 + .../quota/v1/accountlimits_services_pb.rb | 49 + .../shopping/merchant/quota/v1/quota_pb.rb | 31 + .../merchant/quota/v1/quota_service.rb | 57 + .../merchant/quota/v1/quota_service/client.rb | 495 +++++ .../quota/v1/quota_service/credentials.rb | 49 + .../merchant/quota/v1/quota_service/paths.rb | 49 + .../merchant/quota/v1/quota_service/rest.rb | 54 + .../quota/v1/quota_service/rest/client.rb | 445 ++++ .../v1/quota_service/rest/service_stub.rb | 144 ++ .../merchant/quota/v1/quota_services_pb.rb | 48 + .../google/shopping/merchant/quota/v1/rest.rb | 40 + .../shopping/merchant/quota/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 + .../merchant/quota/v1/accountlimits.rb | 118 ++ .../shopping/merchant/quota/v1/quota.rb | 108 + .../snippets/Gemfile | 32 + .../get_account_limit.rb | 47 + .../list_account_limits.rb | 51 + .../quota_service/list_quota_groups.rb | 51 + ...ata_google.shopping.merchant.quota.v1.json | 135 ++ .../v1/account_limits_service_paths_test.rb | 67 + .../v1/account_limits_service_rest_test.rb | 210 ++ .../quota/v1/account_limits_service_test.rb | 231 +++ .../quota/v1/quota_service_paths_test.rb | 55 + .../quota/v1/quota_service_rest_test.rb | 155 ++ .../merchant/quota/v1/quota_service_test.rb | 171 ++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 ++ .../README.md | 153 ++ .../Rakefile | 169 ++ .../gapic_metadata.json | 23 + ...gle-shopping-merchant-quota-v1beta.gemspec | 28 + .../google-shopping-merchant-quota-v1beta.rb | 21 + .../google/shopping/merchant/quota/v1beta.rb | 47 + .../merchant/quota/v1beta/quota_pb.rb | 31 + .../merchant/quota/v1beta/quota_service.rb | 57 + .../quota/v1beta/quota_service/client.rb | 495 +++++ .../quota/v1beta/quota_service/credentials.rb | 49 + .../quota/v1beta/quota_service/paths.rb | 49 + .../quota/v1beta/quota_service/rest.rb | 54 + .../quota/v1beta/quota_service/rest/client.rb | 445 ++++ .../v1beta/quota_service/rest/service_stub.rb | 144 ++ .../quota/v1beta/quota_services_pb.rb | 48 + .../shopping/merchant/quota/v1beta/rest.rb | 39 + .../shopping/merchant/quota/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 + .../shopping/merchant/quota/v1beta/quota.rb | 108 + .../snippets/Gemfile | 32 + .../quota_service/list_quota_groups.rb | 51 + ...google.shopping.merchant.quota.v1beta.json | 55 + .../quota/v1beta/quota_service_paths_test.rb | 55 + .../quota/v1beta/quota_service_rest_test.rb | 155 ++ .../quota/v1beta/quota_service_test.rb | 171 ++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 ++ .../README.md | 154 ++ .../Rakefile | 169 ++ .../gapic_metadata.json | 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 | 504 +++++ .../reports/v1/report_service/credentials.rb | 49 + .../reports/v1/report_service/rest.rb | 54 + .../reports/v1/report_service/rest/client.rb | 454 ++++ .../v1/report_service/rest/service_stub.rb | 145 ++ .../merchant/reports/v1/reports_pb.rb | 62 + .../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 | 127 ++ .../shopping/merchant/reports/v1/reports.rb | 1292 ++++++++++++ .../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 | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 ++ .../README.md | 153 ++ .../Rakefile | 169 ++ .../gapic_metadata.json | 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 | 503 +++++ .../v1beta/report_service/credentials.rb | 49 + .../reports/v1beta/report_service/rest.rb | 54 + .../v1beta/report_service/rest/client.rb | 453 ++++ .../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 | 127 ++ .../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 | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 ++ .../README.md | 154 ++ .../Rakefile | 169 ++ .../gapic_metadata.json | 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 | 786 +++++++ .../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 | 715 +++++++ .../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 | 781 +++++++ .../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 | 710 +++++++ .../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 | 127 ++ .../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 | 26 + owl-bot-staging/grafeas-v1/.gitignore | 22 + .../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 | 14 + 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 | 32 + .../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 | 1808 ++++++++++++++++ .../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 | 127 ++ .../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 | 229 +++ .../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 | 317 +++ 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 | 26 + 646 files changed, 84184 insertions(+) create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/google-shopping-merchant-order_tracking-v1.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google-shopping-merchant-order_tracking-v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/shopping/merchant/ordertracking/v1/order_tracking_signals.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/type/datetime.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/snippets/order_tracking_signals_service/create_order_tracking_signal.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1.json create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/google-shopping-merchant-order_tracking-v1beta.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google-shopping-merchant-order_tracking-v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/shopping/type/types.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/type/datetime.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/snippets/order_tracking_signals_service/create_order_tracking_signal.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1beta.json create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-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-quota-v1/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/google-shopping-merchant-quota-v1.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google-shopping-merchant-quota-v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/accountlimits_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/accountlimits_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/shopping/merchant/quota/v1/accountlimits.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/shopping/merchant/quota/v1/quota.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/snippets/account_limits_service/get_account_limit.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/snippets/account_limits_service/list_account_limits.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/snippets/quota_service/list_quota_groups.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/snippets/snippet_metadata_google.shopping.merchant.quota.v1.json create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/test/helper.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/.gitignore create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/.yardopts create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/Rakefile create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/google-shopping-merchant-quota-v1beta.gemspec create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google-shopping-merchant-quota-v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/credentials.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/paths.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_services_pb.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/rest.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/version.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/shopping/merchant/quota/v1beta/quota.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/quota_service/list_quota_groups.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/snippet_metadata_google.shopping.merchant.quota.v1beta.json create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_paths_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_rest_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_test.rb create mode 100644 owl-bot-staging/google-shopping-merchant-quota-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-order_tracking-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/.repo-metadata.json new file mode 100644 index 000000000000..5bc02602e046 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1", + "distribution_name": "google-shopping-merchant-order_tracking-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-order_tracking-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-order_tracking 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-order_tracking-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/.rubocop.yml new file mode 100644 index 000000000000..447f86ce1016 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-order_tracking-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-order_tracking-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..bb5fcaedaf7c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-order_tracking-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-order_tracking-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/order_tracking/v1" + +client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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/order_tracking/v1" + +::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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-order_tracking-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/order_tracking/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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-order_tracking-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1/README.md b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/README.md new file mode 100644 index 000000000000..bc08156536ed --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking](https://rubygems.org/gems/google-shopping-merchant-order_tracking). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-order_tracking-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/order_tracking/v1" + +client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new +request = ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new # (request fields as keyword arguments...) +response = client.create_order_tracking_signal request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-order_tracking-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/order_tracking/v1" +require "logger" + +client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-order_tracking`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-order_tracking-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-order_tracking`. +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-order_tracking-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-order_tracking-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/Rakefile new file mode 100644 index 000000000000..5c003c773f38 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-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/order_tracking/v1/order_tracking_signals_service/credentials" + ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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-order_tracking-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-order_tracking-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-order_tracking-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-order_tracking-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-order_tracking-v1" + header "google-shopping-merchant-order_tracking-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-order_tracking-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-order_tracking-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-order_tracking-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-order_tracking-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-order_tracking-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/gapic_metadata.json new file mode 100644 index 000000000000..3046a917de44 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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.ordertracking.v1", + "libraryPackage": "::Google::Shopping::Merchant::OrderTracking::V1", + "services": { + "OrderTrackingSignalsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client", + "rpcs": { + "CreateOrderTrackingSignal": { + "methods": [ + "create_order_tracking_signal" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/google-shopping-merchant-order_tracking-v1.gemspec b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/google-shopping-merchant-order_tracking-v1.gemspec new file mode 100644 index 000000000000..0d2d0c44b1f2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/google-shopping-merchant-order_tracking-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/order_tracking/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-order_tracking-v1" + gem.version = Google::Shopping::Merchant::OrderTracking::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-order_tracking-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-order_tracking instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "~> 1.0" +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google-shopping-merchant-order_tracking-v1.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google-shopping-merchant-order_tracking-v1.rb new file mode 100644 index 000000000000..1207098a2145 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google-shopping-merchant-order_tracking-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/order_tracking/v1" diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1.rb new file mode 100644 index 000000000000..f2ee7c434c97 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/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/order_tracking/v1/order_tracking_signals_service" +require "google/shopping/merchant/order_tracking/v1/version" + +module Google + module Shopping + module Merchant + module OrderTracking + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/order_tracking/v1" + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/order_tracking/v1" + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/order_tracking/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service.rb new file mode 100644 index 000000000000..0e281d58c4d4 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_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/order_tracking/v1/version" + +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/credentials" +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/paths" +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/client" +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest" + +module Google + module Shopping + module Merchant + module OrderTracking + module V1 + ## + # Service to serve order tracking signals public API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service" + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest" + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new + # + module OrderTrackingSignalsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "order_tracking_signals_service", "helpers.rb" +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/client.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/client.rb new file mode 100644 index 000000000000..81ad2a10065d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/client.rb @@ -0,0 +1,484 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb" + +module Google + module Shopping + module Merchant + module OrderTracking + module V1 + module OrderTrackingSignalsService + ## + # Client for the OrderTrackingSignalsService service. + # + # Service to serve order tracking signals public API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :order_tracking_signals_service_stub + + ## + # Configure the OrderTrackingSignalsService Client class. + # + # See {::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OrderTrackingSignalsService clients + # ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "OrderTracking", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the OrderTrackingSignalsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @order_tracking_signals_service_stub.universe_domain + end + + ## + # Create a new OrderTrackingSignalsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OrderTrackingSignalsService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed 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/ordertracking/v1/order_tracking_signals_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @order_tracking_signals_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @order_tracking_signals_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 + @order_tracking_signals_service_stub.logger + end + + # Service calls + + ## + # Creates new order tracking signal. + # + # @overload create_order_tracking_signal(request, options = nil) + # Pass arguments to `create_order_tracking_signal` via a request object, either of type + # {::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_order_tracking_signal(parent: nil, order_tracking_signal: nil) + # Pass arguments to `create_order_tracking_signal` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the business for which the order signal is + # created. Format: accounts/\\{account} + # @param order_tracking_signal [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal, ::Hash] + # Required. The order signal to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/order_tracking/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new + # + # # Call the create_order_tracking_signal method. + # result = client.create_order_tracking_signal request + # + # # The returned object is of type Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal. + # p result + # + def create_order_tracking_signal request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_order_tracking_signal.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::OrderTracking::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_order_tracking_signal.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_order_tracking_signal.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @order_tracking_signals_service_stub.call_rpc :create_order_tracking_signal, request, 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 OrderTrackingSignalsService API. + # + # This class represents the configuration for OrderTrackingSignalsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_order_tracking_signal to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_order_tracking_signal.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_order_tracking_signal.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the OrderTrackingSignalsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_order_tracking_signal` + # @return [::Gapic::Config::Method] + # + attr_reader :create_order_tracking_signal + + # @private + def initialize parent_rpcs = nil + create_order_tracking_signal_config = parent_rpcs.create_order_tracking_signal if parent_rpcs.respond_to? :create_order_tracking_signal + @create_order_tracking_signal = ::Gapic::Config::Method.new create_order_tracking_signal_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-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/credentials.rb new file mode 100644 index 000000000000..7b4087307466 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_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 OrderTracking + module V1 + module OrderTrackingSignalsService + # Credentials for the OrderTrackingSignalsService 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-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/paths.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/paths.rb new file mode 100644 index 000000000000..c2b73f02c8d1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module OrderTracking + module V1 + module OrderTrackingSignalsService + # Path helper methods for the OrderTrackingSignalsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest.rb new file mode 100644 index 000000000000..6833ff75d496 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_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/order_tracking/v1/version" + +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/credentials" +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/paths" +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/client" + +module Google + module Shopping + module Merchant + module OrderTracking + module V1 + ## + # Service to serve order tracking signals public API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest" + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new + # + module OrderTrackingSignalsService + # 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/order_tracking/v1/order_tracking_signals_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/client.rb new file mode 100644 index 000000000000..7d5048bfe3f9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/client.rb @@ -0,0 +1,434 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb" +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module OrderTracking + module V1 + module OrderTrackingSignalsService + module Rest + ## + # REST client for the OrderTrackingSignalsService service. + # + # Service to serve order tracking signals public API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :order_tracking_signals_service_stub + + ## + # Configure the OrderTrackingSignalsService Client class. + # + # See {::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OrderTrackingSignalsService clients + # ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "OrderTracking", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the OrderTrackingSignalsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @order_tracking_signals_service_stub.universe_domain + end + + ## + # Create a new OrderTrackingSignalsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OrderTrackingSignalsService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @order_tracking_signals_service_stub = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @order_tracking_signals_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 + @order_tracking_signals_service_stub.logger + end + + # Service calls + + ## + # Creates new order tracking signal. + # + # @overload create_order_tracking_signal(request, options = nil) + # Pass arguments to `create_order_tracking_signal` via a request object, either of type + # {::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_order_tracking_signal(parent: nil, order_tracking_signal: nil) + # Pass arguments to `create_order_tracking_signal` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the business for which the order signal is + # created. Format: accounts/\\{account} + # @param order_tracking_signal [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal, ::Hash] + # Required. The order signal to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/order_tracking/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new + # + # # Call the create_order_tracking_signal method. + # result = client.create_order_tracking_signal request + # + # # The returned object is of type Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal. + # p result + # + def create_order_tracking_signal request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_order_tracking_signal.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::OrderTracking::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_order_tracking_signal.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_order_tracking_signal.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @order_tracking_signals_service_stub.create_order_tracking_signal request, 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 OrderTrackingSignalsService REST API. + # + # This class represents the configuration for OrderTrackingSignalsService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_order_tracking_signal to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_order_tracking_signal.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_order_tracking_signal.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the OrderTrackingSignalsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_order_tracking_signal` + # @return [::Gapic::Config::Method] + # + attr_reader :create_order_tracking_signal + + # @private + def initialize parent_rpcs = nil + create_order_tracking_signal_config = parent_rpcs.create_order_tracking_signal if parent_rpcs.respond_to? :create_order_tracking_signal + @create_order_tracking_signal = ::Gapic::Config::Method.new create_order_tracking_signal_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-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/service_stub.rb new file mode 100644 index 000000000000..c8f1fe2d2d2d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_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/ordertracking/v1/order_tracking_signals_pb" + +module Google + module Shopping + module Merchant + module OrderTracking + module V1 + module OrderTrackingSignalsService + module Rest + ## + # REST service stub for the OrderTrackingSignalsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_order_tracking_signal REST call + # + # @param request_pb [::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] + # A result object deserialized from the server's reply + def create_order_tracking_signal request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_order_tracking_signal_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_order_tracking_signal", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_order_tracking_signal REST call + # + # @param request_pb [::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_order_tracking_signal_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/ordertracking/v1/{parent}/orderTrackingSignals", + body: "order_tracking_signal", + 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-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/rest.rb new file mode 100644 index 000000000000..e370c27e3c74 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/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/order_tracking/v1/order_tracking_signals_service/rest" +require "google/shopping/merchant/order_tracking/v1/version" + +module Google + module Shopping + module Merchant + module OrderTracking + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/order_tracking/v1/rest" + # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/version.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/version.rb new file mode 100644 index 000000000000..ee7a7664f7b0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/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 OrderTracking + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb.rb new file mode 100644 index 000000000000..785e6d249b62 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/ordertracking/v1/order_tracking_signals.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/shopping/type/types_pb' +require 'google/type/datetime_pb' + + +descriptor_data = "\nFgoogle/shopping/merchant/ordertracking/v1/order_tracking_signals.proto\x12)google.shopping.merchant.ordertracking.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/datetime.proto\"\xe9\x01\n CreateOrderTrackingSignalRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12%\n\x18order_tracking_signal_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x62\n\x15order_tracking_signal\x18\x03 \x01(\x0b\x32>.google.shopping.merchant.ordertracking.v1.OrderTrackingSignalB\x03\xe0\x41\x02\"\xd3\x0c\n\x13OrderTrackingSignal\x12%\n\x18order_tracking_signal_id\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bmerchant_id\x18\x0c \x01(\x03\x42\x03\xe0\x41\x01\x12\x36\n\x12order_created_time\x18\x01 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x02\x12\x15\n\x08order_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12g\n\rshipping_info\x18\x03 \x03(\x0b\x32K.google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.ShippingInfoB\x03\xe0\x41\x02\x12g\n\nline_items\x18\x04 \x03(\x0b\x32N.google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.LineItemDetailsB\x03\xe0\x41\x02\x12\x7f\n\x1ashipment_line_item_mapping\x18\x05 \x03(\x0b\x32V.google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.ShipmentLineItemMappingB\x03\xe0\x41\x01\x12\x44\n\x15\x63ustomer_shipping_fee\x18\x06 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12!\n\x14\x64\x65livery_postal_code\x18\t \x01(\tB\x03\xe0\x41\x01\x12!\n\x14\x64\x65livery_region_code\x18\n \x01(\tB\x03\xe0\x41\x01\x1a\xf0\x04\n\x0cShippingInfo\x12\x18\n\x0bshipment_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0btracking_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x63\x61rrier\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x63\x61rrier_service\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x30\n\x0cshipped_time\x18\x05 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x01\x12\x42\n\x1e\x65\x61rliest_delivery_promise_time\x18\x06 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x01\x12@\n\x1clatest_delivery_promise_time\x18\x07 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x01\x12\x38\n\x14\x61\x63tual_delivery_time\x18\x08 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x01\x12w\n\x0fshipping_status\x18\t \x01(\x0e\x32Y.google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.ShippingInfo.ShippingStateB\x03\xe0\x41\x02\x12\x1f\n\x12origin_postal_code\x18\n \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12origin_region_code\x18\x0b \x01(\tB\x03\xe0\x41\x02\"K\n\rShippingState\x12\x1e\n\x1aSHIPPING_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SHIPPED\x10\x01\x12\r\n\tDELIVERED\x10\x02\x1a\xd8\x01\n\x0fLineItemDetails\x12\x19\n\x0cline_item_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nproduct_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05gtins\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12\x10\n\x03mpn\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\rproduct_title\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05\x62rand\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x15\n\x08quantity\x18\x07 \x01(\x03\x42\x03\xe0\x41\x02\x42\x10\n\x0e_product_titleB\x08\n\x06_brand\x1a\x65\n\x17ShipmentLineItemMapping\x12\x18\n\x0bshipment_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cline_item_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08quantity\x18\x03 \x01(\x03\x42\x03\xe0\x41\x02\x42\x18\n\x16_customer_shipping_fee2\x8e\x03\n\x1bOrderTrackingSignalsService\x12\xa5\x02\n\x19\x43reateOrderTrackingSignal\x12K.google.shopping.merchant.ordertracking.v1.CreateOrderTrackingSignalRequest\x1a>.google.shopping.merchant.ordertracking.v1.OrderTrackingSignal\"{\xda\x41\x1fparent,order_tracking_signal_id\x82\xd3\xe4\x93\x02S\":/ordertracking/v1/{parent=accounts/*}/orderTrackingSignals:\x15order_tracking_signal\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xea\x02\n-com.google.shopping.merchant.ordertracking.v1B\x19OrderTrackingSignalsProtoP\x01ZYcloud.google.com/go/shopping/merchant/ordertracking/apiv1/ordertrackingpb;ordertrackingpb\xaa\x02)Google.Shopping.Merchant.OrderTracking.V1\xca\x02)Google\\Shopping\\Merchant\\OrderTracking\\V1\xea\x02-Google::Shopping::Merchant::OrderTracking::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 OrderTracking + module V1 + CreateOrderTrackingSignalRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1.CreateOrderTrackingSignalRequest").msgclass + OrderTrackingSignal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1.OrderTrackingSignal").msgclass + OrderTrackingSignal::ShippingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.ShippingInfo").msgclass + OrderTrackingSignal::ShippingInfo::ShippingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.ShippingInfo.ShippingState").enummodule + OrderTrackingSignal::LineItemDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.LineItemDetails").msgclass + OrderTrackingSignal::ShipmentLineItemMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.ShipmentLineItemMapping").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_services_pb.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_services_pb.rb new file mode 100644 index 000000000000..25994a1c1613 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_services_pb.rb @@ -0,0 +1,47 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/ordertracking/v1/order_tracking_signals.proto for package 'Google.Shopping.Merchant.OrderTracking.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/ordertracking/v1/order_tracking_signals_pb' + +module Google + module Shopping + module Merchant + module OrderTracking + module V1 + module OrderTrackingSignalsService + # Service to serve order tracking signals public API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.ordertracking.v1.OrderTrackingSignalsService' + + # Creates new order tracking signal. + rpc :CreateOrderTrackingSignal, ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest, ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1/proto_docs/google/shopping/merchant/ordertracking/v1/order_tracking_signals.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/shopping/merchant/ordertracking/v1/order_tracking_signals.rb new file mode 100644 index 000000000000..9534cd1cf2df --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/shopping/merchant/ordertracking/v1/order_tracking_signals.rb @@ -0,0 +1,211 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module OrderTracking + module V1 + # Signals only can be created but not updated. + # Businesses need to call this API only when the order is completely shipped. + # Creates new order signal. + # @!attribute [rw] parent + # @return [::String] + # Required. The account of the business for which the order signal is + # created. Format: accounts/\\{account} + # @!attribute [r] order_tracking_signal_id + # @return [::String] + # Output only. The ID that uniquely identifies this order tracking signal. + # @!attribute [rw] order_tracking_signal + # @return [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] + # Required. The order signal to be created. + class CreateOrderTrackingSignalRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a business trade from which signals are extracted, such as + # shipping. + # @!attribute [r] order_tracking_signal_id + # @return [::Integer] + # Output only. The ID that uniquely identifies this order tracking signal. + # @!attribute [rw] merchant_id + # @return [::Integer] + # Optional. The Google Merchant Center ID of this order tracking signal. This + # value is optional. If left unset, the caller's Merchant Center ID is used. + # You must request access in order to provide data on behalf of another + # business. For more information, see [Submitting Order Tracking + # Signals](/shopping-content/guides/order-tracking-signals). + # @!attribute [rw] order_created_time + # @return [::Google::Type::DateTime] + # Required. The time when the order was created on the businesses side. + # Include the year and timezone string, if available. + # @!attribute [rw] order_id + # @return [::String] + # Required. The ID of the order on the businesses side. This field will be + # hashed in returned OrderTrackingSignal creation response. + # @!attribute [rw] shipping_info + # @return [::Array<::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal::ShippingInfo>] + # Required. The shipping information for the order. + # @!attribute [rw] line_items + # @return [::Array<::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal::LineItemDetails>] + # Required. Information about line items in the order. + # @!attribute [rw] shipment_line_item_mapping + # @return [::Array<::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal::ShipmentLineItemMapping>] + # Optional. The mapping of the line items to the shipment information. + # @!attribute [rw] customer_shipping_fee + # @return [::Google::Shopping::Type::Price] + # Optional. The shipping fee of the order; + # this value should be set to zero in the case of free shipping. + # @!attribute [rw] delivery_postal_code + # @return [::String] + # Optional. The delivery postal code, as a continuous string without spaces + # or dashes, for example "95016". This field will be anonymized in returned + # OrderTrackingSignal creation response. + # @!attribute [rw] delivery_region_code + # @return [::String] + # Optional. The [CLDR territory code] + # (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for + # the shipping destination. + class OrderTrackingSignal + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The shipping information for the order. + # @!attribute [rw] shipment_id + # @return [::String] + # Required. The shipment ID. This field will be hashed in returned + # OrderTrackingSignal creation response. + # @!attribute [rw] tracking_id + # @return [::String] + # Optional. The tracking ID of the shipment. This field is required if one + # of the following fields is absent: earliest_delivery_promise_time, + # latest_delivery_promise_time, and actual_delivery_time. + # @!attribute [rw] carrier + # @return [::String] + # Optional. The name of the shipping carrier for the delivery. This field + # is required if one of the following fields is absent: + # earliest_delivery_promise_time, latest_delivery_promise_time, + # and actual_delivery_time. + # @!attribute [rw] carrier_service + # @return [::String] + # Optional. The service type for fulfillment, such as GROUND, FIRST_CLASS, + # etc. + # @!attribute [rw] shipped_time + # @return [::Google::Type::DateTime] + # Optional. The time when the shipment was shipped. + # Include the year and timezone string, if available. + # @!attribute [rw] earliest_delivery_promise_time + # @return [::Google::Type::DateTime] + # Optional. The earliest delivery promised time. + # Include the year and timezone string, if available. + # This field is required, if one of the following fields is absent: + # tracking_id or carrier_name. + # @!attribute [rw] latest_delivery_promise_time + # @return [::Google::Type::DateTime] + # Optional. The latest delivery promised time. + # Include the year and timezone string, if available. + # This field is required, if one of the following fields is absent: + # tracking_id or carrier_name. + # @!attribute [rw] actual_delivery_time + # @return [::Google::Type::DateTime] + # Optional. The time when the shipment was actually delivered. + # Include the year and timezone string, if available. + # This field is required, if one of the following fields is absent: + # tracking_id or carrier_name. + # @!attribute [rw] shipping_status + # @return [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal::ShippingInfo::ShippingState] + # Required. The status of the shipment. + # @!attribute [rw] origin_postal_code + # @return [::String] + # Required. The origin postal code, as a continuous string without spaces + # or dashes, for example "95016". This field will be anonymized in returned + # OrderTrackingSignal creation response. + # @!attribute [rw] origin_region_code + # @return [::String] + # Required. The [CLDR territory code] + # (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for + # the shipping origin. + class ShippingInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The current status of the shipments. + module ShippingState + # The shipping status is not known to business. + SHIPPING_STATE_UNSPECIFIED = 0 + + # All items are shipped. + SHIPPED = 1 + + # The shipment is already delivered. + DELIVERED = 2 + end + end + + # The line items of the order. + # @!attribute [rw] line_item_id + # @return [::String] + # Required. The ID for this line item. + # @!attribute [rw] product_id + # @return [::String] + # Required. The Content API REST ID of the product, in the + # form channel:contentLanguage:targetCountry:offerId. + # @!attribute [rw] gtins + # @return [::Array<::String>] + # Optional. The Global Trade Item Numbers. + # @!attribute [rw] mpn + # @return [::String] + # Optional. The manufacturer part number. + # @!attribute [rw] product_title + # @return [::String] + # Optional. Plain text title of this product. + # @!attribute [rw] brand + # @return [::String] + # Optional. Brand of the product. + # @!attribute [rw] quantity + # @return [::Integer] + # Required. The quantity of the line item in the order. + class LineItemDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents how many items are in the shipment for the given shipment_id + # and line_item_id. + # @!attribute [rw] shipment_id + # @return [::String] + # Required. The shipment ID. This field will be hashed in returned + # OrderTrackingSignal creation response. + # @!attribute [rw] line_item_id + # @return [::String] + # Required. The line item ID. + # @!attribute [rw] quantity + # @return [::Integer] + # Required. The line item quantity in the shipment. + class ShipmentLineItemMapping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/type/datetime.rb new file mode 100644 index 000000000000..10625864f3dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/type/datetime.rb @@ -0,0 +1,104 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents civil time (or occasionally physical time). + # + # This type can represent a civil time in one of a few possible ways: + # + # * When utc_offset is set and time_zone is unset: a civil time on a calendar + # day with a particular offset from UTC. + # * When time_zone is set and utc_offset is unset: a civil time on a calendar + # day in a particular time zone. + # * When neither time_zone nor utc_offset is set: a civil time on a calendar + # day in local time. + # + # The date is relative to the Proleptic Gregorian Calendar. + # + # If year, month, or day are 0, the DateTime is considered not to have a + # specific year, month, or day respectively. + # + # This type may also be used to represent a physical time if all the date and + # time fields are set and either case of the `time_offset` oneof is set. + # Consider using `Timestamp` message for physical time instead. If your use + # case also would like to store the user's timezone, that can be done in + # another field. + # + # This type is more flexible than some applications may want. Make sure to + # document and validate your application's limitations. + # @!attribute [rw] year + # @return [::Integer] + # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a + # datetime without a year. + # @!attribute [rw] month + # @return [::Integer] + # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a + # datetime without a month. + # @!attribute [rw] day + # @return [::Integer] + # Optional. Day of month. Must be from 1 to 31 and valid for the year and + # month, or 0 if specifying a datetime without a day. + # @!attribute [rw] hours + # @return [::Integer] + # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults + # to 0 (midnight). An API may choose to allow the value "24:00:00" for + # scenarios like business closing time. + # @!attribute [rw] minutes + # @return [::Integer] + # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0. + # @!attribute [rw] seconds + # @return [::Integer] + # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, + # defaults to 0. An API may allow the value 60 if it allows leap-seconds. + # @!attribute [rw] nanos + # @return [::Integer] + # Optional. Fractions of seconds in nanoseconds. Must be from 0 to + # 999,999,999, defaults to 0. + # @!attribute [rw] utc_offset + # @return [::Google::Protobuf::Duration] + # UTC offset. Must be whole seconds, between -18 hours and +18 hours. + # For example, a UTC offset of -4:00 would be represented as + # { seconds: -14400 }. + # + # Note: The following fields are mutually exclusive: `utc_offset`, `time_zone`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] time_zone + # @return [::Google::Type::TimeZone] + # Time zone. + # + # Note: The following fields are mutually exclusive: `time_zone`, `utc_offset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DateTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a time zone from the + # [IANA Time Zone Database](https://www.iana.org/time-zones). + # @!attribute [rw] id + # @return [::String] + # IANA Time Zone Database time zone. For example "America/New_York". + # @!attribute [rw] version + # @return [::String] + # Optional. IANA Time Zone Database version number. For example "2019a". + class TimeZone + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/snippets/Gemfile new file mode 100644 index 000000000000..112bd74accfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1", path: "../" +else + gem "google-shopping-merchant-order_tracking-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-order_tracking-v1/snippets/order_tracking_signals_service/create_order_tracking_signal.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/snippets/order_tracking_signals_service/create_order_tracking_signal.rb new file mode 100644 index 000000000000..3604679a025f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/snippets/order_tracking_signals_service/create_order_tracking_signal.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_OrderTrackingSignalsService_CreateOrderTrackingSignal_sync] +require "google/shopping/merchant/order_tracking/v1" + +## +# Snippet for the create_order_tracking_signal call in the OrderTrackingSignalsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client#create_order_tracking_signal. +# +def create_order_tracking_signal + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new + + # Call the create_order_tracking_signal method. + result = client.create_order_tracking_signal request + + # The returned object is of type Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal. + p result +end +# [END merchantapi_v1_generated_OrderTrackingSignalsService_CreateOrderTrackingSignal_sync] diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1.json b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1.json new file mode 100644 index 000000000000..f52a48a047c9 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1.json @@ -0,0 +1,55 @@ +{ + "client_library": { + "name": "google-shopping-merchant-order_tracking-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.ordertracking.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_OrderTrackingSignalsService_CreateOrderTrackingSignal_sync", + "title": "Snippet for the create_order_tracking_signal call in the OrderTrackingSignalsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client#create_order_tracking_signal.", + "file": "order_tracking_signals_service/create_order_tracking_signal.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_order_tracking_signal", + "full_name": "::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client#create_order_tracking_signal", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal", + "client": { + "short_name": "OrderTrackingSignalsService::Client", + "full_name": "::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client" + }, + "method": { + "short_name": "CreateOrderTrackingSignal", + "full_name": "google.shopping.merchant.ordertracking.v1.OrderTrackingSignalsService.CreateOrderTrackingSignal", + "service": { + "short_name": "OrderTrackingSignalsService", + "full_name": "google.shopping.merchant.ordertracking.v1.OrderTrackingSignalsService" + } + } + }, + "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-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_paths_test.rb new file mode 100644 index 000000000000..2a134e2af9d5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_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/order_tracking/v1/order_tracking_signals_service" + +class ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::ClientPathsTest < Minitest::Test + class DummyStub + 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::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_rest_test.rb new file mode 100644 index 000000000000..666c42272ae0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_rest_test.rb @@ -0,0 +1,155 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb" +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest" + + +class ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_order_tracking_signal + # Create test objects. + client_result = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + order_tracking_signal_id = "hello world" + order_tracking_signal = {} + + create_order_tracking_signal_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::ServiceStub.stub :transcode_create_order_tracking_signal_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_order_tracking_signal_client_stub do + # Create client + client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_order_tracking_signal({ parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_order_tracking_signal parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_order_tracking_signal ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new(parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_order_tracking_signal({ parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_order_tracking_signal(::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new(parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_order_tracking_signal_client_stub.call_count + end + end + end + + def test_configure + 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::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new do |config| + 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::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_test.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_test.rb new file mode 100644 index 000000000000..4cb28d166ff1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb" +require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service" + +class ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_order_tracking_signal + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + order_tracking_signal_id = "hello world" + order_tracking_signal = {} + + create_order_tracking_signal_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_order_tracking_signal, name + assert_kind_of ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["order_tracking_signal_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal), request["order_tracking_signal"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_order_tracking_signal_client_stub do + # Create client + client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_order_tracking_signal({ parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_order_tracking_signal parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_order_tracking_signal ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new(parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_order_tracking_signal({ parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_order_tracking_signal(::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new(parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_order_tracking_signal_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| + 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::OrderTracking::V1::OrderTrackingSignalsService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::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::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..507d94da3767 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta", + "distribution_name": "google-shopping-merchant-order_tracking-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-order_tracking-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-order_tracking 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-order_tracking-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.rubocop.yml new file mode 100644 index 000000000000..d65af95cef0c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-order_tracking-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-order_tracking-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.yardopts new file mode 100644 index 000000000000..3ddd15e0cf87 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..160ef7049979 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-order_tracking-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-order_tracking-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/order_tracking/v1beta" + +client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::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/order_tracking/v1beta" + +::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::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-order_tracking-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/order_tracking/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::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-order_tracking-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/README.md new file mode 100644 index 000000000000..1b737a114878 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking](https://rubygems.org/gems/google-shopping-merchant-order_tracking). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-order_tracking-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/order_tracking/v1beta" + +client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new +request = ::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest.new # (request fields as keyword arguments...) +response = client.create_order_tracking_signal request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-order_tracking-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/order_tracking/v1beta" +require "logger" + +client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-order_tracking`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-order_tracking-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-order_tracking`. +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-order_tracking-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-order_tracking-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/Rakefile new file mode 100644 index 000000000000..d0ef54fb406e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-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/order_tracking/v1beta/order_tracking_signals_service/credentials" + ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::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-order_tracking-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-order_tracking-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-order_tracking-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-order_tracking-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-order_tracking-v1beta" + header "google-shopping-merchant-order_tracking-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-order_tracking-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-order_tracking-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-order_tracking-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-order_tracking-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-order_tracking-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..1cbb753f55d5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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.ordertracking.v1beta", + "libraryPackage": "::Google::Shopping::Merchant::OrderTracking::V1beta", + "services": { + "OrderTrackingSignalsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client", + "rpcs": { + "CreateOrderTrackingSignal": { + "methods": [ + "create_order_tracking_signal" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/google-shopping-merchant-order_tracking-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/google-shopping-merchant-order_tracking-v1beta.gemspec new file mode 100644 index 000000000000..cef34410bf17 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/google-shopping-merchant-order_tracking-v1beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/order_tracking/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-order_tracking-v1beta" + gem.version = Google::Shopping::Merchant::OrderTracking::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-order_tracking-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-order_tracking instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google-shopping-merchant-order_tracking-v1beta.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google-shopping-merchant-order_tracking-v1beta.rb new file mode 100644 index 000000000000..af3013d4b922 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google-shopping-merchant-order_tracking-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/order_tracking/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta.rb new file mode 100644 index 000000000000..4eadf8f9b971 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/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/order_tracking/v1beta/order_tracking_signals_service" +require "google/shopping/merchant/order_tracking/v1beta/version" + +module Google + module Shopping + module Merchant + module OrderTracking + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/order_tracking/v1beta" + # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/order_tracking/v1beta" + # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/shopping/merchant/order_tracking/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service.rb new file mode 100644 index 000000000000..a8a4b7c1824e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_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/order_tracking/v1beta/version" + +require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/credentials" +require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/paths" +require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/client" +require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest" + +module Google + module Shopping + module Merchant + module OrderTracking + module V1beta + ## + # Service to serve order tracking signals public API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service" + # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest" + # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.new + # + module OrderTrackingSignalsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "order_tracking_signals_service", "helpers.rb" +require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/client.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/client.rb new file mode 100644 index 000000000000..abb451de4ae1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/client.rb @@ -0,0 +1,484 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_pb" + +module Google + module Shopping + module Merchant + module OrderTracking + module V1beta + module OrderTrackingSignalsService + ## + # Client for the OrderTrackingSignalsService service. + # + # Service to serve order tracking signals public API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :order_tracking_signals_service_stub + + ## + # Configure the OrderTrackingSignalsService Client class. + # + # See {::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OrderTrackingSignalsService clients + # ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "OrderTracking", "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 OrderTrackingSignalsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @order_tracking_signals_service_stub.universe_domain + end + + ## + # Create a new OrderTrackingSignalsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OrderTrackingSignalsService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed 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/ordertracking/v1beta/order_tracking_signals_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @order_tracking_signals_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @order_tracking_signals_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 + @order_tracking_signals_service_stub.logger + end + + # Service calls + + ## + # Creates new order tracking signal. + # + # @overload create_order_tracking_signal(request, options = nil) + # Pass arguments to `create_order_tracking_signal` via a request object, either of type + # {::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_order_tracking_signal(parent: nil, order_tracking_signal: nil) + # Pass arguments to `create_order_tracking_signal` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the business for which the order signal is + # created. Format: accounts/\\{account} + # @param order_tracking_signal [::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal, ::Hash] + # Required. The order signal to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/order_tracking/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest.new + # + # # Call the create_order_tracking_signal method. + # result = client.create_order_tracking_signal request + # + # # The returned object is of type Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal. + # p result + # + def create_order_tracking_signal request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_order_tracking_signal.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::OrderTracking::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_order_tracking_signal.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_order_tracking_signal.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @order_tracking_signals_service_stub.call_rpc :create_order_tracking_signal, request, 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 OrderTrackingSignalsService API. + # + # This class represents the configuration for OrderTrackingSignalsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_order_tracking_signal to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_order_tracking_signal.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_order_tracking_signal.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the OrderTrackingSignalsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_order_tracking_signal` + # @return [::Gapic::Config::Method] + # + attr_reader :create_order_tracking_signal + + # @private + def initialize parent_rpcs = nil + create_order_tracking_signal_config = parent_rpcs.create_order_tracking_signal if parent_rpcs.respond_to? :create_order_tracking_signal + @create_order_tracking_signal = ::Gapic::Config::Method.new create_order_tracking_signal_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-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/credentials.rb new file mode 100644 index 000000000000..3e76354edad0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_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 OrderTracking + module V1beta + module OrderTrackingSignalsService + # Credentials for the OrderTrackingSignalsService 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-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/paths.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/paths.rb new file mode 100644 index 000000000000..d56d690c84bd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module OrderTracking + module V1beta + module OrderTrackingSignalsService + # Path helper methods for the OrderTrackingSignalsService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest.rb new file mode 100644 index 000000000000..5a4a5a0c6bfb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_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/order_tracking/v1beta/version" + +require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/credentials" +require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/paths" +require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest/client" + +module Google + module Shopping + module Merchant + module OrderTracking + module V1beta + ## + # Service to serve order tracking signals public API. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest" + # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.new + # + module OrderTrackingSignalsService + # 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/order_tracking/v1beta/order_tracking_signals_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest/client.rb new file mode 100644 index 000000000000..68936a66a505 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest/client.rb @@ -0,0 +1,434 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_pb" +require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module OrderTracking + module V1beta + module OrderTrackingSignalsService + module Rest + ## + # REST client for the OrderTrackingSignalsService service. + # + # Service to serve order tracking signals public API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :order_tracking_signals_service_stub + + ## + # Configure the OrderTrackingSignalsService Client class. + # + # See {::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OrderTrackingSignalsService clients + # ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "OrderTracking", "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 OrderTrackingSignalsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @order_tracking_signals_service_stub.universe_domain + end + + ## + # Create a new OrderTrackingSignalsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OrderTrackingSignalsService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @order_tracking_signals_service_stub = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @order_tracking_signals_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 + @order_tracking_signals_service_stub.logger + end + + # Service calls + + ## + # Creates new order tracking signal. + # + # @overload create_order_tracking_signal(request, options = nil) + # Pass arguments to `create_order_tracking_signal` via a request object, either of type + # {::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_order_tracking_signal(parent: nil, order_tracking_signal: nil) + # Pass arguments to `create_order_tracking_signal` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the business for which the order signal is + # created. Format: accounts/\\{account} + # @param order_tracking_signal [::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal, ::Hash] + # Required. The order signal to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/order_tracking/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest.new + # + # # Call the create_order_tracking_signal method. + # result = client.create_order_tracking_signal request + # + # # The returned object is of type Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal. + # p result + # + def create_order_tracking_signal request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_order_tracking_signal.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::OrderTracking::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_order_tracking_signal.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_order_tracking_signal.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @order_tracking_signals_service_stub.create_order_tracking_signal request, 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 OrderTrackingSignalsService REST API. + # + # This class represents the configuration for OrderTrackingSignalsService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_order_tracking_signal to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_order_tracking_signal.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_order_tracking_signal.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the OrderTrackingSignalsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_order_tracking_signal` + # @return [::Gapic::Config::Method] + # + attr_reader :create_order_tracking_signal + + # @private + def initialize parent_rpcs = nil + create_order_tracking_signal_config = parent_rpcs.create_order_tracking_signal if parent_rpcs.respond_to? :create_order_tracking_signal + @create_order_tracking_signal = ::Gapic::Config::Method.new create_order_tracking_signal_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-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest/service_stub.rb new file mode 100644 index 000000000000..965564b983ba --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_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/ordertracking/v1beta/order_tracking_signals_pb" + +module Google + module Shopping + module Merchant + module OrderTracking + module V1beta + module OrderTrackingSignalsService + module Rest + ## + # REST service stub for the OrderTrackingSignalsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_order_tracking_signal REST call + # + # @param request_pb [::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal] + # A result object deserialized from the server's reply + def create_order_tracking_signal request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_order_tracking_signal_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_order_tracking_signal", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_order_tracking_signal REST call + # + # @param request_pb [::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_order_tracking_signal_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/ordertracking/v1beta/{parent}/ordertrackingsignals", + body: "order_tracking_signal", + 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-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/rest.rb new file mode 100644 index 000000000000..c74387fe85ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/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/order_tracking/v1beta/order_tracking_signals_service/rest" +require "google/shopping/merchant/order_tracking/v1beta/version" + +module Google + module Shopping + module Merchant + module OrderTracking + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/order_tracking/v1beta/rest" + # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.new + # + module V1beta + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/version.rb new file mode 100644 index 000000000000..9f4f1a9df097 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/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 OrderTracking + module V1beta + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_pb.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_pb.rb new file mode 100644 index 000000000000..c8410d57a531 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/ordertracking/v1beta/order_tracking_signals.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/shopping/type/types_pb' +require 'google/type/datetime_pb' + + +descriptor_data = "\nJgoogle/shopping/merchant/ordertracking/v1beta/order_tracking_signals.proto\x12-google.shopping.merchant.ordertracking.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/datetime.proto\"\xed\x01\n CreateOrderTrackingSignalRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12%\n\x18order_tracking_signal_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x66\n\x15order_tracking_signal\x18\x03 \x01(\x0b\x32\x42.google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignalB\x03\xe0\x41\x02\"\xe3\x0c\n\x13OrderTrackingSignal\x12%\n\x18order_tracking_signal_id\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bmerchant_id\x18\x0c \x01(\x03\x42\x03\xe0\x41\x01\x12\x36\n\x12order_created_time\x18\x01 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x02\x12\x15\n\x08order_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12k\n\rshipping_info\x18\x03 \x03(\x0b\x32O.google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal.ShippingInfoB\x03\xe0\x41\x02\x12k\n\nline_items\x18\x04 \x03(\x0b\x32R.google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal.LineItemDetailsB\x03\xe0\x41\x02\x12\x83\x01\n\x1ashipment_line_item_mapping\x18\x05 \x03(\x0b\x32Z.google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal.ShipmentLineItemMappingB\x03\xe0\x41\x01\x12\x44\n\x15\x63ustomer_shipping_fee\x18\x06 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12!\n\x14\x64\x65livery_postal_code\x18\t \x01(\tB\x03\xe0\x41\x01\x12!\n\x14\x64\x65livery_region_code\x18\n \x01(\tB\x03\xe0\x41\x01\x1a\xf4\x04\n\x0cShippingInfo\x12\x18\n\x0bshipment_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0btracking_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x63\x61rrier\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x63\x61rrier_service\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x30\n\x0cshipped_time\x18\x05 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x01\x12\x42\n\x1e\x65\x61rliest_delivery_promise_time\x18\x06 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x01\x12@\n\x1clatest_delivery_promise_time\x18\x07 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x01\x12\x38\n\x14\x61\x63tual_delivery_time\x18\x08 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x01\x12{\n\x0fshipping_status\x18\t \x01(\x0e\x32].google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal.ShippingInfo.ShippingStateB\x03\xe0\x41\x02\x12\x1f\n\x12origin_postal_code\x18\n \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12origin_region_code\x18\x0b \x01(\tB\x03\xe0\x41\x02\"K\n\rShippingState\x12\x1e\n\x1aSHIPPING_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SHIPPED\x10\x01\x12\r\n\tDELIVERED\x10\x02\x1a\xd7\x01\n\x0fLineItemDetails\x12\x19\n\x0cline_item_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nproduct_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04gtin\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03mpn\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\rproduct_title\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05\x62rand\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x15\n\x08quantity\x18\x07 \x01(\x03\x42\x03\xe0\x41\x02\x42\x10\n\x0e_product_titleB\x08\n\x06_brand\x1a\x65\n\x17ShipmentLineItemMapping\x12\x18\n\x0bshipment_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cline_item_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08quantity\x18\x03 \x01(\x03\x42\x03\xe0\x41\x02\x42\x18\n\x16_customer_shipping_fee2\x9a\x03\n\x1bOrderTrackingSignalsService\x12\xb1\x02\n\x19\x43reateOrderTrackingSignal\x12O.google.shopping.merchant.ordertracking.v1beta.CreateOrderTrackingSignalRequest\x1a\x42.google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal\"\x7f\xda\x41\x1fparent,order_tracking_signal_id\x82\xd3\xe4\x93\x02W\">/ordertracking/v1beta/{parent=accounts/*}/ordertrackingsignals:\x15order_tracking_signal\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xfe\x02\n1com.google.shopping.merchant.ordertracking.v1betaB\x19OrderTrackingSignalsProtoP\x01Z]cloud.google.com/go/shopping/merchant/ordertracking/apiv1beta/ordertrackingpb;ordertrackingpb\xaa\x02-Google.Shopping.Merchant.OrderTracking.V1Beta\xca\x02-Google\\Shopping\\Merchant\\OrderTracking\\V1beta\xea\x02\x31Google::Shopping::Merchant::OrderTracking::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 OrderTracking + module V1beta + CreateOrderTrackingSignalRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1beta.CreateOrderTrackingSignalRequest").msgclass + OrderTrackingSignal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal").msgclass + OrderTrackingSignal::ShippingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal.ShippingInfo").msgclass + OrderTrackingSignal::ShippingInfo::ShippingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal.ShippingInfo.ShippingState").enummodule + OrderTrackingSignal::LineItemDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal.LineItemDetails").msgclass + OrderTrackingSignal::ShipmentLineItemMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal.ShipmentLineItemMapping").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_services_pb.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_services_pb.rb new file mode 100644 index 000000000000..ef80c68342f1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_services_pb.rb @@ -0,0 +1,47 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/ordertracking/v1beta/order_tracking_signals.proto for package 'Google.Shopping.Merchant.OrderTracking.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/ordertracking/v1beta/order_tracking_signals_pb' + +module Google + module Shopping + module Merchant + module OrderTracking + module V1beta + module OrderTrackingSignalsService + # Service to serve order tracking signals public API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignalsService' + + # Creates new order tracking signal. + rpc :CreateOrderTrackingSignal, ::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest, ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..03467a3756be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta/proto_docs/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals.rb new file mode 100644 index 000000000000..6451583035ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals.rb @@ -0,0 +1,211 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module OrderTracking + module V1beta + # Signals only can be created but not updated. + # Businesses need to call this API only when the order is completely shipped. + # Creates new order signal. + # @!attribute [rw] parent + # @return [::String] + # Required. The account of the business for which the order signal is + # created. Format: accounts/\\{account} + # @!attribute [r] order_tracking_signal_id + # @return [::String] + # Output only. The ID that uniquely identifies this order tracking signal. + # @!attribute [rw] order_tracking_signal + # @return [::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal] + # Required. The order signal to be created. + class CreateOrderTrackingSignalRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a business trade from which signals are extracted, such as + # shipping. + # @!attribute [r] order_tracking_signal_id + # @return [::Integer] + # Output only. The ID that uniquely identifies this order tracking signal. + # @!attribute [rw] merchant_id + # @return [::Integer] + # Optional. The Google Merchant Center ID of this order tracking signal. This + # value is optional. If left unset, the caller's Merchant Center ID is used. + # You must request access in order to provide data on behalf of another + # business. For more information, see [Submitting Order Tracking + # Signals](/shopping-content/guides/order-tracking-signals). + # @!attribute [rw] order_created_time + # @return [::Google::Type::DateTime] + # Required. The time when the order was created on the businesses side. + # Include the year and timezone string, if available. + # @!attribute [rw] order_id + # @return [::String] + # Required. The ID of the order on the businesses side. This field will be + # hashed in returned OrderTrackingSignal creation response. + # @!attribute [rw] shipping_info + # @return [::Array<::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal::ShippingInfo>] + # Required. The shipping information for the order. + # @!attribute [rw] line_items + # @return [::Array<::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal::LineItemDetails>] + # Required. Information about line items in the order. + # @!attribute [rw] shipment_line_item_mapping + # @return [::Array<::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal::ShipmentLineItemMapping>] + # Optional. The mapping of the line items to the shipment information. + # @!attribute [rw] customer_shipping_fee + # @return [::Google::Shopping::Type::Price] + # Optional. The shipping fee of the order; + # this value should be set to zero in the case of free shipping. + # @!attribute [rw] delivery_postal_code + # @return [::String] + # Optional. The delivery postal code, as a continuous string without spaces + # or dashes, for example "95016". This field will be anonymized in returned + # OrderTrackingSignal creation response. + # @!attribute [rw] delivery_region_code + # @return [::String] + # Optional. The [CLDR territory code] + # (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for + # the shipping destination. + class OrderTrackingSignal + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The shipping information for the order. + # @!attribute [rw] shipment_id + # @return [::String] + # Required. The shipment ID. This field will be hashed in returned + # OrderTrackingSignal creation response. + # @!attribute [rw] tracking_id + # @return [::String] + # Optional. The tracking ID of the shipment. This field is required if one + # of the following fields is absent: earliest_delivery_promise_time, + # latest_delivery_promise_time, and actual_delivery_time. + # @!attribute [rw] carrier + # @return [::String] + # Optional. The name of the shipping carrier for the delivery. This field + # is required if one of the following fields is absent: + # earliest_delivery_promise_time, latest_delivery_promise_time, + # and actual_delivery_time. + # @!attribute [rw] carrier_service + # @return [::String] + # Optional. The service type for fulfillment, such as GROUND, FIRST_CLASS, + # etc. + # @!attribute [rw] shipped_time + # @return [::Google::Type::DateTime] + # Optional. The time when the shipment was shipped. + # Include the year and timezone string, if available. + # @!attribute [rw] earliest_delivery_promise_time + # @return [::Google::Type::DateTime] + # Optional. The earliest delivery promised time. + # Include the year and timezone string, if available. + # This field is required, if one of the following fields is absent: + # tracking_id or carrier_name. + # @!attribute [rw] latest_delivery_promise_time + # @return [::Google::Type::DateTime] + # Optional. The latest delivery promised time. + # Include the year and timezone string, if available. + # This field is required, if one of the following fields is absent: + # tracking_id or carrier_name. + # @!attribute [rw] actual_delivery_time + # @return [::Google::Type::DateTime] + # Optional. The time when the shipment was actually delivered. + # Include the year and timezone string, if available. + # This field is required, if one of the following fields is absent: + # tracking_id or carrier_name. + # @!attribute [rw] shipping_status + # @return [::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal::ShippingInfo::ShippingState] + # Required. The status of the shipment. + # @!attribute [rw] origin_postal_code + # @return [::String] + # Required. The origin postal code, as a continuous string without spaces + # or dashes, for example "95016". This field will be anonymized in returned + # OrderTrackingSignal creation response. + # @!attribute [rw] origin_region_code + # @return [::String] + # Required. The [CLDR territory code] + # (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for + # the shipping origin. + class ShippingInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The current status of the shipments. + module ShippingState + # The shipping status is not known to business. + SHIPPING_STATE_UNSPECIFIED = 0 + + # All items are shipped. + SHIPPED = 1 + + # The shipment is already delivered. + DELIVERED = 2 + end + end + + # The line items of the order. + # @!attribute [rw] line_item_id + # @return [::String] + # Required. The ID for this line item. + # @!attribute [rw] product_id + # @return [::String] + # Required. The Content API REST ID of the product, in the + # form channel:contentLanguage:targetCountry:offerId. + # @!attribute [rw] gtin + # @return [::String] + # Optional. The Global Trade Item Number. + # @!attribute [rw] mpn + # @return [::String] + # Optional. The manufacturer part number. + # @!attribute [rw] product_title + # @return [::String] + # Optional. Plain text title of this product. + # @!attribute [rw] brand + # @return [::String] + # Optional. Brand of the product. + # @!attribute [rw] quantity + # @return [::Integer] + # Required. The quantity of the line item in the order. + class LineItemDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents how many items are in the shipment for the given shipment_id + # and line_item_id. + # @!attribute [rw] shipment_id + # @return [::String] + # Required. The shipment ID. This field will be hashed in returned + # OrderTrackingSignal creation response. + # @!attribute [rw] line_item_id + # @return [::String] + # Required. The line item ID. + # @!attribute [rw] quantity + # @return [::Integer] + # Required. The line item quantity in the shipment. + class ShipmentLineItemMapping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/shopping/type/types.rb new file mode 100644 index 000000000000..1a166e0ac98c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/type/datetime.rb new file mode 100644 index 000000000000..10625864f3dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/type/datetime.rb @@ -0,0 +1,104 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents civil time (or occasionally physical time). + # + # This type can represent a civil time in one of a few possible ways: + # + # * When utc_offset is set and time_zone is unset: a civil time on a calendar + # day with a particular offset from UTC. + # * When time_zone is set and utc_offset is unset: a civil time on a calendar + # day in a particular time zone. + # * When neither time_zone nor utc_offset is set: a civil time on a calendar + # day in local time. + # + # The date is relative to the Proleptic Gregorian Calendar. + # + # If year, month, or day are 0, the DateTime is considered not to have a + # specific year, month, or day respectively. + # + # This type may also be used to represent a physical time if all the date and + # time fields are set and either case of the `time_offset` oneof is set. + # Consider using `Timestamp` message for physical time instead. If your use + # case also would like to store the user's timezone, that can be done in + # another field. + # + # This type is more flexible than some applications may want. Make sure to + # document and validate your application's limitations. + # @!attribute [rw] year + # @return [::Integer] + # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a + # datetime without a year. + # @!attribute [rw] month + # @return [::Integer] + # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a + # datetime without a month. + # @!attribute [rw] day + # @return [::Integer] + # Optional. Day of month. Must be from 1 to 31 and valid for the year and + # month, or 0 if specifying a datetime without a day. + # @!attribute [rw] hours + # @return [::Integer] + # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults + # to 0 (midnight). An API may choose to allow the value "24:00:00" for + # scenarios like business closing time. + # @!attribute [rw] minutes + # @return [::Integer] + # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0. + # @!attribute [rw] seconds + # @return [::Integer] + # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, + # defaults to 0. An API may allow the value 60 if it allows leap-seconds. + # @!attribute [rw] nanos + # @return [::Integer] + # Optional. Fractions of seconds in nanoseconds. Must be from 0 to + # 999,999,999, defaults to 0. + # @!attribute [rw] utc_offset + # @return [::Google::Protobuf::Duration] + # UTC offset. Must be whole seconds, between -18 hours and +18 hours. + # For example, a UTC offset of -4:00 would be represented as + # { seconds: -14400 }. + # + # Note: The following fields are mutually exclusive: `utc_offset`, `time_zone`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] time_zone + # @return [::Google::Type::TimeZone] + # Time zone. + # + # Note: The following fields are mutually exclusive: `time_zone`, `utc_offset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DateTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a time zone from the + # [IANA Time Zone Database](https://www.iana.org/time-zones). + # @!attribute [rw] id + # @return [::String] + # IANA Time Zone Database time zone. For example "America/New_York". + # @!attribute [rw] version + # @return [::String] + # Optional. IANA Time Zone Database version number. For example "2019a". + class TimeZone + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..27f6b1938d3d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta", path: "../" +else + gem "google-shopping-merchant-order_tracking-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-order_tracking-v1beta/snippets/order_tracking_signals_service/create_order_tracking_signal.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/snippets/order_tracking_signals_service/create_order_tracking_signal.rb new file mode 100644 index 000000000000..cc1b830cc452 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/snippets/order_tracking_signals_service/create_order_tracking_signal.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_OrderTrackingSignalsService_CreateOrderTrackingSignal_sync] +require "google/shopping/merchant/order_tracking/v1beta" + +## +# Snippet for the create_order_tracking_signal call in the OrderTrackingSignalsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client#create_order_tracking_signal. +# +def create_order_tracking_signal + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest.new + + # Call the create_order_tracking_signal method. + result = client.create_order_tracking_signal request + + # The returned object is of type Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal. + p result +end +# [END merchantapi_v1beta_generated_OrderTrackingSignalsService_CreateOrderTrackingSignal_sync] diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1beta.json b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1beta.json new file mode 100644 index 000000000000..ad8adf5a1e92 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1beta.json @@ -0,0 +1,55 @@ +{ + "client_library": { + "name": "google-shopping-merchant-order_tracking-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.ordertracking.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1beta_generated_OrderTrackingSignalsService_CreateOrderTrackingSignal_sync", + "title": "Snippet for the create_order_tracking_signal call in the OrderTrackingSignalsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client#create_order_tracking_signal.", + "file": "order_tracking_signals_service/create_order_tracking_signal.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_order_tracking_signal", + "full_name": "::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client#create_order_tracking_signal", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal", + "client": { + "short_name": "OrderTrackingSignalsService::Client", + "full_name": "::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client" + }, + "method": { + "short_name": "CreateOrderTrackingSignal", + "full_name": "google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignalsService.CreateOrderTrackingSignal", + "service": { + "short_name": "OrderTrackingSignalsService", + "full_name": "google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignalsService" + } + } + }, + "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-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_paths_test.rb new file mode 100644 index 000000000000..079b6856a4e2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_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/order_tracking/v1beta/order_tracking_signals_service" + +class ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::ClientPathsTest < Minitest::Test + class DummyStub + 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::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_rest_test.rb new file mode 100644 index 000000000000..0605b7c388b7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_rest_test.rb @@ -0,0 +1,155 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_pb" +require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest" + + +class ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_order_tracking_signal + # Create test objects. + client_result = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + order_tracking_signal_id = "hello world" + order_tracking_signal = {} + + create_order_tracking_signal_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::ServiceStub.stub :transcode_create_order_tracking_signal_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_order_tracking_signal_client_stub do + # Create client + client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_order_tracking_signal({ parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_order_tracking_signal parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_order_tracking_signal ::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest.new(parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_order_tracking_signal({ parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_order_tracking_signal(::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest.new(parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_order_tracking_signal_client_stub.call_count + end + end + end + + def test_configure + 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::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.new do |config| + 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::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_test.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_test.rb new file mode 100644 index 000000000000..6ed6971276aa --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_test.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! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_pb" +require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service" + +class ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_order_tracking_signal + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + order_tracking_signal_id = "hello world" + order_tracking_signal = {} + + create_order_tracking_signal_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_order_tracking_signal, name + assert_kind_of ::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["order_tracking_signal_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal), request["order_tracking_signal"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_order_tracking_signal_client_stub do + # Create client + client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_order_tracking_signal({ parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_order_tracking_signal parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_order_tracking_signal ::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest.new(parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_order_tracking_signal({ parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_order_tracking_signal(::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest.new(parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_order_tracking_signal_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new do |config| + 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::OrderTracking::V1beta::OrderTrackingSignalsService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::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::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-products-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-products-v1/.repo-metadata.json new file mode 100644 index 000000000000..6ce690bfd0d1 --- /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..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-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..0129c84f4416 --- /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.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-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..55b28a33832f --- /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.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "~> 1.0" +end diff --git a/owl-bot-staging/google-shopping-merchant-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..965d17fed384 --- /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,767 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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 base64url encoding of this + # string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/productInputs/ZW5-VVMtc2t1LzEyMw`. + # + # 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. + # + # Note: For calls to the v1beta version, the plain format is + # `channel~content_language~feed_label~offer_id`, for example: + # `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/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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `: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..2b42e6677cef --- /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,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/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 base64url encoding of this + # string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/productInputs/ZW5-VVMtc2t1LzEyMw`. + # + # 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. + # + # Note: For calls to the v1beta version, the plain format is + # `channel~content_language~feed_label~offer_id`, for example: + # `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/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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `: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..ff300cc0c322 --- /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\"\xff\x03\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\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\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(\tH.\x88\x01\x01\x12?\n\x05pause\x18\r \x01(\x0e\x32+.google.shopping.merchant.products.v1.PauseH/\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(\tH0\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.StructuredTitleH1\x88\x01\x01\x12\x61\n\x16structured_description\x18\x85\x01 \x01(\x0b\x32;.google.shopping.merchant.products.v1.StructuredDescriptionH2\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\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\"\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=B\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\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\"-\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\"\xf4\x01\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\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\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\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\"\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*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::CarrierPriceOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.CarrierPriceOption").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 + HandlingCutoffTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.HandlingCutoffTime").msgclass + 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..036e93153dec --- /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\"\xef\x04\n\x07Product\x12\x0c\n\x04name\x18\x01 \x01(\t\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: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..9551046f72dd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/client.rb @@ -0,0 +1,634 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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 base64url encoding of this + # string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. + # + # 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `: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..f1ab967e3c63 --- /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,577 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/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 base64url encoding of this + # string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. + # + # 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `: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..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-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..6ed455cdecb2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/productinputs.rb @@ -0,0 +1,282 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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 base64url encoding of this + # string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/productinputs/ZW5-VVMtc2t1LzEyMw`. + # + # 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. + # + # Note: For calls to the v1beta version, the plain format is + # `channel~content_language~feed_label~offer_id`, for example: + # `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] 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 base64url encoding of this + # string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/productInputs/ZW5-VVMtc2t1LzEyMw`. + # + # 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. + # + # Note: For calls to the v1beta version, the plain format is + # `channel~content_language~feed_label~offer_id`, for example: + # `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-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..00dcdb176c4b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products.rb @@ -0,0 +1,201 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module 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] 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. + 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 base64url encoding of this + # string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name + # for the product would be + # `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. + # + # 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..a44ee38a4f6a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products_common.rb @@ -0,0 +1,1818 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific 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/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::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 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 [::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] 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. + 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 + + # 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 + 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. + 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. + 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 + + # 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 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..b7e601305e22 --- /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 + client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_product_input({ name: name, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_product_input name: name, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.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 + client.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 + client.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..ee5126d47156 --- /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 + client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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..1a4e8b7458c9 --- /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 + client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_product({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_product name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_product ::Google::Shopping::Merchant::Products::V1::GetProductRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_product({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_product(::Google::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 + client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_products({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_products parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_products ::Google::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 + client.list_products({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_products(::Google::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..ca9d9faa3480 --- /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 + client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_product({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_product name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_product ::Google::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 + client.get_product({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_product(::Google::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 + client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_products({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_products parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_products ::Google::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 + client.list_products({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_products(::Google::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..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-products-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-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..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-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..ff96700b6840 --- /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.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-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..8ba51afa03c5 --- /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.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-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..5ec73ccfd404 --- /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,731 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `: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..1e3bced7229e --- /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,667 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `: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..b87c945df8cd --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/client.rb @@ -0,0 +1,604 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `: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..aecb5c474090 --- /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,547 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `: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..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-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..dd1c5ebd4094 --- /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 + client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_product_input({ name: name, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_product_input name: name, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.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 + client.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 + client.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..3a73015c2e08 --- /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 + client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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..99574eb03818 --- /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 + client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_product({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_product name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_product ::Google::Shopping::Merchant::Products::V1beta::GetProductRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_product({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_product(::Google::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 + client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_products({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_products parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_products ::Google::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 + client.list_products({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_products(::Google::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..9996bd347914 --- /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 + client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_product({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_product name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_product ::Google::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 + client.get_product({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_product(::Google::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 + client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_products({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_products parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_products ::Google::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 + client.list_products({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_products(::Google::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..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-products-v1beta/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-promotions-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-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..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-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..96acad648b8f --- /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.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-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..fd476735c87b --- /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.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "~> 1.0" +end diff --git a/owl-bot-staging/google-shopping-merchant-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..4048153d3da7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/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/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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `: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..db553686bd9c --- /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,637 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `: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..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-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..f2ee41fe9f13 --- /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 + client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_promotion({ parent: parent, promotion: promotion, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_promotion parent: parent, promotion: promotion, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_promotion({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_promotion name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.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 + client.get_promotion({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.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 + client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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..dca321000841 --- /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 + client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_promotion({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_promotion name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-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..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-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..d3f0d3bd56c6 --- /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.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-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..4abbccc3f6bd --- /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.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-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..ab7eeb85307c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/client.rb @@ -0,0 +1,690 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `: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..e2fc1f10280c --- /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,626 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `: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..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-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..7158bd46d66d --- /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 + client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.insert_promotion({ parent: parent, promotion: promotion, data_source: data_source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.insert_promotion parent: parent, promotion: promotion, data_source: data_source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_promotion({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_promotion name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.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 + client.get_promotion({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.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 + client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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..ce5f135865d2 --- /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 + client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_promotion({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_promotion name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-quota-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-quota-v1/.repo-metadata.json new file mode 100644 index 000000000000..eb3e2f5d1eed --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1", + "distribution_name": "google-shopping-merchant-quota-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-quota-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-quota 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-quota-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-quota-v1/.rubocop.yml new file mode 100644 index 000000000000..099a22ee1141 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-quota-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-quota-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-quota-v1/.yardopts new file mode 100644 index 000000000000..dc7bbc10ae29 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-quota-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..72dde3e46df5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-quota-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-quota-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/quota/v1" + +client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::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/quota/v1" + +::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::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-quota-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/quota/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::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-quota-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-quota-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-quota-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-quota-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1/README.md b/owl-bot-staging/google-shopping-merchant-quota-v1/README.md new file mode 100644 index 000000000000..0fcc81569d8c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota](https://rubygems.org/gems/google-shopping-merchant-quota). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-quota-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/quota/v1" + +client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new +request = ::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest.new # (request fields as keyword arguments...) +response = client.get_account_limit request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-quota-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/quota/v1" +require "logger" + +client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-quota`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-quota-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-quota`. +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-quota-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-quota-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-quota-v1/Rakefile new file mode 100644 index 000000000000..48122be51cfb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-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/quota/v1/account_limits_service/credentials" + ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::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-quota-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-quota-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-quota-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-quota-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-quota-v1" + header "google-shopping-merchant-quota-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-quota-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-quota-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-quota-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-quota-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-quota-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-quota-v1/gapic_metadata.json new file mode 100644 index 000000000000..067b267fc570 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/gapic_metadata.json @@ -0,0 +1,42 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.shopping.merchant.quota.v1", + "libraryPackage": "::Google::Shopping::Merchant::Quota::V1", + "services": { + "AccountLimitsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client", + "rpcs": { + "GetAccountLimit": { + "methods": [ + "get_account_limit" + ] + }, + "ListAccountLimits": { + "methods": [ + "list_account_limits" + ] + } + } + } + } + }, + "QuotaService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Quota::V1::QuotaService::Client", + "rpcs": { + "ListQuotaGroups": { + "methods": [ + "list_quota_groups" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/google-shopping-merchant-quota-v1.gemspec b/owl-bot-staging/google-shopping-merchant-quota-v1/google-shopping-merchant-quota-v1.gemspec new file mode 100644 index 000000000000..5e50c4368228 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/google-shopping-merchant-quota-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/quota/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-quota-v1" + gem.version = Google::Shopping::Merchant::Quota::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-quota-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-quota instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center Accounts." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google-shopping-merchant-quota-v1.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google-shopping-merchant-quota-v1.rb new file mode 100644 index 000000000000..75da199b0021 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google-shopping-merchant-quota-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/quota/v1" diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1.rb new file mode 100644 index 000000000000..6be69bc2f0df --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/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/quota/v1/account_limits_service" +require "google/shopping/merchant/quota/v1/quota_service" +require "google/shopping/merchant/quota/v1/version" + +module Google + module Shopping + module Merchant + module Quota + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/quota/v1" + # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/quota/v1" + # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/shopping/merchant/quota/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service.rb new file mode 100644 index 000000000000..e866679f7fed --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_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/quota/v1/version" + +require "google/shopping/merchant/quota/v1/account_limits_service/credentials" +require "google/shopping/merchant/quota/v1/account_limits_service/paths" +require "google/shopping/merchant/quota/v1/account_limits_service/client" +require "google/shopping/merchant/quota/v1/account_limits_service/rest" + +module Google + module Shopping + module Merchant + module Quota + module V1 + ## + # Service to retrieve account limits. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/quota/v1/account_limits_service" + # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/quota/v1/account_limits_service/rest" + # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new + # + module AccountLimitsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "account_limits_service", "helpers.rb" +require "google/shopping/merchant/quota/v1/account_limits_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/client.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/client.rb new file mode 100644 index 000000000000..a6ddc32d6bcb --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/client.rb @@ -0,0 +1,595 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/quota/v1/accountlimits_pb" + +module Google + module Shopping + module Merchant + module Quota + module V1 + module AccountLimitsService + ## + # Client for the AccountLimitsService service. + # + # Service to retrieve account limits. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_limits_service_stub + + ## + # Configure the AccountLimitsService Client class. + # + # See {::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountLimitsService clients + # ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Quota", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountLimitsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @account_limits_service_stub.universe_domain + end + + ## + # Create a new AccountLimitsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountLimitsService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed 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/quota/v1/accountlimits_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @account_limits_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @account_limits_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @account_limits_service_stub.logger + end + + # Service calls + + ## + # Retrieves an account limit. + # + # @overload get_account_limit(request, options = nil) + # Pass arguments to `get_account_limit` via a request object, either of type + # {::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_account_limit(name: nil) + # Pass arguments to `get_account_limit` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the limit to retrieve. + # Format: `accounts/{account}/limits/{limit}` + # For example: `accounts/123/limits/products~ADS_NON_EEA` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Shopping::Merchant::Quota::V1::AccountLimit] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Shopping::Merchant::Quota::V1::AccountLimit] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/quota/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest.new + # + # # Call the get_account_limit method. + # result = client.get_account_limit request + # + # # The returned object is of type Google::Shopping::Merchant::Quota::V1::AccountLimit. + # p result + # + def get_account_limit request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_account_limit.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Quota::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_account_limit.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_account_limit.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_limits_service_stub.call_rpc :get_account_limit, request, 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 limits of an account. + # + # @overload list_account_limits(request, options = nil) + # Pass arguments to `list_account_limits` via a request object, either of type + # {::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_account_limits(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_account_limits` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent account. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of limits to return. The service may return + # fewer than this value. If unspecified, at most 100 limits will be returned. + # The maximum value is 100; values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAccountLimits` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountLimits` must + # match the call that provided the page token. + # @param filter [::String] + # Required. A filter on the limit `type` is required, for example, `type = + # "products"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1::AccountLimit>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1::AccountLimit>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/quota/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest.new + # + # # Call the list_account_limits method. + # result = client.list_account_limits request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Quota::V1::AccountLimit. + # p item + # end + # + def list_account_limits request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_account_limits.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Quota::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_account_limits.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_account_limits.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_limits_service_stub.call_rpc :list_account_limits, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @account_limits_service_stub, :list_account_limits, request, response, 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 AccountLimitsService API. + # + # This class represents the configuration for AccountLimitsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_account_limit to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_limit.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_limit.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate 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::Quota::V1::AccountLimitsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AccountLimitsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_account_limit` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account_limit + ## + # RPC-specific configuration for `list_account_limits` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_limits + + # @private + def initialize parent_rpcs = nil + get_account_limit_config = parent_rpcs.get_account_limit if parent_rpcs.respond_to? :get_account_limit + @get_account_limit = ::Gapic::Config::Method.new get_account_limit_config + list_account_limits_config = parent_rpcs.list_account_limits if parent_rpcs.respond_to? :list_account_limits + @list_account_limits = ::Gapic::Config::Method.new list_account_limits_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-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/credentials.rb new file mode 100644 index 000000000000..07b1cbbcde91 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_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 Quota + module V1 + module AccountLimitsService + # Credentials for the AccountLimitsService 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-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/paths.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/paths.rb new file mode 100644 index 000000000000..e16ca995c021 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_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 Quota + module V1 + module AccountLimitsService + # Path helper methods for the AccountLimitsService 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 AccountLimit resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/limits/{limit}` + # + # @param account [String] + # @param limit [String] + # + # @return [::String] + def account_limit_path account:, limit: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/limits/#{limit}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/rest.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/rest.rb new file mode 100644 index 000000000000..41f14fcfb0f1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_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/quota/v1/version" + +require "google/shopping/merchant/quota/v1/account_limits_service/credentials" +require "google/shopping/merchant/quota/v1/account_limits_service/paths" +require "google/shopping/merchant/quota/v1/account_limits_service/rest/client" + +module Google + module Shopping + module Merchant + module Quota + module V1 + ## + # Service to retrieve account limits. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/quota/v1/account_limits_service/rest" + # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new + # + module AccountLimitsService + # 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/quota/v1/account_limits_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/rest/client.rb new file mode 100644 index 000000000000..2a65a2d4170d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/rest/client.rb @@ -0,0 +1,538 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/quota/v1/accountlimits_pb" +require "google/shopping/merchant/quota/v1/account_limits_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Quota + module V1 + module AccountLimitsService + module Rest + ## + # REST client for the AccountLimitsService service. + # + # Service to retrieve account limits. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :account_limits_service_stub + + ## + # Configure the AccountLimitsService Client class. + # + # See {::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AccountLimitsService clients + # ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Quota", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AccountLimitsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @account_limits_service_stub.universe_domain + end + + ## + # Create a new AccountLimitsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AccountLimitsService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @account_limits_service_stub = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @account_limits_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @account_limits_service_stub.logger + end + + # Service calls + + ## + # Retrieves an account limit. + # + # @overload get_account_limit(request, options = nil) + # Pass arguments to `get_account_limit` via a request object, either of type + # {::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_account_limit(name: nil) + # Pass arguments to `get_account_limit` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the limit to retrieve. + # Format: `accounts/{account}/limits/{limit}` + # For example: `accounts/123/limits/products~ADS_NON_EEA` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Quota::V1::AccountLimit] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Quota::V1::AccountLimit] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/quota/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest.new + # + # # Call the get_account_limit method. + # result = client.get_account_limit request + # + # # The returned object is of type Google::Shopping::Merchant::Quota::V1::AccountLimit. + # p result + # + def get_account_limit request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_account_limit.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Quota::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_account_limit.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_account_limit.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_limits_service_stub.get_account_limit request, 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 limits of an account. + # + # @overload list_account_limits(request, options = nil) + # Pass arguments to `list_account_limits` via a request object, either of type + # {::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_account_limits(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_account_limits` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent account. + # Format: `accounts/{account}` + # @param page_size [::Integer] + # Optional. The maximum number of limits to return. The service may return + # fewer than this value. If unspecified, at most 100 limits will be returned. + # The maximum value is 100; values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAccountLimits` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountLimits` must + # match the call that provided the page token. + # @param filter [::String] + # Required. A filter on the limit `type` is required, for example, `type = + # "products"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1::AccountLimit>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1::AccountLimit>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/quota/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest.new + # + # # Call the list_account_limits method. + # result = client.list_account_limits request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Quota::V1::AccountLimit. + # p item + # end + # + def list_account_limits request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_account_limits.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Quota::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_account_limits.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_account_limits.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_limits_service_stub.list_account_limits request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @account_limits_service_stub, :list_account_limits, "account_limits", request, result, 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 AccountLimitsService REST API. + # + # This class represents the configuration for AccountLimitsService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_account_limit to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_limit.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_account_limit.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the AccountLimitsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_account_limit` + # @return [::Gapic::Config::Method] + # + attr_reader :get_account_limit + ## + # RPC-specific configuration for `list_account_limits` + # @return [::Gapic::Config::Method] + # + attr_reader :list_account_limits + + # @private + def initialize parent_rpcs = nil + get_account_limit_config = parent_rpcs.get_account_limit if parent_rpcs.respond_to? :get_account_limit + @get_account_limit = ::Gapic::Config::Method.new get_account_limit_config + list_account_limits_config = parent_rpcs.list_account_limits if parent_rpcs.respond_to? :list_account_limits + @list_account_limits = ::Gapic::Config::Method.new list_account_limits_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-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/rest/service_stub.rb new file mode 100644 index 000000000000..bc68b3393379 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_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/quota/v1/accountlimits_pb" + +module Google + module Shopping + module Merchant + module Quota + module V1 + module AccountLimitsService + module Rest + ## + # REST service stub for the AccountLimitsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_account_limit REST call + # + # @param request_pb [::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Quota::V1::AccountLimit] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Quota::V1::AccountLimit] + # A result object deserialized from the server's reply + def get_account_limit request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_account_limit_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_account_limit", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Quota::V1::AccountLimit.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_account_limits REST call + # + # @param request_pb [::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsResponse] + # A result object deserialized from the server's reply + def list_account_limits request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_account_limits_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_account_limits", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_account_limit REST call + # + # @param request_pb [::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_account_limit_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/limits/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_account_limits REST call + # + # @param request_pb [::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_account_limits_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/accounts/v1/{parent}/limits", + 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-quota-v1/lib/google/shopping/merchant/quota/v1/accountlimits_pb.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/accountlimits_pb.rb new file mode 100644 index 000000000000..c4ff308f1048 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/accountlimits_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/quota/v1/accountlimits.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 = "\n5google/shopping/merchant/quota/v1/accountlimits.proto\x12!google.shopping.merchant.quota.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xab\x01\n\x0cProductLimit\x12I\n\x05scope\x18\x01 \x01(\x0e\x32\x35.google.shopping.merchant.quota.v1.ProductLimit.ScopeB\x03\xe0\x41\x02\x12\x12\n\x05limit\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\"<\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x41\x44S_NON_EEA\x10\x01\x12\x0b\n\x07\x41\x44S_EEA\x10\x02\"\xdc\x01\n\x0c\x41\x63\x63ountLimit\x12\x43\n\x08products\x18\x64 \x01(\x0b\x32/.google.shopping.merchant.quota.v1.ProductLimitH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:l\xea\x41i\n\'merchantapi.googleapis.com/AccountLimit\x12!accounts/{account}/limits/{limit}*\raccountLimits2\x0c\x61\x63\x63ountLimitB\x06\n\x04type\"W\n\x16GetAccountLimitRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'merchantapi.googleapis.com/AccountLimit\"\x9c\x01\n\x18ListAccountLimitsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x02\"}\n\x19ListAccountLimitsResponse\x12G\n\x0e\x61\x63\x63ount_limits\x18\x01 \x03(\x0b\x32/.google.shopping.merchant.quota.v1.AccountLimit\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xe2\x03\n\x14\x41\x63\x63ountLimitsService\x12\xb5\x01\n\x0fGetAccountLimit\x12\x39.google.shopping.merchant.quota.v1.GetAccountLimitRequest\x1a/.google.shopping.merchant.quota.v1.AccountLimit\"6\xda\x41\x04name\x82\xd3\xe4\x93\x02)\x12\'/accounts/v1/{name=accounts/*/limits/*}\x12\xc8\x01\n\x11ListAccountLimits\x12;.google.shopping.merchant.quota.v1.ListAccountLimitsRequest\x1a<.google.shopping.merchant.quota.v1.ListAccountLimitsResponse\"8\xda\x41\x06parent\x82\xd3\xe4\x93\x02)\x12\'/accounts/v1/{parent=accounts/*}/limits\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xf0\x01\n%com.google.shopping.merchant.quota.v1B\x12\x41\x63\x63ountLimitsProtoP\x01ZAcloud.google.com/go/shopping/merchant/quota/apiv1/quotapb;quotapb\xaa\x02!Google.Shopping.Merchant.Quota.V1\xca\x02!Google\\Shopping\\Merchant\\Quota\\V1\xea\x02%Google::Shopping::Merchant::Quota::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Shopping + module Merchant + module Quota + module V1 + ProductLimit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.ProductLimit").msgclass + ProductLimit::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.ProductLimit.Scope").enummodule + AccountLimit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.AccountLimit").msgclass + GetAccountLimitRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.GetAccountLimitRequest").msgclass + ListAccountLimitsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.ListAccountLimitsRequest").msgclass + ListAccountLimitsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.ListAccountLimitsResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/accountlimits_services_pb.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/accountlimits_services_pb.rb new file mode 100644 index 000000000000..8f08b198af83 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/accountlimits_services_pb.rb @@ -0,0 +1,49 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/quota/v1/accountlimits.proto for package 'Google.Shopping.Merchant.Quota.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/quota/v1/accountlimits_pb' + +module Google + module Shopping + module Merchant + module Quota + module V1 + module AccountLimitsService + # Service to retrieve account limits. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.quota.v1.AccountLimitsService' + + # Retrieves an account limit. + rpc :GetAccountLimit, ::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest, ::Google::Shopping::Merchant::Quota::V1::AccountLimit + # Lists the limits of an account. + rpc :ListAccountLimits, ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest, ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_pb.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_pb.rb new file mode 100644 index 000000000000..9cf76dec339e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/quota/v1/quota.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n-google/shopping/merchant/quota/v1/quota.proto\x12!google.shopping.merchant.quota.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xab\x02\n\nQuotaGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bquota_usage\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bquota_limit\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1f\n\x12quota_minute_limit\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12M\n\x0emethod_details\x18\x04 \x03(\x0b\x32\x30.google.shopping.merchant.quota.v1.MethodDetailsB\x03\xe0\x41\x03:f\xea\x41\x63\n%merchantapi.googleapis.com/QuotaGroup\x12!accounts/{account}/groups/{group}*\x0bquotaGroups2\nquotaGroup\"b\n\rMethodDetails\x12\x13\n\x06method\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06subapi\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\x88\x01\n\x16ListQuotaGroupsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%merchantapi.googleapis.com/QuotaGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"w\n\x17ListQuotaGroupsResponse\x12\x43\n\x0cquota_groups\x18\x01 \x03(\x0b\x32-.google.shopping.merchant.quota.v1.QuotaGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x99\x02\n\x0cQuotaService\x12\xbf\x01\n\x0fListQuotaGroups\x12\x39.google.shopping.merchant.quota.v1.ListQuotaGroupsRequest\x1a:.google.shopping.merchant.quota.v1.ListQuotaGroupsResponse\"5\xda\x41\x06parent\x82\xd3\xe4\x93\x02&\x12$/quota/v1/{parent=accounts/*}/quotas\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xa3\x02\n%com.google.shopping.merchant.quota.v1B\nQuotaProtoP\x01ZAcloud.google.com/go/shopping/merchant/quota/apiv1/quotapb;quotapb\xaa\x02!Google.Shopping.Merchant.Quota.V1\xca\x02!Google\\Shopping\\Merchant\\Quota\\V1\xea\x02%Google::Shopping::Merchant::Quota::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 Quota + module V1 + QuotaGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.QuotaGroup").msgclass + MethodDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.MethodDetails").msgclass + ListQuotaGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.ListQuotaGroupsRequest").msgclass + ListQuotaGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.ListQuotaGroupsResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service.rb new file mode 100644 index 000000000000..1c7035b165fe --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_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/quota/v1/version" + +require "google/shopping/merchant/quota/v1/quota_service/credentials" +require "google/shopping/merchant/quota/v1/quota_service/paths" +require "google/shopping/merchant/quota/v1/quota_service/client" +require "google/shopping/merchant/quota/v1/quota_service/rest" + +module Google + module Shopping + module Merchant + module Quota + module V1 + ## + # Service to get method call quota information per Merchant API method. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/quota/v1/quota_service" + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/quota/v1/quota_service/rest" + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new + # + module QuotaService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "quota_service", "helpers.rb" +require "google/shopping/merchant/quota/v1/quota_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/client.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/client.rb new file mode 100644 index 000000000000..cac86d4915ee --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/client.rb @@ -0,0 +1,495 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/quota/v1/quota_pb" + +module Google + module Shopping + module Merchant + module Quota + module V1 + module QuotaService + ## + # Client for the QuotaService service. + # + # Service to get method call quota information per Merchant API method. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :quota_service_stub + + ## + # Configure the QuotaService Client class. + # + # See {::Google::Shopping::Merchant::Quota::V1::QuotaService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all QuotaService clients + # ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Quota", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the QuotaService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Quota::V1::QuotaService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @quota_service_stub.universe_domain + end + + ## + # Create a new QuotaService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the QuotaService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/shopping/merchant/quota/v1/quota_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @quota_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Quota::V1::QuotaService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @quota_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @quota_service_stub.logger + end + + # Service calls + + ## + # Lists the daily call quota and usage per group for your Merchant + # Center account. + # + # @overload list_quota_groups(request, options = nil) + # Pass arguments to `list_quota_groups` via a request object, either of type + # {::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_quota_groups(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_quota_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account who owns the collection of method quotas + # Format: accounts/\\{account} + # @param page_size [::Integer] + # Optional. The maximum number of quotas to return in the response, used + # for paging. Defaults to 500; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Token (if provided) to retrieve the subsequent page. All other + # parameters must match the original call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1::QuotaGroup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1::QuotaGroup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/quota/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new + # + # # Call the list_quota_groups method. + # result = client.list_quota_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Quota::V1::QuotaGroup. + # p item + # end + # + def list_quota_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_quota_groups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Quota::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_quota_groups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_quota_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @quota_service_stub.call_rpc :list_quota_groups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @quota_service_stub, :list_quota_groups, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the QuotaService API. + # + # This class represents the configuration for QuotaService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Quota::V1::QuotaService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_quota_groups to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_quota_groups.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_quota_groups.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the QuotaService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_quota_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_quota_groups + + # @private + def initialize parent_rpcs = nil + list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups + @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/credentials.rb new file mode 100644 index 000000000000..02aa06362571 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_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 Quota + module V1 + module QuotaService + # Credentials for the QuotaService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/paths.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/paths.rb new file mode 100644 index 000000000000..69b95c435a8e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Quota + module V1 + module QuotaService + # Path helper methods for the QuotaService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest.rb new file mode 100644 index 000000000000..2568e7e678db --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_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/quota/v1/version" + +require "google/shopping/merchant/quota/v1/quota_service/credentials" +require "google/shopping/merchant/quota/v1/quota_service/paths" +require "google/shopping/merchant/quota/v1/quota_service/rest/client" + +module Google + module Shopping + module Merchant + module Quota + module V1 + ## + # Service to get method call quota information per Merchant API method. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/quota/v1/quota_service/rest" + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new + # + module QuotaService + # 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/quota/v1/quota_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/client.rb new file mode 100644 index 000000000000..9185e88b581d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/client.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! + +require "google/cloud/errors" +require "google/shopping/merchant/quota/v1/quota_pb" +require "google/shopping/merchant/quota/v1/quota_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Quota + module V1 + module QuotaService + module Rest + ## + # REST client for the QuotaService service. + # + # Service to get method call quota information per Merchant API method. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :quota_service_stub + + ## + # Configure the QuotaService Client class. + # + # See {::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all QuotaService clients + # ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Quota", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the QuotaService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @quota_service_stub.universe_domain + end + + ## + # Create a new QuotaService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the QuotaService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @quota_service_stub = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @quota_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @quota_service_stub.logger + end + + # Service calls + + ## + # Lists the daily call quota and usage per group for your Merchant + # Center account. + # + # @overload list_quota_groups(request, options = nil) + # Pass arguments to `list_quota_groups` via a request object, either of type + # {::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_quota_groups(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_quota_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account who owns the collection of method quotas + # Format: accounts/\\{account} + # @param page_size [::Integer] + # Optional. The maximum number of quotas to return in the response, used + # for paging. Defaults to 500; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Token (if provided) to retrieve the subsequent page. All other + # parameters must match the original call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1::QuotaGroup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1::QuotaGroup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/quota/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new + # + # # Call the list_quota_groups method. + # result = client.list_quota_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Quota::V1::QuotaGroup. + # p item + # end + # + def list_quota_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_quota_groups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Quota::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_quota_groups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_quota_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @quota_service_stub.list_quota_groups request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @quota_service_stub, :list_quota_groups, "quota_groups", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the QuotaService REST API. + # + # This class represents the configuration for QuotaService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_quota_groups to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_quota_groups.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_quota_groups.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the QuotaService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_quota_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_quota_groups + + # @private + def initialize parent_rpcs = nil + list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups + @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/service_stub.rb new file mode 100644 index 000000000000..57f91712efa8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_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/quota/v1/quota_pb" + +module Google + module Shopping + module Merchant + module Quota + module V1 + module QuotaService + module Rest + ## + # REST service stub for the QuotaService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_quota_groups REST call + # + # @param request_pb [::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse] + # A result object deserialized from the server's reply + def list_quota_groups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_quota_groups_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_quota_groups", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_quota_groups REST call + # + # @param request_pb [::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_quota_groups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/quota/v1/{parent}/quotas", + 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-quota-v1/lib/google/shopping/merchant/quota/v1/quota_services_pb.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_services_pb.rb new file mode 100644 index 000000000000..09d599f405c2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_services_pb.rb @@ -0,0 +1,48 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/quota/v1/quota.proto for package 'Google.Shopping.Merchant.Quota.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/quota/v1/quota_pb' + +module Google + module Shopping + module Merchant + module Quota + module V1 + module QuotaService + # Service to get method call quota information per Merchant API method. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.quota.v1.QuotaService' + + # Lists the daily call quota and usage per group for your Merchant + # Center account. + rpc :ListQuotaGroups, ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest, ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/rest.rb new file mode 100644 index 000000000000..2df2b5ac90b1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/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/quota/v1/account_limits_service/rest" +require "google/shopping/merchant/quota/v1/quota_service/rest" +require "google/shopping/merchant/quota/v1/version" + +module Google + module Shopping + module Merchant + module Quota + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/quota/v1/rest" + # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/version.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/version.rb new file mode 100644 index 000000000000..5751f36329a1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/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 Quota + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/README.md new file mode 100644 index 000000000000..110adc2cf42e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1/proto_docs/google/shopping/merchant/quota/v1/accountlimits.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/shopping/merchant/quota/v1/accountlimits.rb new file mode 100644 index 000000000000..509e3562c90d --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/shopping/merchant/quota/v1/accountlimits.rb @@ -0,0 +1,118 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Quota + module V1 + # The limit for products. + # @!attribute [rw] scope + # @return [::Google::Shopping::Merchant::Quota::V1::ProductLimit::Scope] + # Required. The scope of the product limit. + # @!attribute [rw] limit + # @return [::Integer] + # Required. The maximum number of products that are allowed in the account in + # the given scope. + class ProductLimit + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The scope of the limit. + module Scope + # Default value. Should not be used. + SCOPE_UNSPECIFIED = 0 + + # Limit for products in non-EEA countries. + ADS_NON_EEA = 1 + + # Limit for products in EEA countries. + ADS_EEA = 2 + end + end + + # A limit of a certain type that is applied to an account. + # @!attribute [rw] products + # @return [::Google::Shopping::Merchant::Quota::V1::ProductLimit] + # The limit for products. + # @!attribute [rw] name + # @return [::String] + # Identifier. The limit part of the name will be a combination of the type + # and the scope. For example: `accounts/123/limits/products~ADS_NON_EEA` + # + # Format: `accounts/{account}/limits/{limit}` + class AccountLimit + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetAccountLimit` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the limit to retrieve. + # Format: `accounts/{account}/limits/{limit}` + # For example: `accounts/123/limits/products~ADS_NON_EEA` + class GetAccountLimitRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListAccountLimits` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent account. + # Format: `accounts/{account}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of limits to return. The service may return + # fewer than this value. If unspecified, at most 100 limits will be returned. + # The maximum value is 100; values above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListAccountLimits` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListAccountLimits` must + # match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Required. A filter on the limit `type` is required, for example, `type = + # "products"`. + class ListAccountLimitsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListAccountLimits` method. + # @!attribute [rw] account_limits + # @return [::Array<::Google::Shopping::Merchant::Quota::V1::AccountLimit>] + # The limits for the given 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 ListAccountLimitsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/shopping/merchant/quota/v1/quota.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/shopping/merchant/quota/v1/quota.rb new file mode 100644 index 000000000000..98917f68b183 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/shopping/merchant/quota/v1/quota.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Quota + module V1 + # The group information for methods in the Merchant API. The quota is shared + # between all methods in the group. Even if none of the methods within the + # group have usage the information for the group is returned. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the quota group. + # Format: accounts/\\{account}/quotas/\\{group} + # Note: There is no guarantee on the format of \\{group} + # @!attribute [r] quota_usage + # @return [::Integer] + # Output only. The current quota usage, meaning the number of calls already + # made on a given day to the methods in the group. The daily quota limits + # reset at at 12:00 PM midday UTC. + # @!attribute [r] quota_limit + # @return [::Integer] + # Output only. The maximum number of calls allowed per day for the group. + # @!attribute [r] quota_minute_limit + # @return [::Integer] + # Output only. The maximum number of calls allowed per minute for the group. + # @!attribute [r] method_details + # @return [::Array<::Google::Shopping::Merchant::Quota::V1::MethodDetails>] + # Output only. List of all methods group quota applies to. + class QuotaGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The method details per method in the Merchant API. + # @!attribute [r] method + # @return [::String] + # Output only. The name of the method for example `products.list`. + # @!attribute [r] version + # @return [::String] + # Output only. The API version that the method belongs to. + # @!attribute [r] subapi + # @return [::String] + # Output only. The sub-API that the method belongs to. + # @!attribute [r] path + # @return [::String] + # Output only. The path for the method such as + # `products/v1/productInputs.insert` + class MethodDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListQuotaGroups method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account who owns the collection of method quotas + # Format: accounts/\\{account} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of quotas to return in the response, used + # for paging. Defaults to 500; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token (if provided) to retrieve the subsequent page. All other + # parameters must match the original call that provided the page token. + class ListQuotaGroupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListMethodGroups method. + # @!attribute [rw] quota_groups + # @return [::Array<::Google::Shopping::Merchant::Quota::V1::QuotaGroup>] + # The methods, current quota usage and limits per each group. The quota is + # shared between all methods in the group. The groups are sorted in + # descending order based on + # {::Google::Shopping::Merchant::Quota::V1::QuotaGroup#quota_usage quota_usage}. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListQuotaGroupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/Gemfile new file mode 100644 index 000000000000..23d73805391f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1", path: "../" +else + gem "google-shopping-merchant-quota-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-quota-v1/snippets/account_limits_service/get_account_limit.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/account_limits_service/get_account_limit.rb new file mode 100644 index 000000000000..c8dbfb1752a8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/account_limits_service/get_account_limit.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_AccountLimitsService_GetAccountLimit_sync] +require "google/shopping/merchant/quota/v1" + +## +# Snippet for the get_account_limit call in the AccountLimitsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client#get_account_limit. +# +def get_account_limit + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest.new + + # Call the get_account_limit method. + result = client.get_account_limit request + + # The returned object is of type Google::Shopping::Merchant::Quota::V1::AccountLimit. + p result +end +# [END merchantapi_v1_generated_AccountLimitsService_GetAccountLimit_sync] diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/account_limits_service/list_account_limits.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/account_limits_service/list_account_limits.rb new file mode 100644 index 000000000000..4f53fbe04f06 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/account_limits_service/list_account_limits.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_AccountLimitsService_ListAccountLimits_sync] +require "google/shopping/merchant/quota/v1" + +## +# Snippet for the list_account_limits call in the AccountLimitsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client#list_account_limits. +# +def list_account_limits + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest.new + + # Call the list_account_limits method. + result = client.list_account_limits request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Quota::V1::AccountLimit. + p item + end +end +# [END merchantapi_v1_generated_AccountLimitsService_ListAccountLimits_sync] diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/quota_service/list_quota_groups.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/quota_service/list_quota_groups.rb new file mode 100644 index 000000000000..15fdfe68d427 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/quota_service/list_quota_groups.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1_generated_QuotaService_ListQuotaGroups_sync] +require "google/shopping/merchant/quota/v1" + +## +# Snippet for the list_quota_groups call in the QuotaService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Quota::V1::QuotaService::Client#list_quota_groups. +# +def list_quota_groups + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new + + # Call the list_quota_groups method. + result = client.list_quota_groups request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Quota::V1::QuotaGroup. + p item + end +end +# [END merchantapi_v1_generated_QuotaService_ListQuotaGroups_sync] diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/snippet_metadata_google.shopping.merchant.quota.v1.json b/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/snippet_metadata_google.shopping.merchant.quota.v1.json new file mode 100644 index 000000000000..801659ccac57 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/snippet_metadata_google.shopping.merchant.quota.v1.json @@ -0,0 +1,135 @@ +{ + "client_library": { + "name": "google-shopping-merchant-quota-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.quota.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1_generated_AccountLimitsService_GetAccountLimit_sync", + "title": "Snippet for the get_account_limit call in the AccountLimitsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client#get_account_limit.", + "file": "account_limits_service/get_account_limit.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_account_limit", + "full_name": "::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client#get_account_limit", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Quota::V1::AccountLimit", + "client": { + "short_name": "AccountLimitsService::Client", + "full_name": "::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client" + }, + "method": { + "short_name": "GetAccountLimit", + "full_name": "google.shopping.merchant.quota.v1.AccountLimitsService.GetAccountLimit", + "service": { + "short_name": "AccountLimitsService", + "full_name": "google.shopping.merchant.quota.v1.AccountLimitsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_AccountLimitsService_ListAccountLimits_sync", + "title": "Snippet for the list_account_limits call in the AccountLimitsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client#list_account_limits.", + "file": "account_limits_service/list_account_limits.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_account_limits", + "full_name": "::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client#list_account_limits", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsResponse", + "client": { + "short_name": "AccountLimitsService::Client", + "full_name": "::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client" + }, + "method": { + "short_name": "ListAccountLimits", + "full_name": "google.shopping.merchant.quota.v1.AccountLimitsService.ListAccountLimits", + "service": { + "short_name": "AccountLimitsService", + "full_name": "google.shopping.merchant.quota.v1.AccountLimitsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "merchantapi_v1_generated_QuotaService_ListQuotaGroups_sync", + "title": "Snippet for the list_quota_groups call in the QuotaService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Quota::V1::QuotaService::Client#list_quota_groups.", + "file": "quota_service/list_quota_groups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_quota_groups", + "full_name": "::Google::Shopping::Merchant::Quota::V1::QuotaService::Client#list_quota_groups", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse", + "client": { + "short_name": "QuotaService::Client", + "full_name": "::Google::Shopping::Merchant::Quota::V1::QuotaService::Client" + }, + "method": { + "short_name": "ListQuotaGroups", + "full_name": "google.shopping.merchant.quota.v1.QuotaService.ListQuotaGroups", + "service": { + "short_name": "QuotaService", + "full_name": "google.shopping.merchant.quota.v1.QuotaService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_paths_test.rb new file mode 100644 index 000000000000..2ba6283c89f6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_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/quota/v1/account_limits_service" + +class ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::ClientPathsTest < Minitest::Test + class DummyStub + 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::Quota::V1::AccountLimitsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_account_limit_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_limit_path account: "value0", limit: "value1" + assert_equal "accounts/value0/limits/value1", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_rest_test.rb new file mode 100644 index 000000000000..bfb4cd838f94 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_rest_test.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/quota/v1/accountlimits_pb" +require "google/shopping/merchant/quota/v1/account_limits_service/rest" + + +class ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_account_limit + # Create test objects. + client_result = ::Google::Shopping::Merchant::Quota::V1::AccountLimit.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_limit_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::ServiceStub.stub :transcode_get_account_limit_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_account_limit_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_account_limit({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_account_limit name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_account_limit ::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_account_limit({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_account_limit(::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_account_limit_client_stub.call_count + end + end + end + + def test_list_account_limits + # Create test objects. + client_result = ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_account_limits_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::ServiceStub.stub :transcode_list_account_limits_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_account_limits_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_account_limits({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_account_limits parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_account_limits ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_account_limits({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_account_limits(::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_account_limits_client_stub.call_count + end + end + end + + def test_configure + 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::Quota::V1::AccountLimitsService::Rest::Client.new do |config| + 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::Quota::V1::AccountLimitsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_test.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_test.rb new file mode 100644 index 000000000000..154067e2c3c0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_test.rb @@ -0,0 +1,231 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/quota/v1/accountlimits_pb" +require "google/shopping/merchant/quota/v1/account_limits_service" + +class ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_account_limit + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Quota::V1::AccountLimit.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_account_limit_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_account_limit, name + assert_kind_of ::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_account_limit_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_account_limit({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_account_limit name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_account_limit ::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_account_limit({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_account_limit(::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_account_limit_client_stub.call_rpc_count + end + end + + def test_list_account_limits + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_account_limits_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_account_limits, name + assert_kind_of ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_account_limits_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_account_limits({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_account_limits parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_account_limits ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_account_limits({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_account_limits(::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_account_limits_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::Quota::V1::AccountLimitsService::Client.new do |config| + 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::Quota::V1::AccountLimitsService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::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::Quota::V1::AccountLimitsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_paths_test.rb new file mode 100644 index 000000000000..0302cab2d1e6 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/quota/v1/quota_service" + +class ::Google::Shopping::Merchant::Quota::V1::QuotaService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_rest_test.rb new file mode 100644 index 000000000000..5b6df299142b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_rest_test.rb @@ -0,0 +1,155 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/quota/v1/quota_pb" +require "google/shopping/merchant/quota/v1/quota_service/rest" + + +class ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_quota_groups + # Create test objects. + client_result = ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_quota_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::ServiceStub.stub :transcode_list_quota_groups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_quota_groups_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_quota_groups parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_quota_groups ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_quota_groups(::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_quota_groups_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_test.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_test.rb new file mode 100644 index 000000000000..a47367275016 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_test.rb @@ -0,0 +1,171 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/quota/v1/quota_pb" +require "google/shopping/merchant/quota/v1/quota_service" + +class ::Google::Shopping::Merchant::Quota::V1::QuotaService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_quota_groups + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_quota_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_quota_groups, name + assert_kind_of ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_quota_groups_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_quota_groups parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_quota_groups ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_quota_groups(::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_quota_groups_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-quota-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-quota-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..82d52958e89e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta", + "distribution_name": "google-shopping-merchant-quota-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-quota-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-quota 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-quota-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-quota-v1beta/.rubocop.yml new file mode 100644 index 000000000000..ecbd18ed6270 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-shopping-merchant-quota-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-quota-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-quota-v1beta/.yardopts new file mode 100644 index 000000000000..3ddd15e0cf87 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-quota-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..98912d8eb3ca --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-shopping-merchant-quota-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-quota-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/quota/v1beta" + +client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::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/quota/v1beta" + +::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::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-quota-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/quota/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::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-quota-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-quota-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-quota-v1beta/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-quota-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-quota-v1beta/README.md new file mode 100644 index 000000000000..7eb62ce75fd3 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota](https://rubygems.org/gems/google-shopping-merchant-quota). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-shopping-merchant-quota-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/quota/v1beta" + +client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new +request = ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest.new # (request fields as keyword arguments...) +response = client.list_quota_groups request +``` + +View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-quota-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/quota/v1beta" +require "logger" + +client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-quota`, +and lower-level _versioned_ client libraries with names such as +`google-shopping-merchant-quota-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-quota`. +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-quota-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-quota-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-quota-v1beta/Rakefile new file mode 100644 index 000000000000..c768f7ee70d1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-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/quota/v1beta/quota_service/credentials" + ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::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-quota-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-quota-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-quota-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-quota-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-shopping-merchant-quota-v1beta" + header "google-shopping-merchant-quota-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-shopping-merchant-quota-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-shopping-merchant-quota-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-quota-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-quota-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-quota-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-quota-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..994e71129897 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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.quota.v1beta", + "libraryPackage": "::Google::Shopping::Merchant::Quota::V1beta", + "services": { + "QuotaService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client", + "rpcs": { + "ListQuotaGroups": { + "methods": [ + "list_quota_groups" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/google-shopping-merchant-quota-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-quota-v1beta/google-shopping-merchant-quota-v1beta.gemspec new file mode 100644 index 000000000000..80797fd88c0c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/google-shopping-merchant-quota-v1beta.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/shopping/merchant/quota/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-shopping-merchant-quota-v1beta" + gem.version = Google::Shopping::Merchant::Quota::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-quota-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-quota instead. See the readme for more details." + gem.summary = "Programmatically manage your Merchant Center accounts." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google-shopping-merchant-quota-v1beta.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google-shopping-merchant-quota-v1beta.rb new file mode 100644 index 000000000000..dcfef8dd8a22 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google-shopping-merchant-quota-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/quota/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta.rb new file mode 100644 index 000000000000..977196bec81a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/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/quota/v1beta/quota_service" +require "google/shopping/merchant/quota/v1beta/version" + +module Google + module Shopping + module Merchant + module Quota + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/shopping/merchant/quota/v1beta" + # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/shopping/merchant/quota/v1beta" + # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/shopping/merchant/quota/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_pb.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_pb.rb new file mode 100644 index 000000000000..53ba336dd3d5 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/shopping/merchant/quota/v1beta/quota.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n1google/shopping/merchant/quota/v1beta/quota.proto\x12%google.shopping.merchant.quota.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xaf\x02\n\nQuotaGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bquota_usage\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bquota_limit\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1f\n\x12quota_minute_limit\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12Q\n\x0emethod_details\x18\x04 \x03(\x0b\x32\x34.google.shopping.merchant.quota.v1beta.MethodDetailsB\x03\xe0\x41\x03:f\xea\x41\x63\n%merchantapi.googleapis.com/QuotaGroup\x12!accounts/{account}/groups/{group}*\x0bquotaGroups2\nquotaGroup\"b\n\rMethodDetails\x12\x13\n\x06method\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06subapi\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\x88\x01\n\x16ListQuotaGroupsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%merchantapi.googleapis.com/QuotaGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"{\n\x17ListQuotaGroupsResponse\x12G\n\x0cquota_groups\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.quota.v1beta.QuotaGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xa5\x02\n\x0cQuotaService\x12\xcb\x01\n\x0fListQuotaGroups\x12=.google.shopping.merchant.quota.v1beta.ListQuotaGroupsRequest\x1a>.google.shopping.merchant.quota.v1beta.ListQuotaGroupsResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/quota/v1beta/{parent=accounts/*}/quotas\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xbb\x01\n)com.google.shopping.merchant.quota.v1betaB\nQuotaProtoP\x01ZEcloud.google.com/go/shopping/merchant/quota/apiv1beta/quotapb;quotapb\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 Quota + module V1beta + QuotaGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1beta.QuotaGroup").msgclass + MethodDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1beta.MethodDetails").msgclass + ListQuotaGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1beta.ListQuotaGroupsRequest").msgclass + ListQuotaGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1beta.ListQuotaGroupsResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service.rb new file mode 100644 index 000000000000..f4b3e9f55f81 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_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/quota/v1beta/version" + +require "google/shopping/merchant/quota/v1beta/quota_service/credentials" +require "google/shopping/merchant/quota/v1beta/quota_service/paths" +require "google/shopping/merchant/quota/v1beta/quota_service/client" +require "google/shopping/merchant/quota/v1beta/quota_service/rest" + +module Google + module Shopping + module Merchant + module Quota + module V1beta + ## + # Service to get method call quota information per Merchant API method. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/shopping/merchant/quota/v1beta/quota_service" + # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/shopping/merchant/quota/v1beta/quota_service/rest" + # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new + # + module QuotaService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "quota_service", "helpers.rb" +require "google/shopping/merchant/quota/v1beta/quota_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/client.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/client.rb new file mode 100644 index 000000000000..ce910c300d2b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/client.rb @@ -0,0 +1,495 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/quota/v1beta/quota_pb" + +module Google + module Shopping + module Merchant + module Quota + module V1beta + module QuotaService + ## + # Client for the QuotaService service. + # + # Service to get method call quota information per Merchant API method. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :quota_service_stub + + ## + # Configure the QuotaService Client class. + # + # See {::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all QuotaService clients + # ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Quota", "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 QuotaService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @quota_service_stub.universe_domain + end + + ## + # Create a new QuotaService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the QuotaService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/shopping/merchant/quota/v1beta/quota_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @quota_service_stub = ::Gapic::ServiceStub.new( + ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @quota_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @quota_service_stub.logger + end + + # Service calls + + ## + # Lists the daily call quota and usage per group for your Merchant + # Center account. + # + # @overload list_quota_groups(request, options = nil) + # Pass arguments to `list_quota_groups` via a request object, either of type + # {::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_quota_groups(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_quota_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account who owns the collection of method quotas + # Format: accounts/\\{account} + # @param page_size [::Integer] + # Optional. The maximum number of quotas to return in the response, used + # for paging. Defaults to 500; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Token (if provided) to retrieve the subsequent page. All other + # parameters must match the original call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1beta::QuotaGroup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1beta::QuotaGroup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/shopping/merchant/quota/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest.new + # + # # Call the list_quota_groups method. + # result = client.list_quota_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Quota::V1beta::QuotaGroup. + # p item + # end + # + def list_quota_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_quota_groups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Quota::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_quota_groups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_quota_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @quota_service_stub.call_rpc :list_quota_groups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @quota_service_stub, :list_quota_groups, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the QuotaService API. + # + # This class represents the configuration for QuotaService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_quota_groups to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_quota_groups.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_quota_groups.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the QuotaService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_quota_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_quota_groups + + # @private + def initialize parent_rpcs = nil + list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups + @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/credentials.rb new file mode 100644 index 000000000000..a19ac3012c6e --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_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 Quota + module V1beta + module QuotaService + # Credentials for the QuotaService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/content" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/paths.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/paths.rb new file mode 100644 index 000000000000..6e36a3756c8a --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Quota + module V1beta + module QuotaService + # Path helper methods for the QuotaService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest.rb new file mode 100644 index 000000000000..99ace1692d6f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_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/quota/v1beta/version" + +require "google/shopping/merchant/quota/v1beta/quota_service/credentials" +require "google/shopping/merchant/quota/v1beta/quota_service/paths" +require "google/shopping/merchant/quota/v1beta/quota_service/rest/client" + +module Google + module Shopping + module Merchant + module Quota + module V1beta + ## + # Service to get method call quota information per Merchant API method. + # + # To load this service and instantiate a REST client: + # + # require "google/shopping/merchant/quota/v1beta/quota_service/rest" + # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new + # + module QuotaService + # 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/quota/v1beta/quota_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest/client.rb new file mode 100644 index 000000000000..5793455107d2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest/client.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! + +require "google/cloud/errors" +require "google/shopping/merchant/quota/v1beta/quota_pb" +require "google/shopping/merchant/quota/v1beta/quota_service/rest/service_stub" + +module Google + module Shopping + module Merchant + module Quota + module V1beta + module QuotaService + module Rest + ## + # REST client for the QuotaService service. + # + # Service to get method call quota information per Merchant API method. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :quota_service_stub + + ## + # Configure the QuotaService Client class. + # + # See {::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all QuotaService clients + # ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Shopping", "Merchant", "Quota", "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 QuotaService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @quota_service_stub.universe_domain + end + + ## + # Create a new QuotaService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the QuotaService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @quota_service_stub = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @quota_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @quota_service_stub.logger + end + + # Service calls + + ## + # Lists the daily call quota and usage per group for your Merchant + # Center account. + # + # @overload list_quota_groups(request, options = nil) + # Pass arguments to `list_quota_groups` via a request object, either of type + # {::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_quota_groups(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_quota_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The merchant account who owns the collection of method quotas + # Format: accounts/\\{account} + # @param page_size [::Integer] + # Optional. The maximum number of quotas to return in the response, used + # for paging. Defaults to 500; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Token (if provided) to retrieve the subsequent page. All other + # parameters must match the original call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1beta::QuotaGroup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1beta::QuotaGroup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/shopping/merchant/quota/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest.new + # + # # Call the list_quota_groups method. + # result = client.list_quota_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Shopping::Merchant::Quota::V1beta::QuotaGroup. + # p item + # end + # + def list_quota_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_quota_groups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Shopping::Merchant::Quota::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_quota_groups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_quota_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @quota_service_stub.list_quota_groups request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @quota_service_stub, :list_quota_groups, "quota_groups", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the QuotaService REST API. + # + # This class represents the configuration for QuotaService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_quota_groups to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_quota_groups.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_quota_groups.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the QuotaService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_quota_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_quota_groups + + # @private + def initialize parent_rpcs = nil + list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups + @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest/service_stub.rb new file mode 100644 index 000000000000..5222fa1d85ed --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_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/quota/v1beta/quota_pb" + +module Google + module Shopping + module Merchant + module Quota + module V1beta + module QuotaService + module Rest + ## + # REST service stub for the QuotaService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_quota_groups REST call + # + # @param request_pb [::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsResponse] + # A result object deserialized from the server's reply + def list_quota_groups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_quota_groups_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_quota_groups", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_quota_groups REST call + # + # @param request_pb [::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_quota_groups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/quota/v1beta/{parent}/quotas", + 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-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_services_pb.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_services_pb.rb new file mode 100644 index 000000000000..4ac187ad3350 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_services_pb.rb @@ -0,0 +1,48 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/shopping/merchant/quota/v1beta/quota.proto for package 'google.shopping.merchant.quota.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/quota/v1beta/quota_pb' + +module Google + module Shopping + module Merchant + module Quota + module V1beta + module QuotaService + # Service to get method call quota information per Merchant API method. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.shopping.merchant.quota.v1beta.QuotaService' + + # Lists the daily call quota and usage per group for your Merchant + # Center account. + rpc :ListQuotaGroups, ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest, ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/rest.rb new file mode 100644 index 000000000000..4fcd8b4889ab --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/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/quota/v1beta/quota_service/rest" +require "google/shopping/merchant/quota/v1beta/version" + +module Google + module Shopping + module Merchant + module Quota + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/shopping/merchant/quota/v1beta/rest" + # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new + # + module V1beta + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/version.rb new file mode 100644 index 000000000000..c90a0137b2b0 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/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 Quota + module V1beta + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..03467a3756be --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta/proto_docs/google/shopping/merchant/quota/v1beta/quota.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/shopping/merchant/quota/v1beta/quota.rb new file mode 100644 index 000000000000..a29fd3bc636f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/shopping/merchant/quota/v1beta/quota.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Shopping + module Merchant + module Quota + module V1beta + # The group information for methods in the Merchant API. The quota is shared + # between all methods in the group. Even if none of the methods within the + # group have usage the information for the group is returned. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the quota group. + # Format: accounts/\\{account}/quotas/\\{group} + # Note: There is no guarantee on the format of \\{group} + # @!attribute [r] quota_usage + # @return [::Integer] + # Output only. The current quota usage, meaning the number of calls already + # made on a given day to the methods in the group. The daily quota limits + # reset at at 12:00 PM midday UTC. + # @!attribute [r] quota_limit + # @return [::Integer] + # Output only. The maximum number of calls allowed per day for the group. + # @!attribute [r] quota_minute_limit + # @return [::Integer] + # Output only. The maximum number of calls allowed per minute for the group. + # @!attribute [r] method_details + # @return [::Array<::Google::Shopping::Merchant::Quota::V1beta::MethodDetails>] + # Output only. List of all methods group quota applies to. + class QuotaGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The method details per method in the Merchant API. + # @!attribute [r] method + # @return [::String] + # Output only. The name of the method for example `products.list`. + # @!attribute [r] version + # @return [::String] + # Output only. The API version that the method belongs to. + # @!attribute [r] subapi + # @return [::String] + # Output only. The sub-API that the method belongs to. + # @!attribute [r] path + # @return [::String] + # Output only. The path for the method such as + # `products/v1/productInputs.insert` + class MethodDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListQuotaGroups method. + # @!attribute [rw] parent + # @return [::String] + # Required. The merchant account who owns the collection of method quotas + # Format: accounts/\\{account} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of quotas to return in the response, used + # for paging. Defaults to 500; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token (if provided) to retrieve the subsequent page. All other + # parameters must match the original call that provided the page token. + class ListQuotaGroupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListMethodGroups method. + # @!attribute [rw] quota_groups + # @return [::Array<::Google::Shopping::Merchant::Quota::V1beta::QuotaGroup>] + # The methods, current quota usage and limits per each group. The quota is + # shared between all methods in the group. The groups are sorted in + # descending order based on + # [quotaUsage][google.shopping.merchant.quota.v1main.QuotaGroup.quota_usage]. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListQuotaGroupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..5b0a2081824c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta", path: "../" +else + gem "google-shopping-merchant-quota-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-quota-v1beta/snippets/quota_service/list_quota_groups.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/quota_service/list_quota_groups.rb new file mode 100644 index 000000000000..21d599f72c9f --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/quota_service/list_quota_groups.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START merchantapi_v1beta_generated_QuotaService_ListQuotaGroups_sync] +require "google/shopping/merchant/quota/v1beta" + +## +# Snippet for the list_quota_groups call in the QuotaService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client#list_quota_groups. +# +def list_quota_groups + # Create a client object. The client can be reused for multiple calls. + client = Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest.new + + # Call the list_quota_groups method. + result = client.list_quota_groups request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Shopping::Merchant::Quota::V1beta::QuotaGroup. + p item + end +end +# [END merchantapi_v1beta_generated_QuotaService_ListQuotaGroups_sync] diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/snippet_metadata_google.shopping.merchant.quota.v1beta.json b/owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/snippet_metadata_google.shopping.merchant.quota.v1beta.json new file mode 100644 index 000000000000..908a3f3a5db1 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/snippet_metadata_google.shopping.merchant.quota.v1beta.json @@ -0,0 +1,55 @@ +{ + "client_library": { + "name": "google-shopping-merchant-quota-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.shopping.merchant.quota.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "merchantapi_v1beta_generated_QuotaService_ListQuotaGroups_sync", + "title": "Snippet for the list_quota_groups call in the QuotaService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client#list_quota_groups.", + "file": "quota_service/list_quota_groups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_quota_groups", + "full_name": "::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client#list_quota_groups", + "async": false, + "parameters": [ + { + "type": "::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsResponse", + "client": { + "short_name": "QuotaService::Client", + "full_name": "::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client" + }, + "method": { + "short_name": "ListQuotaGroups", + "full_name": "google.shopping.merchant.quota.v1beta.QuotaService.ListQuotaGroups", + "service": { + "short_name": "QuotaService", + "full_name": "google.shopping.merchant.quota.v1beta.QuotaService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_paths_test.rb new file mode 100644 index 000000000000..8791e3bae6b2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/quota/v1beta/quota_service" + +class ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_rest_test.rb new file mode 100644 index 000000000000..1e468b8aabf8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_rest_test.rb @@ -0,0 +1,155 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/shopping/merchant/quota/v1beta/quota_pb" +require "google/shopping/merchant/quota/v1beta/quota_service/rest" + + +class ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_quota_groups + # Create test objects. + client_result = ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_quota_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::ServiceStub.stub :transcode_list_quota_groups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_quota_groups_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_quota_groups parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_quota_groups ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_quota_groups(::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_quota_groups_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_test.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_test.rb new file mode 100644 index 000000000000..68ee67a98103 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_test.rb @@ -0,0 +1,171 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/shopping/merchant/quota/v1beta/quota_pb" +require "google/shopping/merchant/quota/v1beta/quota_service" + +class ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_quota_groups + # Create GRPC objects. + grpc_response = ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_quota_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_quota_groups, name + assert_kind_of ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_quota_groups_client_stub do + # Create client + client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_quota_groups parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_quota_groups ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_quota_groups(::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_quota_groups_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-reports-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-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..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-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..e7ebc0e8d197 --- /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.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-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..06a39d8d0730 --- /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.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "~> 1.0" +end diff --git a/owl-bot-staging/google-shopping-merchant-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..1fc5cad88cf2 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/client.rb @@ -0,0 +1,504 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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](/merchant/api/reference/rest/reports_v1/accounts.reports). + # @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::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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `: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..50866c204d10 --- /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,454 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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](/merchant/api/reference/rest/reports_v1/accounts.reports). + # @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::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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `: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..eb83a7ff4516 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/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/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\"\xbd\n\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\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\"\xa2\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\x83\x01\n#aggregated_reporting_context_status\x18\x1a \x01(\x0e\x32Q.google.shopping.merchant.reports.v1.ProductView.AggregatedReportingContextStatusH\x16\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\x17\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\"\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\"\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\"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::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 + 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..c00c192cbb54 --- /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 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/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..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-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..d231e3061292 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/shopping/merchant/reports/v1/reports.rb @@ -0,0 +1,1292 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +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](/merchant/api/reference/rest/reports_v1/accounts.reports). + # @!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::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] 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::V1::ProductView::AggregatedReportingContextStatus] + # Aggregated status. + # @!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] + # 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::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. + # @!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. + # + # **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::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 + + # 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..95284a3a8ecc --- /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 + client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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..7e5b5f6dc9ed --- /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 + client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-reports-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-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..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-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..665515ceb032 --- /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.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-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..db4e7aa1ab14 --- /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.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-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..d0c7126966f8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/client.rb @@ -0,0 +1,503 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `: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..e18fdbefcb4b --- /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,453 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `: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..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-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..2a9856765e68 --- /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 + client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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..608ef4d36ebe --- /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 + client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-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..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-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..913254327902 --- /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.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-shopping-merchant-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..f1899985e359 --- /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.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-shopping-merchant-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..b958b53b3b3e --- /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,786 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `: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..03c35edf5ad6 --- /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,715 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/shopping/merchant/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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `: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..56d185c0fb35 --- /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,781 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for 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. + # * `: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..fb219610fe3c --- /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,710 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "merchantapi.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_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. + # * `: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..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-shopping-merchant-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..efcfec182d1e --- /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 + client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_merchant_review({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_merchant_review name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.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 + client.get_merchant_review({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.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 + client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_merchant_review({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_merchant_review name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.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 + client.delete_merchant_review({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.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..3b13d9b5ae42 --- /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 + client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_merchant_review({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_merchant_review name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_merchant_review({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_merchant_review name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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..f156e3eea156 --- /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 + client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_product_review({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_product_review name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.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 + client.get_product_review({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.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 + client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_product_review({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_product_review name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.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 + client.delete_product_review({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.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..d6334a4fc20a --- /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 + client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_product_review({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_product_review name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_product_review({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_product_review name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/grafeas-v1/.gitignore b/owl-bot-staging/grafeas-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/grafeas-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/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..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/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..8ab5de2c8527 --- /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.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `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..3c76d6adb8e0 --- /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.2" + 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..12a5b5d82e12 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/cvss_pb.rb @@ -0,0 +1,32 @@ +# 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\"\xb8\x0b\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\"\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\"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\"{\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*S\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\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 + 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..8c994d359958 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas/client.rb @@ -0,0 +1,1808 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly 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. + # * `: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..cc6a9c38efd0 --- /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\"\xa7\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\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\"\xb8\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\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..74352be9c58c --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/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..4f3b944949f3 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/cvss.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 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] + # 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::CVSS::AttackComplexity] + # @!attribute [rw] authentication + # @return [::Grafeas::V1::CVSS::Authentication] + # @!attribute [rw] privileges_required + # @return [::Grafeas::V1::CVSS::PrivilegesRequired] + # @!attribute [rw] user_interaction + # @return [::Grafeas::V1::CVSS::UserInteraction] + # @!attribute [rw] scope + # @return [::Grafeas::V1::CVSS::Scope] + # @!attribute [rw] confidentiality_impact + # @return [::Grafeas::V1::CVSS::Impact] + # @!attribute [rw] integrity_impact + # @return [::Grafeas::V1::CVSS::Impact] + # @!attribute [rw] availability_impact + # @return [::Grafeas::V1::CVSS::Impact] + class CVSS + 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 + + ATTACK_COMPLEXITY_MEDIUM = 3 + end + + module Authentication + AUTHENTICATION_UNSPECIFIED = 0 + + AUTHENTICATION_MULTIPLE = 1 + + AUTHENTICATION_SINGLE = 2 + + AUTHENTICATION_NONE = 3 + 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 + + IMPACT_PARTIAL = 4 + + IMPACT_COMPLETE = 5 + end + end + + # CVSS Version. + module CVSSVersion + CVSS_VERSION_UNSPECIFIED = 0 + + CVSS_VERSION_2 = 1 + + CVSS_VERSION_3 = 2 + 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..57c9b424760a --- /dev/null +++ b/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/vulnerability.rb @@ -0,0 +1,317 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module 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. + 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. + 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..87615088c6ce --- /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 + client = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_occurrence({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_occurrence name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_occurrence({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_occurrence name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_occurrence({ parent: parent, occurrence: occurrence }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_occurrence parent: parent, occurrence: occurrence do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_create_occurrences({ parent: parent, occurrences: occurrences }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_create_occurrences parent: parent, occurrences: occurrences do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_occurrence_note({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_occurrence_note name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_note({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_note name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_note({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_note name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_create_notes({ parent: parent, notes: notes }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_create_notes parent: parent, notes: notes do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Grafeas::V1::Grafeas::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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..672b337030e7 --- /dev/null +++ b/owl-bot-staging/grafeas-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" From 1fe54b467da03e92bcf7ad579a2f904060a15792 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 1 Apr 2026 08:20:50 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + .../proto_docs/google/api/client.rb | 4 + grafeas-v1/proto_docs/google/api/client.rb | 4 + .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 -- .../README.md | 154 -- .../Rakefile | 169 -- .../gapic_metadata.json | 23 - ...hopping-merchant-order_tracking-v1.gemspec | 29 - ...gle-shopping-merchant-order_tracking-v1.rb | 21 - .../shopping/merchant/order_tracking/v1.rb | 47 - .../v1/order_tracking_signals_service.rb | 57 - .../order_tracking_signals_service/client.rb | 484 ----- .../credentials.rb | 49 - .../order_tracking_signals_service/paths.rb | 49 - .../v1/order_tracking_signals_service/rest.rb | 54 - .../rest/client.rb | 434 ---- .../rest/service_stub.rb | 145 -- .../merchant/order_tracking/v1/rest.rb | 39 - .../merchant/order_tracking/v1/version.rb | 30 - .../v1/order_tracking_signals_pb.rb | 35 - .../v1/order_tracking_signals_services_pb.rb | 47 - .../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 - .../v1/order_tracking_signals.rb | 211 -- .../proto_docs/google/shopping/type/types.rb | 248 --- .../proto_docs/google/type/datetime.rb | 104 - .../snippets/Gemfile | 32 - .../create_order_tracking_signal.rb | 47 - ...le.shopping.merchant.ordertracking.v1.json | 55 - ...der_tracking_signals_service_paths_test.rb | 55 - ...rder_tracking_signals_service_rest_test.rb | 155 -- .../v1/order_tracking_signals_service_test.rb | 166 -- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 -- .../README.md | 154 -- .../Rakefile | 169 -- .../gapic_metadata.json | 23 - ...ing-merchant-order_tracking-v1beta.gemspec | 29 - ...shopping-merchant-order_tracking-v1beta.rb | 21 - .../merchant/order_tracking/v1beta.rb | 47 - .../v1beta/order_tracking_signals_service.rb | 57 - .../order_tracking_signals_service/client.rb | 484 ----- .../credentials.rb | 49 - .../order_tracking_signals_service/paths.rb | 49 - .../order_tracking_signals_service/rest.rb | 54 - .../rest/client.rb | 434 ---- .../rest/service_stub.rb | 145 -- .../merchant/order_tracking/v1beta/rest.rb | 39 - .../merchant/order_tracking/v1beta/version.rb | 30 - .../v1beta/order_tracking_signals_pb.rb | 35 - .../order_tracking_signals_services_pb.rb | 47 - .../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 - .../v1beta/order_tracking_signals.rb | 211 -- .../proto_docs/google/shopping/type/types.rb | 248 --- .../proto_docs/google/type/datetime.rb | 104 - .../snippets/Gemfile | 32 - .../create_order_tracking_signal.rb | 47 - ...hopping.merchant.ordertracking.v1beta.json | 55 - ...der_tracking_signals_service_paths_test.rb | 55 - ...rder_tracking_signals_service_rest_test.rb | 155 -- .../order_tracking_signals_service_test.rb | 166 -- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 -- .../README.md | 154 -- .../Rakefile | 169 -- .../gapic_metadata.json | 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 | 767 ------- .../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 | 703 ------- .../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 | 72 - .../merchant/products/v1/products_pb.rb | 33 - .../merchant/products/v1/products_service.rb | 57 - .../products/v1/products_service/client.rb | 634 ------ .../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 | 577 ------ .../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 | 127 -- .../merchant/products/v1/productinputs.rb | 282 --- .../shopping/merchant/products/v1/products.rb | 201 -- .../merchant/products/v1/products_common.rb | 1818 ----------------- .../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 | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 -- .../README.md | 154 -- .../Rakefile | 169 -- .../gapic_metadata.json | 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 | 731 ------- .../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 | 667 ------ .../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 | 604 ------ .../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 | 547 ----- .../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 | 127 -- .../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 | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 -- .../README.md | 154 -- .../Rakefile | 169 -- .../gapic_metadata.json | 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 | 701 ------- .../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 | 637 ------ .../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 | 127 -- .../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 | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 -- .../README.md | 153 -- .../Rakefile | 169 -- .../gapic_metadata.json | 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 | 690 ------- .../v1beta/promotions_service/credentials.rb | 49 - .../v1beta/promotions_service/paths.rb | 52 - .../v1beta/promotions_service/rest.rb | 54 - .../v1beta/promotions_service/rest/client.rb | 626 ------ .../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 | 127 -- .../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 | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../google-shopping-merchant-quota-v1/Gemfile | 14 - .../LICENSE.md | 201 -- .../README.md | 154 -- .../Rakefile | 169 -- .../gapic_metadata.json | 42 - .../google-shopping-merchant-quota-v1.gemspec | 28 - .../lib/google-shopping-merchant-quota-v1.rb | 21 - .../lib/google/shopping/merchant/quota/v1.rb | 48 - .../quota/v1/account_limits_service.rb | 57 - .../quota/v1/account_limits_service/client.rb | 595 ------ .../v1/account_limits_service/credentials.rb | 49 - .../quota/v1/account_limits_service/paths.rb | 66 - .../quota/v1/account_limits_service/rest.rb | 54 - .../v1/account_limits_service/rest/client.rb | 538 ----- .../rest/service_stub.rb | 205 -- .../merchant/quota/v1/accountlimits_pb.rb | 33 - .../quota/v1/accountlimits_services_pb.rb | 49 - .../shopping/merchant/quota/v1/quota_pb.rb | 31 - .../merchant/quota/v1/quota_service.rb | 57 - .../merchant/quota/v1/quota_service/client.rb | 495 ----- .../quota/v1/quota_service/credentials.rb | 49 - .../merchant/quota/v1/quota_service/paths.rb | 49 - .../merchant/quota/v1/quota_service/rest.rb | 54 - .../quota/v1/quota_service/rest/client.rb | 445 ---- .../v1/quota_service/rest/service_stub.rb | 144 -- .../merchant/quota/v1/quota_services_pb.rb | 48 - .../google/shopping/merchant/quota/v1/rest.rb | 40 - .../shopping/merchant/quota/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 - .../merchant/quota/v1/accountlimits.rb | 118 -- .../shopping/merchant/quota/v1/quota.rb | 108 - .../snippets/Gemfile | 32 - .../get_account_limit.rb | 47 - .../list_account_limits.rb | 51 - .../quota_service/list_quota_groups.rb | 51 - ...ata_google.shopping.merchant.quota.v1.json | 135 -- .../v1/account_limits_service_paths_test.rb | 67 - .../v1/account_limits_service_rest_test.rb | 210 -- .../quota/v1/account_limits_service_test.rb | 231 --- .../quota/v1/quota_service_paths_test.rb | 55 - .../quota/v1/quota_service_rest_test.rb | 155 -- .../merchant/quota/v1/quota_service_test.rb | 171 -- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 -- .../README.md | 153 -- .../Rakefile | 169 -- .../gapic_metadata.json | 23 - ...gle-shopping-merchant-quota-v1beta.gemspec | 28 - .../google-shopping-merchant-quota-v1beta.rb | 21 - .../google/shopping/merchant/quota/v1beta.rb | 47 - .../merchant/quota/v1beta/quota_pb.rb | 31 - .../merchant/quota/v1beta/quota_service.rb | 57 - .../quota/v1beta/quota_service/client.rb | 495 ----- .../quota/v1beta/quota_service/credentials.rb | 49 - .../quota/v1beta/quota_service/paths.rb | 49 - .../quota/v1beta/quota_service/rest.rb | 54 - .../quota/v1beta/quota_service/rest/client.rb | 445 ---- .../v1beta/quota_service/rest/service_stub.rb | 144 -- .../quota/v1beta/quota_services_pb.rb | 48 - .../shopping/merchant/quota/v1beta/rest.rb | 39 - .../shopping/merchant/quota/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 - .../shopping/merchant/quota/v1beta/quota.rb | 108 - .../snippets/Gemfile | 32 - .../quota_service/list_quota_groups.rb | 51 - ...google.shopping.merchant.quota.v1beta.json | 55 - .../quota/v1beta/quota_service_paths_test.rb | 55 - .../quota/v1beta/quota_service_rest_test.rb | 155 -- .../quota/v1beta/quota_service_test.rb | 171 -- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 -- .../README.md | 154 -- .../Rakefile | 169 -- .../gapic_metadata.json | 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 | 504 ----- .../reports/v1/report_service/credentials.rb | 49 - .../reports/v1/report_service/rest.rb | 54 - .../reports/v1/report_service/rest/client.rb | 454 ---- .../v1/report_service/rest/service_stub.rb | 145 -- .../merchant/reports/v1/reports_pb.rb | 62 - .../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 | 127 -- .../shopping/merchant/reports/v1/reports.rb | 1292 ------------ .../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 | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 -- .../README.md | 153 -- .../Rakefile | 169 -- .../gapic_metadata.json | 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 | 503 ----- .../v1beta/report_service/credentials.rb | 49 - .../reports/v1beta/report_service/rest.rb | 54 - .../v1beta/report_service/rest/client.rb | 453 ---- .../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 | 127 -- .../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 | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 -- .../README.md | 154 -- .../Rakefile | 169 -- .../gapic_metadata.json | 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 | 786 ------- .../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 | 715 ------- .../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 | 781 ------- .../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 | 710 ------- .../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 | 127 -- .../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 | 26 - owl-bot-staging/grafeas-v1/.gitignore | 22 - .../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 | 14 - 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 | 32 - .../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 | 1808 ---------------- .../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 | 127 -- .../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 | 229 --- .../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 | 317 --- 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 | 26 - 658 files changed, 48 insertions(+), 84184 deletions(-) delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/google-shopping-merchant-order_tracking-v1.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google-shopping-merchant-order_tracking-v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/shopping/merchant/ordertracking/v1/order_tracking_signals.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/type/datetime.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/snippets/order_tracking_signals_service/create_order_tracking_signal.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1.json delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/google-shopping-merchant-order_tracking-v1beta.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google-shopping-merchant-order_tracking-v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/shopping/type/types.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/type/datetime.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/snippets/order_tracking_signals_service/create_order_tracking_signal.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1beta.json delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-order_tracking-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-quota-v1/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/google-shopping-merchant-quota-v1.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google-shopping-merchant-quota-v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/accountlimits_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/accountlimits_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/shopping/merchant/quota/v1/accountlimits.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/shopping/merchant/quota/v1/quota.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/snippets/account_limits_service/get_account_limit.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/snippets/account_limits_service/list_account_limits.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/snippets/quota_service/list_quota_groups.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/snippets/snippet_metadata_google.shopping.merchant.quota.v1.json delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/google-shopping-merchant-quota-v1beta.gemspec delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google-shopping-merchant-quota-v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/credentials.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/paths.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_services_pb.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/version.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/shopping/merchant/quota/v1beta/quota.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/quota_service/list_quota_groups.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/snippet_metadata_google.shopping.merchant.quota.v1beta.json delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_paths_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_rest_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_test.rb delete mode 100644 owl-bot-staging/google-shopping-merchant-quota-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-order_tracking-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/client.rb index 25b227e61cdc..30c954fb0d5c 100644 --- a/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/api/client.rb b/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/api/client.rb index 25b227e61cdc..30c954fb0d5c 100644 --- a/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 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 25b227e61cdc..30c954fb0d5c 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 @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 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 a8b1b06d1cad..c58739e32368 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 @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 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 25b227e61cdc..30c954fb0d5c 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 @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 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 a8b1b06d1cad..c58739e32368 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 @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-shopping-merchant-quota-v1/proto_docs/google/api/client.rb b/google-shopping-merchant-quota-v1/proto_docs/google/api/client.rb index 25b227e61cdc..30c954fb0d5c 100644 --- a/google-shopping-merchant-quota-v1/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-quota-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/google-shopping-merchant-quota-v1beta/proto_docs/google/api/client.rb b/google-shopping-merchant-quota-v1beta/proto_docs/google/api/client.rb index a8b1b06d1cad..c58739e32368 100644 --- a/google-shopping-merchant-quota-v1beta/proto_docs/google/api/client.rb +++ b/google-shopping-merchant-quota-v1beta/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 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 25b227e61cdc..30c954fb0d5c 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 @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 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 97193034f37c..f20af9485bd9 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 @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 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 a8b1b06d1cad..c58739e32368 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 @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/grafeas-v1/proto_docs/google/api/client.rb b/grafeas-v1/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/grafeas-v1/proto_docs/google/api/client.rb +++ b/grafeas-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/.repo-metadata.json deleted file mode 100644 index 5bc02602e046..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1", - "distribution_name": "google-shopping-merchant-order_tracking-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-order_tracking-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-order_tracking 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-order_tracking-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/.rubocop.yml deleted file mode 100644 index 447f86ce1016..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-order_tracking-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-order_tracking-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/.yardopts deleted file mode 100644 index dc7bbc10ae29..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/AUTHENTICATION.md deleted file mode 100644 index bb5fcaedaf7c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-order_tracking-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-order_tracking-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/order_tracking/v1" - -client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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/order_tracking/v1" - -::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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-order_tracking-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/order_tracking/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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-order_tracking-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1/README.md b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/README.md deleted file mode 100644 index bc08156536ed..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking](https://rubygems.org/gems/google-shopping-merchant-order_tracking). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-order_tracking-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/order_tracking/v1" - -client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new -request = ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new # (request fields as keyword arguments...) -response = client.create_order_tracking_signal request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-order_tracking-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/order_tracking/v1" -require "logger" - -client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-order_tracking`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-order_tracking-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-order_tracking`. -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-order_tracking-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-order_tracking-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/Rakefile deleted file mode 100644 index 5c003c773f38..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-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/order_tracking/v1/order_tracking_signals_service/credentials" - ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::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-order_tracking-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-order_tracking-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-order_tracking-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-order_tracking-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-order_tracking-v1" - header "google-shopping-merchant-order_tracking-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-order_tracking-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-order_tracking-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-order_tracking-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-order_tracking-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-order_tracking-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/gapic_metadata.json deleted file mode 100644 index 3046a917de44..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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.ordertracking.v1", - "libraryPackage": "::Google::Shopping::Merchant::OrderTracking::V1", - "services": { - "OrderTrackingSignalsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client", - "rpcs": { - "CreateOrderTrackingSignal": { - "methods": [ - "create_order_tracking_signal" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/google-shopping-merchant-order_tracking-v1.gemspec b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/google-shopping-merchant-order_tracking-v1.gemspec deleted file mode 100644 index 0d2d0c44b1f2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/google-shopping-merchant-order_tracking-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/order_tracking/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-order_tracking-v1" - gem.version = Google::Shopping::Merchant::OrderTracking::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-order_tracking-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-order_tracking instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center Accounts." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-shopping-type", "~> 1.0" -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google-shopping-merchant-order_tracking-v1.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google-shopping-merchant-order_tracking-v1.rb deleted file mode 100644 index 1207098a2145..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google-shopping-merchant-order_tracking-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/order_tracking/v1" diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1.rb deleted file mode 100644 index f2ee7c434c97..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/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/order_tracking/v1/order_tracking_signals_service" -require "google/shopping/merchant/order_tracking/v1/version" - -module Google - module Shopping - module Merchant - module OrderTracking - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/order_tracking/v1" - # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/order_tracking/v1" - # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/shopping/merchant/order_tracking/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service.rb deleted file mode 100644 index 0e281d58c4d4..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_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/order_tracking/v1/version" - -require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/credentials" -require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/paths" -require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/client" -require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest" - -module Google - module Shopping - module Merchant - module OrderTracking - module V1 - ## - # Service to serve order tracking signals public API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service" - # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest" - # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new - # - module OrderTrackingSignalsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "order_tracking_signals_service", "helpers.rb" -require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/client.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/client.rb deleted file mode 100644 index 81ad2a10065d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/client.rb +++ /dev/null @@ -1,484 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb" - -module Google - module Shopping - module Merchant - module OrderTracking - module V1 - module OrderTrackingSignalsService - ## - # Client for the OrderTrackingSignalsService service. - # - # Service to serve order tracking signals public API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :order_tracking_signals_service_stub - - ## - # Configure the OrderTrackingSignalsService Client class. - # - # See {::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all OrderTrackingSignalsService clients - # ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "OrderTracking", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the OrderTrackingSignalsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @order_tracking_signals_service_stub.universe_domain - end - - ## - # Create a new OrderTrackingSignalsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the OrderTrackingSignalsService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed 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/ordertracking/v1/order_tracking_signals_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @order_tracking_signals_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @order_tracking_signals_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 - @order_tracking_signals_service_stub.logger - end - - # Service calls - - ## - # Creates new order tracking signal. - # - # @overload create_order_tracking_signal(request, options = nil) - # Pass arguments to `create_order_tracking_signal` via a request object, either of type - # {::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_order_tracking_signal(parent: nil, order_tracking_signal: nil) - # Pass arguments to `create_order_tracking_signal` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the business for which the order signal is - # created. Format: accounts/\\{account} - # @param order_tracking_signal [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal, ::Hash] - # Required. The order signal to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/order_tracking/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new - # - # # Call the create_order_tracking_signal method. - # result = client.create_order_tracking_signal request - # - # # The returned object is of type Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal. - # p result - # - def create_order_tracking_signal request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_order_tracking_signal.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::OrderTracking::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_order_tracking_signal.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_order_tracking_signal.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @order_tracking_signals_service_stub.call_rpc :create_order_tracking_signal, request, 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 OrderTrackingSignalsService API. - # - # This class represents the configuration for OrderTrackingSignalsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_order_tracking_signal to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_order_tracking_signal.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_order_tracking_signal.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the OrderTrackingSignalsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_order_tracking_signal` - # @return [::Gapic::Config::Method] - # - attr_reader :create_order_tracking_signal - - # @private - def initialize parent_rpcs = nil - create_order_tracking_signal_config = parent_rpcs.create_order_tracking_signal if parent_rpcs.respond_to? :create_order_tracking_signal - @create_order_tracking_signal = ::Gapic::Config::Method.new create_order_tracking_signal_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-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/credentials.rb deleted file mode 100644 index 7b4087307466..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_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 OrderTracking - module V1 - module OrderTrackingSignalsService - # Credentials for the OrderTrackingSignalsService 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-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/paths.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/paths.rb deleted file mode 100644 index c2b73f02c8d1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/paths.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module OrderTracking - module V1 - module OrderTrackingSignalsService - # Path helper methods for the OrderTrackingSignalsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest.rb deleted file mode 100644 index 6833ff75d496..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_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/order_tracking/v1/version" - -require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/credentials" -require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/paths" -require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/client" - -module Google - module Shopping - module Merchant - module OrderTracking - module V1 - ## - # Service to serve order tracking signals public API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest" - # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new - # - module OrderTrackingSignalsService - # 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/order_tracking/v1/order_tracking_signals_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/client.rb deleted file mode 100644 index 7d5048bfe3f9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/client.rb +++ /dev/null @@ -1,434 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb" -require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module OrderTracking - module V1 - module OrderTrackingSignalsService - module Rest - ## - # REST client for the OrderTrackingSignalsService service. - # - # Service to serve order tracking signals public API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :order_tracking_signals_service_stub - - ## - # Configure the OrderTrackingSignalsService Client class. - # - # See {::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all OrderTrackingSignalsService clients - # ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "OrderTracking", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the OrderTrackingSignalsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @order_tracking_signals_service_stub.universe_domain - end - - ## - # Create a new OrderTrackingSignalsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the OrderTrackingSignalsService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @order_tracking_signals_service_stub = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @order_tracking_signals_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 - @order_tracking_signals_service_stub.logger - end - - # Service calls - - ## - # Creates new order tracking signal. - # - # @overload create_order_tracking_signal(request, options = nil) - # Pass arguments to `create_order_tracking_signal` via a request object, either of type - # {::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_order_tracking_signal(parent: nil, order_tracking_signal: nil) - # Pass arguments to `create_order_tracking_signal` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the business for which the order signal is - # created. Format: accounts/\\{account} - # @param order_tracking_signal [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal, ::Hash] - # Required. The order signal to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/order_tracking/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new - # - # # Call the create_order_tracking_signal method. - # result = client.create_order_tracking_signal request - # - # # The returned object is of type Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal. - # p result - # - def create_order_tracking_signal request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_order_tracking_signal.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::OrderTracking::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_order_tracking_signal.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_order_tracking_signal.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @order_tracking_signals_service_stub.create_order_tracking_signal request, 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 OrderTrackingSignalsService REST API. - # - # This class represents the configuration for OrderTrackingSignalsService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_order_tracking_signal to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_order_tracking_signal.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_order_tracking_signal.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the OrderTrackingSignalsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_order_tracking_signal` - # @return [::Gapic::Config::Method] - # - attr_reader :create_order_tracking_signal - - # @private - def initialize parent_rpcs = nil - create_order_tracking_signal_config = parent_rpcs.create_order_tracking_signal if parent_rpcs.respond_to? :create_order_tracking_signal - @create_order_tracking_signal = ::Gapic::Config::Method.new create_order_tracking_signal_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-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest/service_stub.rb deleted file mode 100644 index c8f1fe2d2d2d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/order_tracking_signals_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/ordertracking/v1/order_tracking_signals_pb" - -module Google - module Shopping - module Merchant - module OrderTracking - module V1 - module OrderTrackingSignalsService - module Rest - ## - # REST service stub for the OrderTrackingSignalsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_order_tracking_signal REST call - # - # @param request_pb [::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] - # A result object deserialized from the server's reply - def create_order_tracking_signal request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_order_tracking_signal_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_order_tracking_signal", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_order_tracking_signal REST call - # - # @param request_pb [::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_order_tracking_signal_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/ordertracking/v1/{parent}/orderTrackingSignals", - body: "order_tracking_signal", - 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-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/rest.rb deleted file mode 100644 index e370c27e3c74..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/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/order_tracking/v1/order_tracking_signals_service/rest" -require "google/shopping/merchant/order_tracking/v1/version" - -module Google - module Shopping - module Merchant - module OrderTracking - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/order_tracking/v1/rest" - # client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/version.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/v1/version.rb deleted file mode 100644 index ee7a7664f7b0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/order_tracking/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 OrderTracking - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb.rb deleted file mode 100644 index 785e6d249b62..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_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/ordertracking/v1/order_tracking_signals.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/shopping/type/types_pb' -require 'google/type/datetime_pb' - - -descriptor_data = "\nFgoogle/shopping/merchant/ordertracking/v1/order_tracking_signals.proto\x12)google.shopping.merchant.ordertracking.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/datetime.proto\"\xe9\x01\n CreateOrderTrackingSignalRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12%\n\x18order_tracking_signal_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x62\n\x15order_tracking_signal\x18\x03 \x01(\x0b\x32>.google.shopping.merchant.ordertracking.v1.OrderTrackingSignalB\x03\xe0\x41\x02\"\xd3\x0c\n\x13OrderTrackingSignal\x12%\n\x18order_tracking_signal_id\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bmerchant_id\x18\x0c \x01(\x03\x42\x03\xe0\x41\x01\x12\x36\n\x12order_created_time\x18\x01 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x02\x12\x15\n\x08order_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12g\n\rshipping_info\x18\x03 \x03(\x0b\x32K.google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.ShippingInfoB\x03\xe0\x41\x02\x12g\n\nline_items\x18\x04 \x03(\x0b\x32N.google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.LineItemDetailsB\x03\xe0\x41\x02\x12\x7f\n\x1ashipment_line_item_mapping\x18\x05 \x03(\x0b\x32V.google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.ShipmentLineItemMappingB\x03\xe0\x41\x01\x12\x44\n\x15\x63ustomer_shipping_fee\x18\x06 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12!\n\x14\x64\x65livery_postal_code\x18\t \x01(\tB\x03\xe0\x41\x01\x12!\n\x14\x64\x65livery_region_code\x18\n \x01(\tB\x03\xe0\x41\x01\x1a\xf0\x04\n\x0cShippingInfo\x12\x18\n\x0bshipment_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0btracking_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x63\x61rrier\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x63\x61rrier_service\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x30\n\x0cshipped_time\x18\x05 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x01\x12\x42\n\x1e\x65\x61rliest_delivery_promise_time\x18\x06 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x01\x12@\n\x1clatest_delivery_promise_time\x18\x07 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x01\x12\x38\n\x14\x61\x63tual_delivery_time\x18\x08 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x01\x12w\n\x0fshipping_status\x18\t \x01(\x0e\x32Y.google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.ShippingInfo.ShippingStateB\x03\xe0\x41\x02\x12\x1f\n\x12origin_postal_code\x18\n \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12origin_region_code\x18\x0b \x01(\tB\x03\xe0\x41\x02\"K\n\rShippingState\x12\x1e\n\x1aSHIPPING_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SHIPPED\x10\x01\x12\r\n\tDELIVERED\x10\x02\x1a\xd8\x01\n\x0fLineItemDetails\x12\x19\n\x0cline_item_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nproduct_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05gtins\x18\x08 \x03(\tB\x03\xe0\x41\x01\x12\x10\n\x03mpn\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\rproduct_title\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05\x62rand\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x15\n\x08quantity\x18\x07 \x01(\x03\x42\x03\xe0\x41\x02\x42\x10\n\x0e_product_titleB\x08\n\x06_brand\x1a\x65\n\x17ShipmentLineItemMapping\x12\x18\n\x0bshipment_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cline_item_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08quantity\x18\x03 \x01(\x03\x42\x03\xe0\x41\x02\x42\x18\n\x16_customer_shipping_fee2\x8e\x03\n\x1bOrderTrackingSignalsService\x12\xa5\x02\n\x19\x43reateOrderTrackingSignal\x12K.google.shopping.merchant.ordertracking.v1.CreateOrderTrackingSignalRequest\x1a>.google.shopping.merchant.ordertracking.v1.OrderTrackingSignal\"{\xda\x41\x1fparent,order_tracking_signal_id\x82\xd3\xe4\x93\x02S\":/ordertracking/v1/{parent=accounts/*}/orderTrackingSignals:\x15order_tracking_signal\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xea\x02\n-com.google.shopping.merchant.ordertracking.v1B\x19OrderTrackingSignalsProtoP\x01ZYcloud.google.com/go/shopping/merchant/ordertracking/apiv1/ordertrackingpb;ordertrackingpb\xaa\x02)Google.Shopping.Merchant.OrderTracking.V1\xca\x02)Google\\Shopping\\Merchant\\OrderTracking\\V1\xea\x02-Google::Shopping::Merchant::OrderTracking::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 OrderTracking - module V1 - CreateOrderTrackingSignalRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1.CreateOrderTrackingSignalRequest").msgclass - OrderTrackingSignal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1.OrderTrackingSignal").msgclass - OrderTrackingSignal::ShippingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.ShippingInfo").msgclass - OrderTrackingSignal::ShippingInfo::ShippingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.ShippingInfo.ShippingState").enummodule - OrderTrackingSignal::LineItemDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.LineItemDetails").msgclass - OrderTrackingSignal::ShipmentLineItemMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1.OrderTrackingSignal.ShipmentLineItemMapping").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_services_pb.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_services_pb.rb deleted file mode 100644 index 25994a1c1613..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/lib/google/shopping/merchant/ordertracking/v1/order_tracking_signals_services_pb.rb +++ /dev/null @@ -1,47 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/ordertracking/v1/order_tracking_signals.proto for package 'Google.Shopping.Merchant.OrderTracking.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/ordertracking/v1/order_tracking_signals_pb' - -module Google - module Shopping - module Merchant - module OrderTracking - module V1 - module OrderTrackingSignalsService - # Service to serve order tracking signals public API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.ordertracking.v1.OrderTrackingSignalsService' - - # Creates new order tracking signal. - rpc :CreateOrderTrackingSignal, ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest, ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/README.md deleted file mode 100644 index 110adc2cf42e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1/proto_docs/google/shopping/merchant/ordertracking/v1/order_tracking_signals.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/shopping/merchant/ordertracking/v1/order_tracking_signals.rb deleted file mode 100644 index 9534cd1cf2df..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/shopping/merchant/ordertracking/v1/order_tracking_signals.rb +++ /dev/null @@ -1,211 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module OrderTracking - module V1 - # Signals only can be created but not updated. - # Businesses need to call this API only when the order is completely shipped. - # Creates new order signal. - # @!attribute [rw] parent - # @return [::String] - # Required. The account of the business for which the order signal is - # created. Format: accounts/\\{account} - # @!attribute [r] order_tracking_signal_id - # @return [::String] - # Output only. The ID that uniquely identifies this order tracking signal. - # @!attribute [rw] order_tracking_signal - # @return [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal] - # Required. The order signal to be created. - class CreateOrderTrackingSignalRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a business trade from which signals are extracted, such as - # shipping. - # @!attribute [r] order_tracking_signal_id - # @return [::Integer] - # Output only. The ID that uniquely identifies this order tracking signal. - # @!attribute [rw] merchant_id - # @return [::Integer] - # Optional. The Google Merchant Center ID of this order tracking signal. This - # value is optional. If left unset, the caller's Merchant Center ID is used. - # You must request access in order to provide data on behalf of another - # business. For more information, see [Submitting Order Tracking - # Signals](/shopping-content/guides/order-tracking-signals). - # @!attribute [rw] order_created_time - # @return [::Google::Type::DateTime] - # Required. The time when the order was created on the businesses side. - # Include the year and timezone string, if available. - # @!attribute [rw] order_id - # @return [::String] - # Required. The ID of the order on the businesses side. This field will be - # hashed in returned OrderTrackingSignal creation response. - # @!attribute [rw] shipping_info - # @return [::Array<::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal::ShippingInfo>] - # Required. The shipping information for the order. - # @!attribute [rw] line_items - # @return [::Array<::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal::LineItemDetails>] - # Required. Information about line items in the order. - # @!attribute [rw] shipment_line_item_mapping - # @return [::Array<::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal::ShipmentLineItemMapping>] - # Optional. The mapping of the line items to the shipment information. - # @!attribute [rw] customer_shipping_fee - # @return [::Google::Shopping::Type::Price] - # Optional. The shipping fee of the order; - # this value should be set to zero in the case of free shipping. - # @!attribute [rw] delivery_postal_code - # @return [::String] - # Optional. The delivery postal code, as a continuous string without spaces - # or dashes, for example "95016". This field will be anonymized in returned - # OrderTrackingSignal creation response. - # @!attribute [rw] delivery_region_code - # @return [::String] - # Optional. The [CLDR territory code] - # (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for - # the shipping destination. - class OrderTrackingSignal - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The shipping information for the order. - # @!attribute [rw] shipment_id - # @return [::String] - # Required. The shipment ID. This field will be hashed in returned - # OrderTrackingSignal creation response. - # @!attribute [rw] tracking_id - # @return [::String] - # Optional. The tracking ID of the shipment. This field is required if one - # of the following fields is absent: earliest_delivery_promise_time, - # latest_delivery_promise_time, and actual_delivery_time. - # @!attribute [rw] carrier - # @return [::String] - # Optional. The name of the shipping carrier for the delivery. This field - # is required if one of the following fields is absent: - # earliest_delivery_promise_time, latest_delivery_promise_time, - # and actual_delivery_time. - # @!attribute [rw] carrier_service - # @return [::String] - # Optional. The service type for fulfillment, such as GROUND, FIRST_CLASS, - # etc. - # @!attribute [rw] shipped_time - # @return [::Google::Type::DateTime] - # Optional. The time when the shipment was shipped. - # Include the year and timezone string, if available. - # @!attribute [rw] earliest_delivery_promise_time - # @return [::Google::Type::DateTime] - # Optional. The earliest delivery promised time. - # Include the year and timezone string, if available. - # This field is required, if one of the following fields is absent: - # tracking_id or carrier_name. - # @!attribute [rw] latest_delivery_promise_time - # @return [::Google::Type::DateTime] - # Optional. The latest delivery promised time. - # Include the year and timezone string, if available. - # This field is required, if one of the following fields is absent: - # tracking_id or carrier_name. - # @!attribute [rw] actual_delivery_time - # @return [::Google::Type::DateTime] - # Optional. The time when the shipment was actually delivered. - # Include the year and timezone string, if available. - # This field is required, if one of the following fields is absent: - # tracking_id or carrier_name. - # @!attribute [rw] shipping_status - # @return [::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal::ShippingInfo::ShippingState] - # Required. The status of the shipment. - # @!attribute [rw] origin_postal_code - # @return [::String] - # Required. The origin postal code, as a continuous string without spaces - # or dashes, for example "95016". This field will be anonymized in returned - # OrderTrackingSignal creation response. - # @!attribute [rw] origin_region_code - # @return [::String] - # Required. The [CLDR territory code] - # (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for - # the shipping origin. - class ShippingInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The current status of the shipments. - module ShippingState - # The shipping status is not known to business. - SHIPPING_STATE_UNSPECIFIED = 0 - - # All items are shipped. - SHIPPED = 1 - - # The shipment is already delivered. - DELIVERED = 2 - end - end - - # The line items of the order. - # @!attribute [rw] line_item_id - # @return [::String] - # Required. The ID for this line item. - # @!attribute [rw] product_id - # @return [::String] - # Required. The Content API REST ID of the product, in the - # form channel:contentLanguage:targetCountry:offerId. - # @!attribute [rw] gtins - # @return [::Array<::String>] - # Optional. The Global Trade Item Numbers. - # @!attribute [rw] mpn - # @return [::String] - # Optional. The manufacturer part number. - # @!attribute [rw] product_title - # @return [::String] - # Optional. Plain text title of this product. - # @!attribute [rw] brand - # @return [::String] - # Optional. Brand of the product. - # @!attribute [rw] quantity - # @return [::Integer] - # Required. The quantity of the line item in the order. - class LineItemDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents how many items are in the shipment for the given shipment_id - # and line_item_id. - # @!attribute [rw] shipment_id - # @return [::String] - # Required. The shipment ID. This field will be hashed in returned - # OrderTrackingSignal creation response. - # @!attribute [rw] line_item_id - # @return [::String] - # Required. The line item ID. - # @!attribute [rw] quantity - # @return [::Integer] - # Required. The line item quantity in the shipment. - class ShipmentLineItemMapping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/type/datetime.rb deleted file mode 100644 index 10625864f3dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/proto_docs/google/type/datetime.rb +++ /dev/null @@ -1,104 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents civil time (or occasionally physical time). - # - # This type can represent a civil time in one of a few possible ways: - # - # * When utc_offset is set and time_zone is unset: a civil time on a calendar - # day with a particular offset from UTC. - # * When time_zone is set and utc_offset is unset: a civil time on a calendar - # day in a particular time zone. - # * When neither time_zone nor utc_offset is set: a civil time on a calendar - # day in local time. - # - # The date is relative to the Proleptic Gregorian Calendar. - # - # If year, month, or day are 0, the DateTime is considered not to have a - # specific year, month, or day respectively. - # - # This type may also be used to represent a physical time if all the date and - # time fields are set and either case of the `time_offset` oneof is set. - # Consider using `Timestamp` message for physical time instead. If your use - # case also would like to store the user's timezone, that can be done in - # another field. - # - # This type is more flexible than some applications may want. Make sure to - # document and validate your application's limitations. - # @!attribute [rw] year - # @return [::Integer] - # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a - # datetime without a year. - # @!attribute [rw] month - # @return [::Integer] - # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a - # datetime without a month. - # @!attribute [rw] day - # @return [::Integer] - # Optional. Day of month. Must be from 1 to 31 and valid for the year and - # month, or 0 if specifying a datetime without a day. - # @!attribute [rw] hours - # @return [::Integer] - # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults - # to 0 (midnight). An API may choose to allow the value "24:00:00" for - # scenarios like business closing time. - # @!attribute [rw] minutes - # @return [::Integer] - # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0. - # @!attribute [rw] seconds - # @return [::Integer] - # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, - # defaults to 0. An API may allow the value 60 if it allows leap-seconds. - # @!attribute [rw] nanos - # @return [::Integer] - # Optional. Fractions of seconds in nanoseconds. Must be from 0 to - # 999,999,999, defaults to 0. - # @!attribute [rw] utc_offset - # @return [::Google::Protobuf::Duration] - # UTC offset. Must be whole seconds, between -18 hours and +18 hours. - # For example, a UTC offset of -4:00 would be represented as - # { seconds: -14400 }. - # - # Note: The following fields are mutually exclusive: `utc_offset`, `time_zone`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] time_zone - # @return [::Google::Type::TimeZone] - # Time zone. - # - # Note: The following fields are mutually exclusive: `time_zone`, `utc_offset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DateTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a time zone from the - # [IANA Time Zone Database](https://www.iana.org/time-zones). - # @!attribute [rw] id - # @return [::String] - # IANA Time Zone Database time zone. For example "America/New_York". - # @!attribute [rw] version - # @return [::String] - # Optional. IANA Time Zone Database version number. For example "2019a". - class TimeZone - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/snippets/Gemfile deleted file mode 100644 index 112bd74accfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1", path: "../" -else - gem "google-shopping-merchant-order_tracking-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-order_tracking-v1/snippets/order_tracking_signals_service/create_order_tracking_signal.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/snippets/order_tracking_signals_service/create_order_tracking_signal.rb deleted file mode 100644 index 3604679a025f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/snippets/order_tracking_signals_service/create_order_tracking_signal.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_OrderTrackingSignalsService_CreateOrderTrackingSignal_sync] -require "google/shopping/merchant/order_tracking/v1" - -## -# Snippet for the create_order_tracking_signal call in the OrderTrackingSignalsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client#create_order_tracking_signal. -# -def create_order_tracking_signal - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new - - # Call the create_order_tracking_signal method. - result = client.create_order_tracking_signal request - - # The returned object is of type Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal. - p result -end -# [END merchantapi_v1_generated_OrderTrackingSignalsService_CreateOrderTrackingSignal_sync] diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1.json b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1.json deleted file mode 100644 index f52a48a047c9..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-order_tracking-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.ordertracking.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1_generated_OrderTrackingSignalsService_CreateOrderTrackingSignal_sync", - "title": "Snippet for the create_order_tracking_signal call in the OrderTrackingSignalsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client#create_order_tracking_signal.", - "file": "order_tracking_signals_service/create_order_tracking_signal.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_order_tracking_signal", - "full_name": "::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client#create_order_tracking_signal", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal", - "client": { - "short_name": "OrderTrackingSignalsService::Client", - "full_name": "::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client" - }, - "method": { - "short_name": "CreateOrderTrackingSignal", - "full_name": "google.shopping.merchant.ordertracking.v1.OrderTrackingSignalsService.CreateOrderTrackingSignal", - "service": { - "short_name": "OrderTrackingSignalsService", - "full_name": "google.shopping.merchant.ordertracking.v1.OrderTrackingSignalsService" - } - } - }, - "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-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_paths_test.rb deleted file mode 100644 index 2a134e2af9d5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_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/order_tracking/v1/order_tracking_signals_service" - -class ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::ClientPathsTest < Minitest::Test - class DummyStub - 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::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_rest_test.rb deleted file mode 100644 index 666c42272ae0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_rest_test.rb +++ /dev/null @@ -1,155 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb" -require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service/rest" - - -class ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_order_tracking_signal - # Create test objects. - client_result = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - order_tracking_signal_id = "hello world" - order_tracking_signal = {} - - create_order_tracking_signal_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::ServiceStub.stub :transcode_create_order_tracking_signal_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_order_tracking_signal_client_stub do - # Create client - client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_order_tracking_signal({ parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_order_tracking_signal parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_order_tracking_signal ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new(parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_order_tracking_signal({ parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_order_tracking_signal(::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new(parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_order_tracking_signal_client_stub.call_count - end - end - end - - def test_configure - 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::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client.new do |config| - 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::OrderTracking::V1::OrderTrackingSignalsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_test.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_test.rb deleted file mode 100644 index 4cb28d166ff1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/google/shopping/merchant/order_tracking/v1/order_tracking_signals_service_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/ordertracking/v1/order_tracking_signals_pb" -require "google/shopping/merchant/order_tracking/v1/order_tracking_signals_service" - -class ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_order_tracking_signal - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - order_tracking_signal_id = "hello world" - order_tracking_signal = {} - - create_order_tracking_signal_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_order_tracking_signal, name - assert_kind_of ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["order_tracking_signal_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignal), request["order_tracking_signal"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_order_tracking_signal_client_stub do - # Create client - client = ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_order_tracking_signal({ parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_order_tracking_signal parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_order_tracking_signal ::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new(parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_order_tracking_signal({ parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_order_tracking_signal(::Google::Shopping::Merchant::OrderTracking::V1::CreateOrderTrackingSignalRequest.new(parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_order_tracking_signal_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| - 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::OrderTracking::V1::OrderTrackingSignalsService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::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::OrderTracking::V1::OrderTrackingSignalsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::OrderTracking::V1::OrderTrackingSignalsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.repo-metadata.json deleted file mode 100644 index 507d94da3767..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta", - "distribution_name": "google-shopping-merchant-order_tracking-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-order_tracking-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-order_tracking 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-order_tracking-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.rubocop.yml deleted file mode 100644 index d65af95cef0c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-order_tracking-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-order_tracking-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/AUTHENTICATION.md deleted file mode 100644 index 160ef7049979..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-order_tracking-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-order_tracking-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/order_tracking/v1beta" - -client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::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/order_tracking/v1beta" - -::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::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-order_tracking-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/order_tracking/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::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-order_tracking-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/README.md deleted file mode 100644 index 1b737a114878..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking](https://rubygems.org/gems/google-shopping-merchant-order_tracking). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-order_tracking-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/order_tracking/v1beta" - -client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new -request = ::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest.new # (request fields as keyword arguments...) -response = client.create_order_tracking_signal request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-order_tracking-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/order_tracking/v1beta" -require "logger" - -client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-order_tracking`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-order_tracking-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-order_tracking`. -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-order_tracking-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-order_tracking-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/Rakefile deleted file mode 100644 index d0ef54fb406e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-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/order_tracking/v1beta/order_tracking_signals_service/credentials" - ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::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-order_tracking-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-order_tracking-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-order_tracking-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-order_tracking-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-order_tracking-v1beta" - header "google-shopping-merchant-order_tracking-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-order_tracking-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-order_tracking-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-order_tracking-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-order_tracking-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-order_tracking-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/gapic_metadata.json deleted file mode 100644 index 1cbb753f55d5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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.ordertracking.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::OrderTracking::V1beta", - "services": { - "OrderTrackingSignalsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client", - "rpcs": { - "CreateOrderTrackingSignal": { - "methods": [ - "create_order_tracking_signal" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/google-shopping-merchant-order_tracking-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/google-shopping-merchant-order_tracking-v1beta.gemspec deleted file mode 100644 index cef34410bf17..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/google-shopping-merchant-order_tracking-v1beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/order_tracking/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-order_tracking-v1beta" - gem.version = Google::Shopping::Merchant::OrderTracking::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-order_tracking-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-order_tracking instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center Accounts." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google-shopping-merchant-order_tracking-v1beta.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google-shopping-merchant-order_tracking-v1beta.rb deleted file mode 100644 index af3013d4b922..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google-shopping-merchant-order_tracking-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/order_tracking/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta.rb deleted file mode 100644 index 4eadf8f9b971..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/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/order_tracking/v1beta/order_tracking_signals_service" -require "google/shopping/merchant/order_tracking/v1beta/version" - -module Google - module Shopping - module Merchant - module OrderTracking - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/order_tracking/v1beta" - # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/order_tracking/v1beta" - # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/order_tracking/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service.rb deleted file mode 100644 index a8a4b7c1824e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_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/order_tracking/v1beta/version" - -require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/credentials" -require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/paths" -require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/client" -require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest" - -module Google - module Shopping - module Merchant - module OrderTracking - module V1beta - ## - # Service to serve order tracking signals public API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service" - # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest" - # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.new - # - module OrderTrackingSignalsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "order_tracking_signals_service", "helpers.rb" -require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/client.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/client.rb deleted file mode 100644 index abb451de4ae1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/client.rb +++ /dev/null @@ -1,484 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_pb" - -module Google - module Shopping - module Merchant - module OrderTracking - module V1beta - module OrderTrackingSignalsService - ## - # Client for the OrderTrackingSignalsService service. - # - # Service to serve order tracking signals public API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :order_tracking_signals_service_stub - - ## - # Configure the OrderTrackingSignalsService Client class. - # - # See {::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all OrderTrackingSignalsService clients - # ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "OrderTracking", "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 OrderTrackingSignalsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @order_tracking_signals_service_stub.universe_domain - end - - ## - # Create a new OrderTrackingSignalsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the OrderTrackingSignalsService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed 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/ordertracking/v1beta/order_tracking_signals_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @order_tracking_signals_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @order_tracking_signals_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 - @order_tracking_signals_service_stub.logger - end - - # Service calls - - ## - # Creates new order tracking signal. - # - # @overload create_order_tracking_signal(request, options = nil) - # Pass arguments to `create_order_tracking_signal` via a request object, either of type - # {::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_order_tracking_signal(parent: nil, order_tracking_signal: nil) - # Pass arguments to `create_order_tracking_signal` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the business for which the order signal is - # created. Format: accounts/\\{account} - # @param order_tracking_signal [::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal, ::Hash] - # Required. The order signal to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/order_tracking/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest.new - # - # # Call the create_order_tracking_signal method. - # result = client.create_order_tracking_signal request - # - # # The returned object is of type Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal. - # p result - # - def create_order_tracking_signal request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_order_tracking_signal.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::OrderTracking::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_order_tracking_signal.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_order_tracking_signal.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @order_tracking_signals_service_stub.call_rpc :create_order_tracking_signal, request, 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 OrderTrackingSignalsService API. - # - # This class represents the configuration for OrderTrackingSignalsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_order_tracking_signal to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_order_tracking_signal.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_order_tracking_signal.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the OrderTrackingSignalsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_order_tracking_signal` - # @return [::Gapic::Config::Method] - # - attr_reader :create_order_tracking_signal - - # @private - def initialize parent_rpcs = nil - create_order_tracking_signal_config = parent_rpcs.create_order_tracking_signal if parent_rpcs.respond_to? :create_order_tracking_signal - @create_order_tracking_signal = ::Gapic::Config::Method.new create_order_tracking_signal_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-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/credentials.rb deleted file mode 100644 index 3e76354edad0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_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 OrderTracking - module V1beta - module OrderTrackingSignalsService - # Credentials for the OrderTrackingSignalsService 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-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/paths.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/paths.rb deleted file mode 100644 index d56d690c84bd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/paths.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module OrderTracking - module V1beta - module OrderTrackingSignalsService - # Path helper methods for the OrderTrackingSignalsService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest.rb deleted file mode 100644 index 5a4a5a0c6bfb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_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/order_tracking/v1beta/version" - -require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/credentials" -require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/paths" -require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest/client" - -module Google - module Shopping - module Merchant - module OrderTracking - module V1beta - ## - # Service to serve order tracking signals public API. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest" - # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.new - # - module OrderTrackingSignalsService - # 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/order_tracking/v1beta/order_tracking_signals_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest/client.rb deleted file mode 100644 index 68936a66a505..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest/client.rb +++ /dev/null @@ -1,434 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_pb" -require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module OrderTracking - module V1beta - module OrderTrackingSignalsService - module Rest - ## - # REST client for the OrderTrackingSignalsService service. - # - # Service to serve order tracking signals public API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :order_tracking_signals_service_stub - - ## - # Configure the OrderTrackingSignalsService Client class. - # - # See {::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all OrderTrackingSignalsService clients - # ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "OrderTracking", "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 OrderTrackingSignalsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @order_tracking_signals_service_stub.universe_domain - end - - ## - # Create a new OrderTrackingSignalsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the OrderTrackingSignalsService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @order_tracking_signals_service_stub = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @order_tracking_signals_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 - @order_tracking_signals_service_stub.logger - end - - # Service calls - - ## - # Creates new order tracking signal. - # - # @overload create_order_tracking_signal(request, options = nil) - # Pass arguments to `create_order_tracking_signal` via a request object, either of type - # {::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_order_tracking_signal(parent: nil, order_tracking_signal: nil) - # Pass arguments to `create_order_tracking_signal` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the business for which the order signal is - # created. Format: accounts/\\{account} - # @param order_tracking_signal [::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal, ::Hash] - # Required. The order signal to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/order_tracking/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest.new - # - # # Call the create_order_tracking_signal method. - # result = client.create_order_tracking_signal request - # - # # The returned object is of type Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal. - # p result - # - def create_order_tracking_signal request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_order_tracking_signal.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::OrderTracking::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_order_tracking_signal.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_order_tracking_signal.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @order_tracking_signals_service_stub.create_order_tracking_signal request, 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 OrderTrackingSignalsService REST API. - # - # This class represents the configuration for OrderTrackingSignalsService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_order_tracking_signal to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_order_tracking_signal.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_order_tracking_signal.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the OrderTrackingSignalsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_order_tracking_signal` - # @return [::Gapic::Config::Method] - # - attr_reader :create_order_tracking_signal - - # @private - def initialize parent_rpcs = nil - create_order_tracking_signal_config = parent_rpcs.create_order_tracking_signal if parent_rpcs.respond_to? :create_order_tracking_signal - @create_order_tracking_signal = ::Gapic::Config::Method.new create_order_tracking_signal_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-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest/service_stub.rb deleted file mode 100644 index 965564b983ba..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_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/ordertracking/v1beta/order_tracking_signals_pb" - -module Google - module Shopping - module Merchant - module OrderTracking - module V1beta - module OrderTrackingSignalsService - module Rest - ## - # REST service stub for the OrderTrackingSignalsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_order_tracking_signal REST call - # - # @param request_pb [::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal] - # A result object deserialized from the server's reply - def create_order_tracking_signal request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_order_tracking_signal_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_order_tracking_signal", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_order_tracking_signal REST call - # - # @param request_pb [::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_order_tracking_signal_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/ordertracking/v1beta/{parent}/ordertrackingsignals", - body: "order_tracking_signal", - 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-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/rest.rb deleted file mode 100644 index c74387fe85ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/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/order_tracking/v1beta/order_tracking_signals_service/rest" -require "google/shopping/merchant/order_tracking/v1beta/version" - -module Google - module Shopping - module Merchant - module OrderTracking - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/order_tracking/v1beta/rest" - # client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/v1beta/version.rb deleted file mode 100644 index 9f4f1a9df097..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/order_tracking/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 OrderTracking - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_pb.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_pb.rb deleted file mode 100644 index c8410d57a531..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_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/ordertracking/v1beta/order_tracking_signals.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/shopping/type/types_pb' -require 'google/type/datetime_pb' - - -descriptor_data = "\nJgoogle/shopping/merchant/ordertracking/v1beta/order_tracking_signals.proto\x12-google.shopping.merchant.ordertracking.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/shopping/type/types.proto\x1a\x1agoogle/type/datetime.proto\"\xed\x01\n CreateOrderTrackingSignalRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12%\n\x18order_tracking_signal_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x66\n\x15order_tracking_signal\x18\x03 \x01(\x0b\x32\x42.google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignalB\x03\xe0\x41\x02\"\xe3\x0c\n\x13OrderTrackingSignal\x12%\n\x18order_tracking_signal_id\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bmerchant_id\x18\x0c \x01(\x03\x42\x03\xe0\x41\x01\x12\x36\n\x12order_created_time\x18\x01 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x02\x12\x15\n\x08order_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12k\n\rshipping_info\x18\x03 \x03(\x0b\x32O.google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal.ShippingInfoB\x03\xe0\x41\x02\x12k\n\nline_items\x18\x04 \x03(\x0b\x32R.google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal.LineItemDetailsB\x03\xe0\x41\x02\x12\x83\x01\n\x1ashipment_line_item_mapping\x18\x05 \x03(\x0b\x32Z.google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal.ShipmentLineItemMappingB\x03\xe0\x41\x01\x12\x44\n\x15\x63ustomer_shipping_fee\x18\x06 \x01(\x0b\x32\x1b.google.shopping.type.PriceB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12!\n\x14\x64\x65livery_postal_code\x18\t \x01(\tB\x03\xe0\x41\x01\x12!\n\x14\x64\x65livery_region_code\x18\n \x01(\tB\x03\xe0\x41\x01\x1a\xf4\x04\n\x0cShippingInfo\x12\x18\n\x0bshipment_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0btracking_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x63\x61rrier\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x63\x61rrier_service\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x30\n\x0cshipped_time\x18\x05 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x01\x12\x42\n\x1e\x65\x61rliest_delivery_promise_time\x18\x06 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x01\x12@\n\x1clatest_delivery_promise_time\x18\x07 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x01\x12\x38\n\x14\x61\x63tual_delivery_time\x18\x08 \x01(\x0b\x32\x15.google.type.DateTimeB\x03\xe0\x41\x01\x12{\n\x0fshipping_status\x18\t \x01(\x0e\x32].google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal.ShippingInfo.ShippingStateB\x03\xe0\x41\x02\x12\x1f\n\x12origin_postal_code\x18\n \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12origin_region_code\x18\x0b \x01(\tB\x03\xe0\x41\x02\"K\n\rShippingState\x12\x1e\n\x1aSHIPPING_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SHIPPED\x10\x01\x12\r\n\tDELIVERED\x10\x02\x1a\xd7\x01\n\x0fLineItemDetails\x12\x19\n\x0cline_item_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nproduct_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04gtin\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03mpn\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\rproduct_title\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05\x62rand\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x15\n\x08quantity\x18\x07 \x01(\x03\x42\x03\xe0\x41\x02\x42\x10\n\x0e_product_titleB\x08\n\x06_brand\x1a\x65\n\x17ShipmentLineItemMapping\x12\x18\n\x0bshipment_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cline_item_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08quantity\x18\x03 \x01(\x03\x42\x03\xe0\x41\x02\x42\x18\n\x16_customer_shipping_fee2\x9a\x03\n\x1bOrderTrackingSignalsService\x12\xb1\x02\n\x19\x43reateOrderTrackingSignal\x12O.google.shopping.merchant.ordertracking.v1beta.CreateOrderTrackingSignalRequest\x1a\x42.google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal\"\x7f\xda\x41\x1fparent,order_tracking_signal_id\x82\xd3\xe4\x93\x02W\">/ordertracking/v1beta/{parent=accounts/*}/ordertrackingsignals:\x15order_tracking_signal\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xfe\x02\n1com.google.shopping.merchant.ordertracking.v1betaB\x19OrderTrackingSignalsProtoP\x01Z]cloud.google.com/go/shopping/merchant/ordertracking/apiv1beta/ordertrackingpb;ordertrackingpb\xaa\x02-Google.Shopping.Merchant.OrderTracking.V1Beta\xca\x02-Google\\Shopping\\Merchant\\OrderTracking\\V1beta\xea\x02\x31Google::Shopping::Merchant::OrderTracking::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 OrderTracking - module V1beta - CreateOrderTrackingSignalRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1beta.CreateOrderTrackingSignalRequest").msgclass - OrderTrackingSignal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal").msgclass - OrderTrackingSignal::ShippingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal.ShippingInfo").msgclass - OrderTrackingSignal::ShippingInfo::ShippingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal.ShippingInfo.ShippingState").enummodule - OrderTrackingSignal::LineItemDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal.LineItemDetails").msgclass - OrderTrackingSignal::ShipmentLineItemMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal.ShipmentLineItemMapping").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_services_pb.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_services_pb.rb deleted file mode 100644 index ef80c68342f1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/lib/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_services_pb.rb +++ /dev/null @@ -1,47 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/ordertracking/v1beta/order_tracking_signals.proto for package 'Google.Shopping.Merchant.OrderTracking.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/ordertracking/v1beta/order_tracking_signals_pb' - -module Google - module Shopping - module Merchant - module OrderTracking - module V1beta - module OrderTrackingSignalsService - # Service to serve order tracking signals public API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignalsService' - - # Creates new order tracking signal. - rpc :CreateOrderTrackingSignal, ::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest, ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/README.md deleted file mode 100644 index 03467a3756be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta/proto_docs/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals.rb deleted file mode 100644 index 6451583035ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/shopping/merchant/ordertracking/v1beta/order_tracking_signals.rb +++ /dev/null @@ -1,211 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module OrderTracking - module V1beta - # Signals only can be created but not updated. - # Businesses need to call this API only when the order is completely shipped. - # Creates new order signal. - # @!attribute [rw] parent - # @return [::String] - # Required. The account of the business for which the order signal is - # created. Format: accounts/\\{account} - # @!attribute [r] order_tracking_signal_id - # @return [::String] - # Output only. The ID that uniquely identifies this order tracking signal. - # @!attribute [rw] order_tracking_signal - # @return [::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal] - # Required. The order signal to be created. - class CreateOrderTrackingSignalRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a business trade from which signals are extracted, such as - # shipping. - # @!attribute [r] order_tracking_signal_id - # @return [::Integer] - # Output only. The ID that uniquely identifies this order tracking signal. - # @!attribute [rw] merchant_id - # @return [::Integer] - # Optional. The Google Merchant Center ID of this order tracking signal. This - # value is optional. If left unset, the caller's Merchant Center ID is used. - # You must request access in order to provide data on behalf of another - # business. For more information, see [Submitting Order Tracking - # Signals](/shopping-content/guides/order-tracking-signals). - # @!attribute [rw] order_created_time - # @return [::Google::Type::DateTime] - # Required. The time when the order was created on the businesses side. - # Include the year and timezone string, if available. - # @!attribute [rw] order_id - # @return [::String] - # Required. The ID of the order on the businesses side. This field will be - # hashed in returned OrderTrackingSignal creation response. - # @!attribute [rw] shipping_info - # @return [::Array<::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal::ShippingInfo>] - # Required. The shipping information for the order. - # @!attribute [rw] line_items - # @return [::Array<::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal::LineItemDetails>] - # Required. Information about line items in the order. - # @!attribute [rw] shipment_line_item_mapping - # @return [::Array<::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal::ShipmentLineItemMapping>] - # Optional. The mapping of the line items to the shipment information. - # @!attribute [rw] customer_shipping_fee - # @return [::Google::Shopping::Type::Price] - # Optional. The shipping fee of the order; - # this value should be set to zero in the case of free shipping. - # @!attribute [rw] delivery_postal_code - # @return [::String] - # Optional. The delivery postal code, as a continuous string without spaces - # or dashes, for example "95016". This field will be anonymized in returned - # OrderTrackingSignal creation response. - # @!attribute [rw] delivery_region_code - # @return [::String] - # Optional. The [CLDR territory code] - # (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for - # the shipping destination. - class OrderTrackingSignal - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The shipping information for the order. - # @!attribute [rw] shipment_id - # @return [::String] - # Required. The shipment ID. This field will be hashed in returned - # OrderTrackingSignal creation response. - # @!attribute [rw] tracking_id - # @return [::String] - # Optional. The tracking ID of the shipment. This field is required if one - # of the following fields is absent: earliest_delivery_promise_time, - # latest_delivery_promise_time, and actual_delivery_time. - # @!attribute [rw] carrier - # @return [::String] - # Optional. The name of the shipping carrier for the delivery. This field - # is required if one of the following fields is absent: - # earliest_delivery_promise_time, latest_delivery_promise_time, - # and actual_delivery_time. - # @!attribute [rw] carrier_service - # @return [::String] - # Optional. The service type for fulfillment, such as GROUND, FIRST_CLASS, - # etc. - # @!attribute [rw] shipped_time - # @return [::Google::Type::DateTime] - # Optional. The time when the shipment was shipped. - # Include the year and timezone string, if available. - # @!attribute [rw] earliest_delivery_promise_time - # @return [::Google::Type::DateTime] - # Optional. The earliest delivery promised time. - # Include the year and timezone string, if available. - # This field is required, if one of the following fields is absent: - # tracking_id or carrier_name. - # @!attribute [rw] latest_delivery_promise_time - # @return [::Google::Type::DateTime] - # Optional. The latest delivery promised time. - # Include the year and timezone string, if available. - # This field is required, if one of the following fields is absent: - # tracking_id or carrier_name. - # @!attribute [rw] actual_delivery_time - # @return [::Google::Type::DateTime] - # Optional. The time when the shipment was actually delivered. - # Include the year and timezone string, if available. - # This field is required, if one of the following fields is absent: - # tracking_id or carrier_name. - # @!attribute [rw] shipping_status - # @return [::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal::ShippingInfo::ShippingState] - # Required. The status of the shipment. - # @!attribute [rw] origin_postal_code - # @return [::String] - # Required. The origin postal code, as a continuous string without spaces - # or dashes, for example "95016". This field will be anonymized in returned - # OrderTrackingSignal creation response. - # @!attribute [rw] origin_region_code - # @return [::String] - # Required. The [CLDR territory code] - # (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for - # the shipping origin. - class ShippingInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The current status of the shipments. - module ShippingState - # The shipping status is not known to business. - SHIPPING_STATE_UNSPECIFIED = 0 - - # All items are shipped. - SHIPPED = 1 - - # The shipment is already delivered. - DELIVERED = 2 - end - end - - # The line items of the order. - # @!attribute [rw] line_item_id - # @return [::String] - # Required. The ID for this line item. - # @!attribute [rw] product_id - # @return [::String] - # Required. The Content API REST ID of the product, in the - # form channel:contentLanguage:targetCountry:offerId. - # @!attribute [rw] gtin - # @return [::String] - # Optional. The Global Trade Item Number. - # @!attribute [rw] mpn - # @return [::String] - # Optional. The manufacturer part number. - # @!attribute [rw] product_title - # @return [::String] - # Optional. Plain text title of this product. - # @!attribute [rw] brand - # @return [::String] - # Optional. Brand of the product. - # @!attribute [rw] quantity - # @return [::Integer] - # Required. The quantity of the line item in the order. - class LineItemDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents how many items are in the shipment for the given shipment_id - # and line_item_id. - # @!attribute [rw] shipment_id - # @return [::String] - # Required. The shipment ID. This field will be hashed in returned - # OrderTrackingSignal creation response. - # @!attribute [rw] line_item_id - # @return [::String] - # Required. The line item ID. - # @!attribute [rw] quantity - # @return [::Integer] - # Required. The line item quantity in the shipment. - class ShipmentLineItemMapping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/shopping/type/types.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/shopping/type/types.rb deleted file mode 100644 index 1a166e0ac98c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/type/datetime.rb deleted file mode 100644 index 10625864f3dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/proto_docs/google/type/datetime.rb +++ /dev/null @@ -1,104 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents civil time (or occasionally physical time). - # - # This type can represent a civil time in one of a few possible ways: - # - # * When utc_offset is set and time_zone is unset: a civil time on a calendar - # day with a particular offset from UTC. - # * When time_zone is set and utc_offset is unset: a civil time on a calendar - # day in a particular time zone. - # * When neither time_zone nor utc_offset is set: a civil time on a calendar - # day in local time. - # - # The date is relative to the Proleptic Gregorian Calendar. - # - # If year, month, or day are 0, the DateTime is considered not to have a - # specific year, month, or day respectively. - # - # This type may also be used to represent a physical time if all the date and - # time fields are set and either case of the `time_offset` oneof is set. - # Consider using `Timestamp` message for physical time instead. If your use - # case also would like to store the user's timezone, that can be done in - # another field. - # - # This type is more flexible than some applications may want. Make sure to - # document and validate your application's limitations. - # @!attribute [rw] year - # @return [::Integer] - # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a - # datetime without a year. - # @!attribute [rw] month - # @return [::Integer] - # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a - # datetime without a month. - # @!attribute [rw] day - # @return [::Integer] - # Optional. Day of month. Must be from 1 to 31 and valid for the year and - # month, or 0 if specifying a datetime without a day. - # @!attribute [rw] hours - # @return [::Integer] - # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults - # to 0 (midnight). An API may choose to allow the value "24:00:00" for - # scenarios like business closing time. - # @!attribute [rw] minutes - # @return [::Integer] - # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0. - # @!attribute [rw] seconds - # @return [::Integer] - # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, - # defaults to 0. An API may allow the value 60 if it allows leap-seconds. - # @!attribute [rw] nanos - # @return [::Integer] - # Optional. Fractions of seconds in nanoseconds. Must be from 0 to - # 999,999,999, defaults to 0. - # @!attribute [rw] utc_offset - # @return [::Google::Protobuf::Duration] - # UTC offset. Must be whole seconds, between -18 hours and +18 hours. - # For example, a UTC offset of -4:00 would be represented as - # { seconds: -14400 }. - # - # Note: The following fields are mutually exclusive: `utc_offset`, `time_zone`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] time_zone - # @return [::Google::Type::TimeZone] - # Time zone. - # - # Note: The following fields are mutually exclusive: `time_zone`, `utc_offset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DateTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a time zone from the - # [IANA Time Zone Database](https://www.iana.org/time-zones). - # @!attribute [rw] id - # @return [::String] - # IANA Time Zone Database time zone. For example "America/New_York". - # @!attribute [rw] version - # @return [::String] - # Optional. IANA Time Zone Database version number. For example "2019a". - class TimeZone - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/snippets/Gemfile deleted file mode 100644 index 27f6b1938d3d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-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-order_tracking-v1beta", path: "../" -else - gem "google-shopping-merchant-order_tracking-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-order_tracking-v1beta/snippets/order_tracking_signals_service/create_order_tracking_signal.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/snippets/order_tracking_signals_service/create_order_tracking_signal.rb deleted file mode 100644 index cc1b830cc452..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/snippets/order_tracking_signals_service/create_order_tracking_signal.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_OrderTrackingSignalsService_CreateOrderTrackingSignal_sync] -require "google/shopping/merchant/order_tracking/v1beta" - -## -# Snippet for the create_order_tracking_signal call in the OrderTrackingSignalsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client#create_order_tracking_signal. -# -def create_order_tracking_signal - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest.new - - # Call the create_order_tracking_signal method. - result = client.create_order_tracking_signal request - - # The returned object is of type Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal. - p result -end -# [END merchantapi_v1beta_generated_OrderTrackingSignalsService_CreateOrderTrackingSignal_sync] diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1beta.json b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1beta.json deleted file mode 100644 index ad8adf5a1e92..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/snippets/snippet_metadata_google.shopping.merchant.ordertracking.v1beta.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-order_tracking-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.ordertracking.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_OrderTrackingSignalsService_CreateOrderTrackingSignal_sync", - "title": "Snippet for the create_order_tracking_signal call in the OrderTrackingSignalsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client#create_order_tracking_signal.", - "file": "order_tracking_signals_service/create_order_tracking_signal.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_order_tracking_signal", - "full_name": "::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client#create_order_tracking_signal", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal", - "client": { - "short_name": "OrderTrackingSignalsService::Client", - "full_name": "::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client" - }, - "method": { - "short_name": "CreateOrderTrackingSignal", - "full_name": "google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignalsService.CreateOrderTrackingSignal", - "service": { - "short_name": "OrderTrackingSignalsService", - "full_name": "google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignalsService" - } - } - }, - "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-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_paths_test.rb deleted file mode 100644 index 079b6856a4e2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_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/order_tracking/v1beta/order_tracking_signals_service" - -class ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::ClientPathsTest < Minitest::Test - class DummyStub - 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::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_rest_test.rb deleted file mode 100644 index 0605b7c388b7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_rest_test.rb +++ /dev/null @@ -1,155 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_pb" -require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service/rest" - - -class ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_order_tracking_signal - # Create test objects. - client_result = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - order_tracking_signal_id = "hello world" - order_tracking_signal = {} - - create_order_tracking_signal_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::ServiceStub.stub :transcode_create_order_tracking_signal_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_order_tracking_signal_client_stub do - # Create client - client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_order_tracking_signal({ parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_order_tracking_signal parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_order_tracking_signal ::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest.new(parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_order_tracking_signal({ parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_order_tracking_signal(::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest.new(parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_order_tracking_signal_client_stub.call_count - end - end - end - - def test_configure - 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::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client.new do |config| - 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::OrderTracking::V1beta::OrderTrackingSignalsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_test.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_test.rb deleted file mode 100644 index 6ed6971276aa..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/ordertracking/v1beta/order_tracking_signals_pb" -require "google/shopping/merchant/order_tracking/v1beta/order_tracking_signals_service" - -class ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_order_tracking_signal - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - order_tracking_signal_id = "hello world" - order_tracking_signal = {} - - create_order_tracking_signal_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_order_tracking_signal, name - assert_kind_of ::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["order_tracking_signal_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignal), request["order_tracking_signal"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_order_tracking_signal_client_stub do - # Create client - client = ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_order_tracking_signal({ parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_order_tracking_signal parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_order_tracking_signal ::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest.new(parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_order_tracking_signal({ parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_order_tracking_signal(::Google::Shopping::Merchant::OrderTracking::V1beta::CreateOrderTrackingSignalRequest.new(parent: parent, order_tracking_signal_id: order_tracking_signal_id, order_tracking_signal: order_tracking_signal), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_order_tracking_signal_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new do |config| - 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::OrderTracking::V1beta::OrderTrackingSignalsService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::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::OrderTracking::V1beta::OrderTrackingSignalsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::OrderTracking::V1beta::OrderTrackingSignalsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-order_tracking-v1beta/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-products-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-products-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-products-v1/.repo-metadata.json deleted file mode 100644 index 6ce690bfd0d1..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 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-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 0129c84f4416..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.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-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 55b28a33832f..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.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-shopping-type", "~> 1.0" -end diff --git a/owl-bot-staging/google-shopping-merchant-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 965d17fed384..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/product_inputs_service/client.rb +++ /dev/null @@ -1,767 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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 base64url encoding of this - # string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/productInputs/ZW5-VVMtc2t1LzEyMw`. - # - # 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. - # - # Note: For calls to the v1beta version, the plain format is - # `channel~content_language~feed_label~offer_id`, for example: - # `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/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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `: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 2b42e6677cef..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,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/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 base64url encoding of this - # string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/productInputs/ZW5-VVMtc2t1LzEyMw`. - # - # 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. - # - # Note: For calls to the v1beta version, the plain format is - # `channel~content_language~feed_label~offer_id`, for example: - # `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/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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `: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 ff300cc0c322..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\"\xff\x03\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\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\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(\tH.\x88\x01\x01\x12?\n\x05pause\x18\r \x01(\x0e\x32+.google.shopping.merchant.products.v1.PauseH/\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(\tH0\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.StructuredTitleH1\x88\x01\x01\x12\x61\n\x16structured_description\x18\x85\x01 \x01(\x0b\x32;.google.shopping.merchant.products.v1.StructuredDescriptionH2\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\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\"\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=B\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\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\"-\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\"\xf4\x01\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\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\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\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\"\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*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::CarrierPriceOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.ProductAttributes.CarrierPriceOption").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 - HandlingCutoffTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.products.v1.HandlingCutoffTime").msgclass - 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 036e93153dec..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\"\xef\x04\n\x07Product\x12\x0c\n\x04name\x18\x01 \x01(\t\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: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 9551046f72dd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/client.rb +++ /dev/null @@ -1,634 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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 base64url encoding of this - # string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. - # - # 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `: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 f1ab967e3c63..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/lib/google/shopping/merchant/products/v1/products_service/rest/client.rb +++ /dev/null @@ -1,577 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/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 base64url encoding of this - # string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. - # - # 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `: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 74352be9c58c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-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 6ed455cdecb2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/productinputs.rb +++ /dev/null @@ -1,282 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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 base64url encoding of this - # string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/productinputs/ZW5-VVMtc2t1LzEyMw`. - # - # 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. - # - # Note: For calls to the v1beta version, the plain format is - # `channel~content_language~feed_label~offer_id`, for example: - # `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] 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 base64url encoding of this - # string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/productInputs/ZW5-VVMtc2t1LzEyMw`. - # - # 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. - # - # Note: For calls to the v1beta version, the plain format is - # `channel~content_language~feed_label~offer_id`, for example: - # `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-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 00dcdb176c4b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products.rb +++ /dev/null @@ -1,201 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module 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] 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. - 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 base64url encoding of this - # string, which is `ZW5-VVMtc2t1LzEyMw`. The full resource name - # for the product would be - # `accounts/123/products/ZW5-VVMtc2t1LzEyMw`. - # - # 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 a44ee38a4f6a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/proto_docs/google/shopping/merchant/products/v1/products_common.rb +++ /dev/null @@ -1,1818 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific 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/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::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 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 [::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] 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. - 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 - - # 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 - 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. - 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. - 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 - - # 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 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 b7e601305e22..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 - client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_product_input({ name: name, data_source: data_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_product_input name: name, data_source: data_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.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 - client.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 - client.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 ee5126d47156..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 - client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Products::V1::ProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 1a4e8b7458c9..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 - client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_product({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_product name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_product ::Google::Shopping::Merchant::Products::V1::GetProductRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_product({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_product(::Google::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 - client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_products({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_products parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_products ::Google::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 - client.list_products({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_products(::Google::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 ca9d9faa3480..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 - client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_product({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_product name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_product ::Google::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 - client.get_product({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_product(::Google::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 - client = ::Google::Shopping::Merchant::Products::V1::ProductsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_products({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_products parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_products ::Google::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 - client.list_products({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_products(::Google::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 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-products-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-products-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-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 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-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 ff96700b6840..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.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-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 8ba51afa03c5..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.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-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 5ec73ccfd404..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/product_inputs_service/client.rb +++ /dev/null @@ -1,731 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `: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 1e3bced7229e..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,667 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `: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 b87c945df8cd..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/client.rb +++ /dev/null @@ -1,604 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `: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 aecb5c474090..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/lib/google/shopping/merchant/products/v1beta/products_service/rest/client.rb +++ /dev/null @@ -1,547 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `: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 74352be9c58c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-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 dd1c5ebd4094..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 - client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_product_input({ name: name, data_source: data_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_product_input name: name, data_source: data_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.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 - client.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 - client.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 3a73015c2e08..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 - client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Products::V1beta::ProductInputsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 99574eb03818..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 - client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_product({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_product name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_product ::Google::Shopping::Merchant::Products::V1beta::GetProductRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_product({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_product(::Google::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 - client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_products({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_products parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_products ::Google::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 - client.list_products({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_products(::Google::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 9996bd347914..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 - client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_product({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_product name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_product ::Google::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 - client.get_product({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_product(::Google::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 - client = ::Google::Shopping::Merchant::Products::V1beta::ProductsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_products({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_products parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_products ::Google::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 - client.list_products({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_products(::Google::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 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-products-v1beta/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-promotions-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-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 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-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 96acad648b8f..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.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-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 fd476735c87b..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.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-shopping-type", "~> 1.0" -end diff --git a/owl-bot-staging/google-shopping-merchant-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 4048153d3da7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/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/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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `: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 db553686bd9c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/lib/google/shopping/merchant/promotions/v1/promotions_service/rest/client.rb +++ /dev/null @@ -1,637 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `: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 74352be9c58c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-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 f2ee41fe9f13..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 - client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.insert_promotion({ parent: parent, promotion: promotion, data_source: data_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.insert_promotion parent: parent, promotion: promotion, data_source: data_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_promotion({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_promotion name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.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 - client.get_promotion({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.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 - client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 dca321000841..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 - client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_promotion({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_promotion name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Promotions::V1::PromotionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-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 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-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 d3f0d3bd56c6..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.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-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 4abbccc3f6bd..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.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-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 ab7eeb85307c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/client.rb +++ /dev/null @@ -1,690 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `: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 e2fc1f10280c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/lib/google/shopping/merchant/promotions/v1beta/promotions_service/rest/client.rb +++ /dev/null @@ -1,626 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `: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 74352be9c58c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-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 7158bd46d66d..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 - client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.insert_promotion({ parent: parent, promotion: promotion, data_source: data_source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.insert_promotion parent: parent, promotion: promotion, data_source: data_source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_promotion({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_promotion name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.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 - client.get_promotion({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.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 - client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 ce5f135865d2..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 - client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_promotion({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_promotion name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Promotions::V1beta::PromotionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-promotions-v1beta/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-quota-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-quota-v1/.repo-metadata.json deleted file mode 100644 index eb3e2f5d1eed..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1", - "distribution_name": "google-shopping-merchant-quota-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-quota-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-quota 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-quota-v1/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-quota-v1/.rubocop.yml deleted file mode 100644 index 099a22ee1141..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-quota-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-quota-v1.rb" diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/.toys.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1/.yardopts b/owl-bot-staging/google-shopping-merchant-quota-v1/.yardopts deleted file mode 100644 index dc7bbc10ae29..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-quota-v1/AUTHENTICATION.md deleted file mode 100644 index 72dde3e46df5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-quota-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-quota-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/quota/v1" - -client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::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/quota/v1" - -::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::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-quota-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/quota/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::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-quota-v1/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-quota-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/Gemfile b/owl-bot-staging/google-shopping-merchant-quota-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/LICENSE.md b/owl-bot-staging/google-shopping-merchant-quota-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1/README.md b/owl-bot-staging/google-shopping-merchant-quota-v1/README.md deleted file mode 100644 index 0fcc81569d8c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota](https://rubygems.org/gems/google-shopping-merchant-quota). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-quota-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/quota/v1" - -client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new -request = ::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest.new # (request fields as keyword arguments...) -response = client.get_account_limit request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-quota-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/quota/v1" -require "logger" - -client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-quota`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-quota-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-quota`. -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-quota-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-quota-v1/Rakefile b/owl-bot-staging/google-shopping-merchant-quota-v1/Rakefile deleted file mode 100644 index 48122be51cfb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-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/quota/v1/account_limits_service/credentials" - ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::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-quota-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-quota-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-quota-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-quota-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-quota-v1" - header "google-shopping-merchant-quota-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-quota-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-quota-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-quota-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-quota-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-quota-v1/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-quota-v1/gapic_metadata.json deleted file mode 100644 index 067b267fc570..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/gapic_metadata.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.shopping.merchant.quota.v1", - "libraryPackage": "::Google::Shopping::Merchant::Quota::V1", - "services": { - "AccountLimitsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client", - "rpcs": { - "GetAccountLimit": { - "methods": [ - "get_account_limit" - ] - }, - "ListAccountLimits": { - "methods": [ - "list_account_limits" - ] - } - } - } - } - }, - "QuotaService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Quota::V1::QuotaService::Client", - "rpcs": { - "ListQuotaGroups": { - "methods": [ - "list_quota_groups" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/google-shopping-merchant-quota-v1.gemspec b/owl-bot-staging/google-shopping-merchant-quota-v1/google-shopping-merchant-quota-v1.gemspec deleted file mode 100644 index 5e50c4368228..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/google-shopping-merchant-quota-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/quota/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-quota-v1" - gem.version = Google::Shopping::Merchant::Quota::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-quota-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-quota instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center Accounts." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google-shopping-merchant-quota-v1.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google-shopping-merchant-quota-v1.rb deleted file mode 100644 index 75da199b0021..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google-shopping-merchant-quota-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/quota/v1" diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1.rb deleted file mode 100644 index 6be69bc2f0df..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/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/quota/v1/account_limits_service" -require "google/shopping/merchant/quota/v1/quota_service" -require "google/shopping/merchant/quota/v1/version" - -module Google - module Shopping - module Merchant - module Quota - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/quota/v1" - # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/quota/v1" - # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/shopping/merchant/quota/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service.rb deleted file mode 100644 index e866679f7fed..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_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/quota/v1/version" - -require "google/shopping/merchant/quota/v1/account_limits_service/credentials" -require "google/shopping/merchant/quota/v1/account_limits_service/paths" -require "google/shopping/merchant/quota/v1/account_limits_service/client" -require "google/shopping/merchant/quota/v1/account_limits_service/rest" - -module Google - module Shopping - module Merchant - module Quota - module V1 - ## - # Service to retrieve account limits. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/quota/v1/account_limits_service" - # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/quota/v1/account_limits_service/rest" - # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new - # - module AccountLimitsService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "account_limits_service", "helpers.rb" -require "google/shopping/merchant/quota/v1/account_limits_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/client.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/client.rb deleted file mode 100644 index a6ddc32d6bcb..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/client.rb +++ /dev/null @@ -1,595 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/quota/v1/accountlimits_pb" - -module Google - module Shopping - module Merchant - module Quota - module V1 - module AccountLimitsService - ## - # Client for the AccountLimitsService service. - # - # Service to retrieve account limits. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_limits_service_stub - - ## - # Configure the AccountLimitsService Client class. - # - # See {::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountLimitsService clients - # ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Quota", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountLimitsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @account_limits_service_stub.universe_domain - end - - ## - # Create a new AccountLimitsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountLimitsService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed 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/quota/v1/accountlimits_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @account_limits_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @account_limits_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @account_limits_service_stub.logger - end - - # Service calls - - ## - # Retrieves an account limit. - # - # @overload get_account_limit(request, options = nil) - # Pass arguments to `get_account_limit` via a request object, either of type - # {::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_account_limit(name: nil) - # Pass arguments to `get_account_limit` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the limit to retrieve. - # Format: `accounts/{account}/limits/{limit}` - # For example: `accounts/123/limits/products~ADS_NON_EEA` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Shopping::Merchant::Quota::V1::AccountLimit] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Shopping::Merchant::Quota::V1::AccountLimit] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/quota/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest.new - # - # # Call the get_account_limit method. - # result = client.get_account_limit request - # - # # The returned object is of type Google::Shopping::Merchant::Quota::V1::AccountLimit. - # p result - # - def get_account_limit request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_account_limit.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Quota::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_account_limit.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_account_limit.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_limits_service_stub.call_rpc :get_account_limit, request, 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 limits of an account. - # - # @overload list_account_limits(request, options = nil) - # Pass arguments to `list_account_limits` via a request object, either of type - # {::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_account_limits(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_account_limits` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent account. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of limits to return. The service may return - # fewer than this value. If unspecified, at most 100 limits will be returned. - # The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccountLimits` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountLimits` must - # match the call that provided the page token. - # @param filter [::String] - # Required. A filter on the limit `type` is required, for example, `type = - # "products"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1::AccountLimit>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1::AccountLimit>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/quota/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest.new - # - # # Call the list_account_limits method. - # result = client.list_account_limits request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Quota::V1::AccountLimit. - # p item - # end - # - def list_account_limits request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_account_limits.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Quota::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_account_limits.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_account_limits.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_limits_service_stub.call_rpc :list_account_limits, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @account_limits_service_stub, :list_account_limits, request, response, 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 AccountLimitsService API. - # - # This class represents the configuration for AccountLimitsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_account_limit to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_limit.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_limit.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate 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::Quota::V1::AccountLimitsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AccountLimitsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_account_limit` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account_limit - ## - # RPC-specific configuration for `list_account_limits` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_limits - - # @private - def initialize parent_rpcs = nil - get_account_limit_config = parent_rpcs.get_account_limit if parent_rpcs.respond_to? :get_account_limit - @get_account_limit = ::Gapic::Config::Method.new get_account_limit_config - list_account_limits_config = parent_rpcs.list_account_limits if parent_rpcs.respond_to? :list_account_limits - @list_account_limits = ::Gapic::Config::Method.new list_account_limits_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-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/credentials.rb deleted file mode 100644 index 07b1cbbcde91..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_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 Quota - module V1 - module AccountLimitsService - # Credentials for the AccountLimitsService 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-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/paths.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/paths.rb deleted file mode 100644 index e16ca995c021..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_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 Quota - module V1 - module AccountLimitsService - # Path helper methods for the AccountLimitsService 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 AccountLimit resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/limits/{limit}` - # - # @param account [String] - # @param limit [String] - # - # @return [::String] - def account_limit_path account:, limit: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/limits/#{limit}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/rest.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/rest.rb deleted file mode 100644 index 41f14fcfb0f1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_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/quota/v1/version" - -require "google/shopping/merchant/quota/v1/account_limits_service/credentials" -require "google/shopping/merchant/quota/v1/account_limits_service/paths" -require "google/shopping/merchant/quota/v1/account_limits_service/rest/client" - -module Google - module Shopping - module Merchant - module Quota - module V1 - ## - # Service to retrieve account limits. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/quota/v1/account_limits_service/rest" - # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new - # - module AccountLimitsService - # 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/quota/v1/account_limits_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/rest/client.rb deleted file mode 100644 index 2a65a2d4170d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/rest/client.rb +++ /dev/null @@ -1,538 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/quota/v1/accountlimits_pb" -require "google/shopping/merchant/quota/v1/account_limits_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Quota - module V1 - module AccountLimitsService - module Rest - ## - # REST client for the AccountLimitsService service. - # - # Service to retrieve account limits. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :account_limits_service_stub - - ## - # Configure the AccountLimitsService Client class. - # - # See {::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AccountLimitsService clients - # ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Quota", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AccountLimitsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @account_limits_service_stub.universe_domain - end - - ## - # Create a new AccountLimitsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AccountLimitsService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @account_limits_service_stub = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @account_limits_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @account_limits_service_stub.logger - end - - # Service calls - - ## - # Retrieves an account limit. - # - # @overload get_account_limit(request, options = nil) - # Pass arguments to `get_account_limit` via a request object, either of type - # {::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_account_limit(name: nil) - # Pass arguments to `get_account_limit` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the limit to retrieve. - # Format: `accounts/{account}/limits/{limit}` - # For example: `accounts/123/limits/products~ADS_NON_EEA` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Quota::V1::AccountLimit] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Quota::V1::AccountLimit] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/quota/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest.new - # - # # Call the get_account_limit method. - # result = client.get_account_limit request - # - # # The returned object is of type Google::Shopping::Merchant::Quota::V1::AccountLimit. - # p result - # - def get_account_limit request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_account_limit.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Quota::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_account_limit.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_account_limit.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_limits_service_stub.get_account_limit request, 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 limits of an account. - # - # @overload list_account_limits(request, options = nil) - # Pass arguments to `list_account_limits` via a request object, either of type - # {::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_account_limits(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_account_limits` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent account. - # Format: `accounts/{account}` - # @param page_size [::Integer] - # Optional. The maximum number of limits to return. The service may return - # fewer than this value. If unspecified, at most 100 limits will be returned. - # The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccountLimits` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountLimits` must - # match the call that provided the page token. - # @param filter [::String] - # Required. A filter on the limit `type` is required, for example, `type = - # "products"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1::AccountLimit>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1::AccountLimit>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/quota/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest.new - # - # # Call the list_account_limits method. - # result = client.list_account_limits request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Quota::V1::AccountLimit. - # p item - # end - # - def list_account_limits request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_account_limits.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Quota::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_account_limits.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_account_limits.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @account_limits_service_stub.list_account_limits request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @account_limits_service_stub, :list_account_limits, "account_limits", request, result, 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 AccountLimitsService REST API. - # - # This class represents the configuration for AccountLimitsService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_account_limit to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_limit.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_account_limit.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the AccountLimitsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_account_limit` - # @return [::Gapic::Config::Method] - # - attr_reader :get_account_limit - ## - # RPC-specific configuration for `list_account_limits` - # @return [::Gapic::Config::Method] - # - attr_reader :list_account_limits - - # @private - def initialize parent_rpcs = nil - get_account_limit_config = parent_rpcs.get_account_limit if parent_rpcs.respond_to? :get_account_limit - @get_account_limit = ::Gapic::Config::Method.new get_account_limit_config - list_account_limits_config = parent_rpcs.list_account_limits if parent_rpcs.respond_to? :list_account_limits - @list_account_limits = ::Gapic::Config::Method.new list_account_limits_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-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_service/rest/service_stub.rb deleted file mode 100644 index bc68b3393379..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/account_limits_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/quota/v1/accountlimits_pb" - -module Google - module Shopping - module Merchant - module Quota - module V1 - module AccountLimitsService - module Rest - ## - # REST service stub for the AccountLimitsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_account_limit REST call - # - # @param request_pb [::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Quota::V1::AccountLimit] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Quota::V1::AccountLimit] - # A result object deserialized from the server's reply - def get_account_limit request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_account_limit_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_account_limit", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Quota::V1::AccountLimit.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_account_limits REST call - # - # @param request_pb [::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsResponse] - # A result object deserialized from the server's reply - def list_account_limits request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_account_limits_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_account_limits", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_account_limit REST call - # - # @param request_pb [::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_account_limit_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/limits/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_account_limits REST call - # - # @param request_pb [::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_account_limits_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/accounts/v1/{parent}/limits", - 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-quota-v1/lib/google/shopping/merchant/quota/v1/accountlimits_pb.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/accountlimits_pb.rb deleted file mode 100644 index c4ff308f1048..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/accountlimits_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/quota/v1/accountlimits.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 = "\n5google/shopping/merchant/quota/v1/accountlimits.proto\x12!google.shopping.merchant.quota.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xab\x01\n\x0cProductLimit\x12I\n\x05scope\x18\x01 \x01(\x0e\x32\x35.google.shopping.merchant.quota.v1.ProductLimit.ScopeB\x03\xe0\x41\x02\x12\x12\n\x05limit\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\"<\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x41\x44S_NON_EEA\x10\x01\x12\x0b\n\x07\x41\x44S_EEA\x10\x02\"\xdc\x01\n\x0c\x41\x63\x63ountLimit\x12\x43\n\x08products\x18\x64 \x01(\x0b\x32/.google.shopping.merchant.quota.v1.ProductLimitH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:l\xea\x41i\n\'merchantapi.googleapis.com/AccountLimit\x12!accounts/{account}/limits/{limit}*\raccountLimits2\x0c\x61\x63\x63ountLimitB\x06\n\x04type\"W\n\x16GetAccountLimitRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'merchantapi.googleapis.com/AccountLimit\"\x9c\x01\n\x18ListAccountLimitsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"merchantapi.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x02\"}\n\x19ListAccountLimitsResponse\x12G\n\x0e\x61\x63\x63ount_limits\x18\x01 \x03(\x0b\x32/.google.shopping.merchant.quota.v1.AccountLimit\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xe2\x03\n\x14\x41\x63\x63ountLimitsService\x12\xb5\x01\n\x0fGetAccountLimit\x12\x39.google.shopping.merchant.quota.v1.GetAccountLimitRequest\x1a/.google.shopping.merchant.quota.v1.AccountLimit\"6\xda\x41\x04name\x82\xd3\xe4\x93\x02)\x12\'/accounts/v1/{name=accounts/*/limits/*}\x12\xc8\x01\n\x11ListAccountLimits\x12;.google.shopping.merchant.quota.v1.ListAccountLimitsRequest\x1a<.google.shopping.merchant.quota.v1.ListAccountLimitsResponse\"8\xda\x41\x06parent\x82\xd3\xe4\x93\x02)\x12\'/accounts/v1/{parent=accounts/*}/limits\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xf0\x01\n%com.google.shopping.merchant.quota.v1B\x12\x41\x63\x63ountLimitsProtoP\x01ZAcloud.google.com/go/shopping/merchant/quota/apiv1/quotapb;quotapb\xaa\x02!Google.Shopping.Merchant.Quota.V1\xca\x02!Google\\Shopping\\Merchant\\Quota\\V1\xea\x02%Google::Shopping::Merchant::Quota::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Shopping - module Merchant - module Quota - module V1 - ProductLimit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.ProductLimit").msgclass - ProductLimit::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.ProductLimit.Scope").enummodule - AccountLimit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.AccountLimit").msgclass - GetAccountLimitRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.GetAccountLimitRequest").msgclass - ListAccountLimitsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.ListAccountLimitsRequest").msgclass - ListAccountLimitsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.ListAccountLimitsResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/accountlimits_services_pb.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/accountlimits_services_pb.rb deleted file mode 100644 index 8f08b198af83..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/accountlimits_services_pb.rb +++ /dev/null @@ -1,49 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/quota/v1/accountlimits.proto for package 'Google.Shopping.Merchant.Quota.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/quota/v1/accountlimits_pb' - -module Google - module Shopping - module Merchant - module Quota - module V1 - module AccountLimitsService - # Service to retrieve account limits. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.quota.v1.AccountLimitsService' - - # Retrieves an account limit. - rpc :GetAccountLimit, ::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest, ::Google::Shopping::Merchant::Quota::V1::AccountLimit - # Lists the limits of an account. - rpc :ListAccountLimits, ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest, ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_pb.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_pb.rb deleted file mode 100644 index 9cf76dec339e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_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/quota/v1/quota.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n-google/shopping/merchant/quota/v1/quota.proto\x12!google.shopping.merchant.quota.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xab\x02\n\nQuotaGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bquota_usage\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bquota_limit\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1f\n\x12quota_minute_limit\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12M\n\x0emethod_details\x18\x04 \x03(\x0b\x32\x30.google.shopping.merchant.quota.v1.MethodDetailsB\x03\xe0\x41\x03:f\xea\x41\x63\n%merchantapi.googleapis.com/QuotaGroup\x12!accounts/{account}/groups/{group}*\x0bquotaGroups2\nquotaGroup\"b\n\rMethodDetails\x12\x13\n\x06method\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06subapi\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\x88\x01\n\x16ListQuotaGroupsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%merchantapi.googleapis.com/QuotaGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"w\n\x17ListQuotaGroupsResponse\x12\x43\n\x0cquota_groups\x18\x01 \x03(\x0b\x32-.google.shopping.merchant.quota.v1.QuotaGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x99\x02\n\x0cQuotaService\x12\xbf\x01\n\x0fListQuotaGroups\x12\x39.google.shopping.merchant.quota.v1.ListQuotaGroupsRequest\x1a:.google.shopping.merchant.quota.v1.ListQuotaGroupsResponse\"5\xda\x41\x06parent\x82\xd3\xe4\x93\x02&\x12$/quota/v1/{parent=accounts/*}/quotas\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xa3\x02\n%com.google.shopping.merchant.quota.v1B\nQuotaProtoP\x01ZAcloud.google.com/go/shopping/merchant/quota/apiv1/quotapb;quotapb\xaa\x02!Google.Shopping.Merchant.Quota.V1\xca\x02!Google\\Shopping\\Merchant\\Quota\\V1\xea\x02%Google::Shopping::Merchant::Quota::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 Quota - module V1 - QuotaGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.QuotaGroup").msgclass - MethodDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.MethodDetails").msgclass - ListQuotaGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.ListQuotaGroupsRequest").msgclass - ListQuotaGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1.ListQuotaGroupsResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service.rb deleted file mode 100644 index 1c7035b165fe..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_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/quota/v1/version" - -require "google/shopping/merchant/quota/v1/quota_service/credentials" -require "google/shopping/merchant/quota/v1/quota_service/paths" -require "google/shopping/merchant/quota/v1/quota_service/client" -require "google/shopping/merchant/quota/v1/quota_service/rest" - -module Google - module Shopping - module Merchant - module Quota - module V1 - ## - # Service to get method call quota information per Merchant API method. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/quota/v1/quota_service" - # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/quota/v1/quota_service/rest" - # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new - # - module QuotaService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "quota_service", "helpers.rb" -require "google/shopping/merchant/quota/v1/quota_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/client.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/client.rb deleted file mode 100644 index cac86d4915ee..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/client.rb +++ /dev/null @@ -1,495 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/quota/v1/quota_pb" - -module Google - module Shopping - module Merchant - module Quota - module V1 - module QuotaService - ## - # Client for the QuotaService service. - # - # Service to get method call quota information per Merchant API method. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :quota_service_stub - - ## - # Configure the QuotaService Client class. - # - # See {::Google::Shopping::Merchant::Quota::V1::QuotaService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all QuotaService clients - # ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Quota", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the QuotaService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Quota::V1::QuotaService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @quota_service_stub.universe_domain - end - - ## - # Create a new QuotaService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the QuotaService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/shopping/merchant/quota/v1/quota_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @quota_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Quota::V1::QuotaService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @quota_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @quota_service_stub.logger - end - - # Service calls - - ## - # Lists the daily call quota and usage per group for your Merchant - # Center account. - # - # @overload list_quota_groups(request, options = nil) - # Pass arguments to `list_quota_groups` via a request object, either of type - # {::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_quota_groups(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_quota_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the collection of method quotas - # Format: accounts/\\{account} - # @param page_size [::Integer] - # Optional. The maximum number of quotas to return in the response, used - # for paging. Defaults to 500; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Token (if provided) to retrieve the subsequent page. All other - # parameters must match the original call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1::QuotaGroup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1::QuotaGroup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/quota/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new - # - # # Call the list_quota_groups method. - # result = client.list_quota_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Quota::V1::QuotaGroup. - # p item - # end - # - def list_quota_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_quota_groups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Quota::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_quota_groups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_quota_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @quota_service_stub.call_rpc :list_quota_groups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @quota_service_stub, :list_quota_groups, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the QuotaService API. - # - # This class represents the configuration for QuotaService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Quota::V1::QuotaService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_quota_groups to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_quota_groups.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_quota_groups.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the QuotaService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_quota_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_quota_groups - - # @private - def initialize parent_rpcs = nil - list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups - @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/credentials.rb deleted file mode 100644 index 02aa06362571..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_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 Quota - module V1 - module QuotaService - # Credentials for the QuotaService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/paths.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/paths.rb deleted file mode 100644 index 69b95c435a8e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/paths.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Quota - module V1 - module QuotaService - # Path helper methods for the QuotaService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest.rb deleted file mode 100644 index 2568e7e678db..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_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/quota/v1/version" - -require "google/shopping/merchant/quota/v1/quota_service/credentials" -require "google/shopping/merchant/quota/v1/quota_service/paths" -require "google/shopping/merchant/quota/v1/quota_service/rest/client" - -module Google - module Shopping - module Merchant - module Quota - module V1 - ## - # Service to get method call quota information per Merchant API method. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/quota/v1/quota_service/rest" - # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new - # - module QuotaService - # 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/quota/v1/quota_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/client.rb deleted file mode 100644 index 9185e88b581d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/client.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! - -require "google/cloud/errors" -require "google/shopping/merchant/quota/v1/quota_pb" -require "google/shopping/merchant/quota/v1/quota_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Quota - module V1 - module QuotaService - module Rest - ## - # REST client for the QuotaService service. - # - # Service to get method call quota information per Merchant API method. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :quota_service_stub - - ## - # Configure the QuotaService Client class. - # - # See {::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all QuotaService clients - # ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Quota", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the QuotaService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @quota_service_stub.universe_domain - end - - ## - # Create a new QuotaService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the QuotaService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @quota_service_stub = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @quota_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @quota_service_stub.logger - end - - # Service calls - - ## - # Lists the daily call quota and usage per group for your Merchant - # Center account. - # - # @overload list_quota_groups(request, options = nil) - # Pass arguments to `list_quota_groups` via a request object, either of type - # {::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_quota_groups(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_quota_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the collection of method quotas - # Format: accounts/\\{account} - # @param page_size [::Integer] - # Optional. The maximum number of quotas to return in the response, used - # for paging. Defaults to 500; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Token (if provided) to retrieve the subsequent page. All other - # parameters must match the original call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1::QuotaGroup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1::QuotaGroup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/quota/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new - # - # # Call the list_quota_groups method. - # result = client.list_quota_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Quota::V1::QuotaGroup. - # p item - # end - # - def list_quota_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_quota_groups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Quota::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_quota_groups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_quota_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @quota_service_stub.list_quota_groups request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @quota_service_stub, :list_quota_groups, "quota_groups", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the QuotaService REST API. - # - # This class represents the configuration for QuotaService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_quota_groups to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_quota_groups.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_quota_groups.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the QuotaService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_quota_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_quota_groups - - # @private - def initialize parent_rpcs = nil - list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups - @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_service/rest/service_stub.rb deleted file mode 100644 index 57f91712efa8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_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/quota/v1/quota_pb" - -module Google - module Shopping - module Merchant - module Quota - module V1 - module QuotaService - module Rest - ## - # REST service stub for the QuotaService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_quota_groups REST call - # - # @param request_pb [::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse] - # A result object deserialized from the server's reply - def list_quota_groups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_quota_groups_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_quota_groups", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_quota_groups REST call - # - # @param request_pb [::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_quota_groups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/quota/v1/{parent}/quotas", - 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-quota-v1/lib/google/shopping/merchant/quota/v1/quota_services_pb.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_services_pb.rb deleted file mode 100644 index 09d599f405c2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/quota_services_pb.rb +++ /dev/null @@ -1,48 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/quota/v1/quota.proto for package 'Google.Shopping.Merchant.Quota.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/quota/v1/quota_pb' - -module Google - module Shopping - module Merchant - module Quota - module V1 - module QuotaService - # Service to get method call quota information per Merchant API method. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.quota.v1.QuotaService' - - # Lists the daily call quota and usage per group for your Merchant - # Center account. - rpc :ListQuotaGroups, ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest, ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/rest.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/rest.rb deleted file mode 100644 index 2df2b5ac90b1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/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/quota/v1/account_limits_service/rest" -require "google/shopping/merchant/quota/v1/quota_service/rest" -require "google/shopping/merchant/quota/v1/version" - -module Google - module Shopping - module Merchant - module Quota - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/quota/v1/rest" - # client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/version.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/v1/version.rb deleted file mode 100644 index 5751f36329a1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/lib/google/shopping/merchant/quota/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 Quota - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/README.md deleted file mode 100644 index 110adc2cf42e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1/proto_docs/google/shopping/merchant/quota/v1/accountlimits.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/shopping/merchant/quota/v1/accountlimits.rb deleted file mode 100644 index 509e3562c90d..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/shopping/merchant/quota/v1/accountlimits.rb +++ /dev/null @@ -1,118 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Quota - module V1 - # The limit for products. - # @!attribute [rw] scope - # @return [::Google::Shopping::Merchant::Quota::V1::ProductLimit::Scope] - # Required. The scope of the product limit. - # @!attribute [rw] limit - # @return [::Integer] - # Required. The maximum number of products that are allowed in the account in - # the given scope. - class ProductLimit - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The scope of the limit. - module Scope - # Default value. Should not be used. - SCOPE_UNSPECIFIED = 0 - - # Limit for products in non-EEA countries. - ADS_NON_EEA = 1 - - # Limit for products in EEA countries. - ADS_EEA = 2 - end - end - - # A limit of a certain type that is applied to an account. - # @!attribute [rw] products - # @return [::Google::Shopping::Merchant::Quota::V1::ProductLimit] - # The limit for products. - # @!attribute [rw] name - # @return [::String] - # Identifier. The limit part of the name will be a combination of the type - # and the scope. For example: `accounts/123/limits/products~ADS_NON_EEA` - # - # Format: `accounts/{account}/limits/{limit}` - class AccountLimit - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetAccountLimit` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the limit to retrieve. - # Format: `accounts/{account}/limits/{limit}` - # For example: `accounts/123/limits/products~ADS_NON_EEA` - class GetAccountLimitRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListAccountLimits` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent account. - # Format: `accounts/{account}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of limits to return. The service may return - # fewer than this value. If unspecified, at most 100 limits will be returned. - # The maximum value is 100; values above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListAccountLimits` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListAccountLimits` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Required. A filter on the limit `type` is required, for example, `type = - # "products"`. - class ListAccountLimitsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListAccountLimits` method. - # @!attribute [rw] account_limits - # @return [::Array<::Google::Shopping::Merchant::Quota::V1::AccountLimit>] - # The limits for the given 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 ListAccountLimitsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/shopping/merchant/quota/v1/quota.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/shopping/merchant/quota/v1/quota.rb deleted file mode 100644 index 98917f68b183..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/proto_docs/google/shopping/merchant/quota/v1/quota.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Quota - module V1 - # The group information for methods in the Merchant API. The quota is shared - # between all methods in the group. Even if none of the methods within the - # group have usage the information for the group is returned. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the quota group. - # Format: accounts/\\{account}/quotas/\\{group} - # Note: There is no guarantee on the format of \\{group} - # @!attribute [r] quota_usage - # @return [::Integer] - # Output only. The current quota usage, meaning the number of calls already - # made on a given day to the methods in the group. The daily quota limits - # reset at at 12:00 PM midday UTC. - # @!attribute [r] quota_limit - # @return [::Integer] - # Output only. The maximum number of calls allowed per day for the group. - # @!attribute [r] quota_minute_limit - # @return [::Integer] - # Output only. The maximum number of calls allowed per minute for the group. - # @!attribute [r] method_details - # @return [::Array<::Google::Shopping::Merchant::Quota::V1::MethodDetails>] - # Output only. List of all methods group quota applies to. - class QuotaGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The method details per method in the Merchant API. - # @!attribute [r] method - # @return [::String] - # Output only. The name of the method for example `products.list`. - # @!attribute [r] version - # @return [::String] - # Output only. The API version that the method belongs to. - # @!attribute [r] subapi - # @return [::String] - # Output only. The sub-API that the method belongs to. - # @!attribute [r] path - # @return [::String] - # Output only. The path for the method such as - # `products/v1/productInputs.insert` - class MethodDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListQuotaGroups method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account who owns the collection of method quotas - # Format: accounts/\\{account} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of quotas to return in the response, used - # for paging. Defaults to 500; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Token (if provided) to retrieve the subsequent page. All other - # parameters must match the original call that provided the page token. - class ListQuotaGroupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListMethodGroups method. - # @!attribute [rw] quota_groups - # @return [::Array<::Google::Shopping::Merchant::Quota::V1::QuotaGroup>] - # The methods, current quota usage and limits per each group. The quota is - # shared between all methods in the group. The groups are sorted in - # descending order based on - # {::Google::Shopping::Merchant::Quota::V1::QuotaGroup#quota_usage quota_usage}. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListQuotaGroupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/Gemfile deleted file mode 100644 index 23d73805391f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1", path: "../" -else - gem "google-shopping-merchant-quota-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-quota-v1/snippets/account_limits_service/get_account_limit.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/account_limits_service/get_account_limit.rb deleted file mode 100644 index c8dbfb1752a8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/account_limits_service/get_account_limit.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_AccountLimitsService_GetAccountLimit_sync] -require "google/shopping/merchant/quota/v1" - -## -# Snippet for the get_account_limit call in the AccountLimitsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client#get_account_limit. -# -def get_account_limit - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest.new - - # Call the get_account_limit method. - result = client.get_account_limit request - - # The returned object is of type Google::Shopping::Merchant::Quota::V1::AccountLimit. - p result -end -# [END merchantapi_v1_generated_AccountLimitsService_GetAccountLimit_sync] diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/account_limits_service/list_account_limits.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/account_limits_service/list_account_limits.rb deleted file mode 100644 index 4f53fbe04f06..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/account_limits_service/list_account_limits.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_AccountLimitsService_ListAccountLimits_sync] -require "google/shopping/merchant/quota/v1" - -## -# Snippet for the list_account_limits call in the AccountLimitsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client#list_account_limits. -# -def list_account_limits - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest.new - - # Call the list_account_limits method. - result = client.list_account_limits request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Quota::V1::AccountLimit. - p item - end -end -# [END merchantapi_v1_generated_AccountLimitsService_ListAccountLimits_sync] diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/quota_service/list_quota_groups.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/quota_service/list_quota_groups.rb deleted file mode 100644 index 15fdfe68d427..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/quota_service/list_quota_groups.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1_generated_QuotaService_ListQuotaGroups_sync] -require "google/shopping/merchant/quota/v1" - -## -# Snippet for the list_quota_groups call in the QuotaService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Quota::V1::QuotaService::Client#list_quota_groups. -# -def list_quota_groups - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new - - # Call the list_quota_groups method. - result = client.list_quota_groups request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Quota::V1::QuotaGroup. - p item - end -end -# [END merchantapi_v1_generated_QuotaService_ListQuotaGroups_sync] diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/snippet_metadata_google.shopping.merchant.quota.v1.json b/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/snippet_metadata_google.shopping.merchant.quota.v1.json deleted file mode 100644 index 801659ccac57..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/snippets/snippet_metadata_google.shopping.merchant.quota.v1.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-quota-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.quota.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1_generated_AccountLimitsService_GetAccountLimit_sync", - "title": "Snippet for the get_account_limit call in the AccountLimitsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client#get_account_limit.", - "file": "account_limits_service/get_account_limit.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_account_limit", - "full_name": "::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client#get_account_limit", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Quota::V1::AccountLimit", - "client": { - "short_name": "AccountLimitsService::Client", - "full_name": "::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client" - }, - "method": { - "short_name": "GetAccountLimit", - "full_name": "google.shopping.merchant.quota.v1.AccountLimitsService.GetAccountLimit", - "service": { - "short_name": "AccountLimitsService", - "full_name": "google.shopping.merchant.quota.v1.AccountLimitsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_AccountLimitsService_ListAccountLimits_sync", - "title": "Snippet for the list_account_limits call in the AccountLimitsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client#list_account_limits.", - "file": "account_limits_service/list_account_limits.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_account_limits", - "full_name": "::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client#list_account_limits", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsResponse", - "client": { - "short_name": "AccountLimitsService::Client", - "full_name": "::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client" - }, - "method": { - "short_name": "ListAccountLimits", - "full_name": "google.shopping.merchant.quota.v1.AccountLimitsService.ListAccountLimits", - "service": { - "short_name": "AccountLimitsService", - "full_name": "google.shopping.merchant.quota.v1.AccountLimitsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "merchantapi_v1_generated_QuotaService_ListQuotaGroups_sync", - "title": "Snippet for the list_quota_groups call in the QuotaService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Quota::V1::QuotaService::Client#list_quota_groups.", - "file": "quota_service/list_quota_groups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_quota_groups", - "full_name": "::Google::Shopping::Merchant::Quota::V1::QuotaService::Client#list_quota_groups", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse", - "client": { - "short_name": "QuotaService::Client", - "full_name": "::Google::Shopping::Merchant::Quota::V1::QuotaService::Client" - }, - "method": { - "short_name": "ListQuotaGroups", - "full_name": "google.shopping.merchant.quota.v1.QuotaService.ListQuotaGroups", - "service": { - "short_name": "QuotaService", - "full_name": "google.shopping.merchant.quota.v1.QuotaService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_paths_test.rb deleted file mode 100644 index 2ba6283c89f6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_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/quota/v1/account_limits_service" - -class ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::ClientPathsTest < Minitest::Test - class DummyStub - 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::Quota::V1::AccountLimitsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_account_limit_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_limit_path account: "value0", limit: "value1" - assert_equal "accounts/value0/limits/value1", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_rest_test.rb deleted file mode 100644 index bfb4cd838f94..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_rest_test.rb +++ /dev/null @@ -1,210 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/quota/v1/accountlimits_pb" -require "google/shopping/merchant/quota/v1/account_limits_service/rest" - - -class ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_account_limit - # Create test objects. - client_result = ::Google::Shopping::Merchant::Quota::V1::AccountLimit.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_limit_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::ServiceStub.stub :transcode_get_account_limit_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_account_limit_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_account_limit({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_account_limit name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_account_limit ::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_account_limit({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_account_limit(::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_account_limit_client_stub.call_count - end - end - end - - def test_list_account_limits - # Create test objects. - client_result = ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_account_limits_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::ServiceStub.stub :transcode_list_account_limits_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_account_limits_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_account_limits({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_account_limits parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_account_limits ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_account_limits({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_account_limits(::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_account_limits_client_stub.call_count - end - end - end - - def test_configure - 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::Quota::V1::AccountLimitsService::Rest::Client.new do |config| - 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::Quota::V1::AccountLimitsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_test.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_test.rb deleted file mode 100644 index 154067e2c3c0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/account_limits_service_test.rb +++ /dev/null @@ -1,231 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/quota/v1/accountlimits_pb" -require "google/shopping/merchant/quota/v1/account_limits_service" - -class ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_account_limit - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Quota::V1::AccountLimit.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_account_limit_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_account_limit, name - assert_kind_of ::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_account_limit_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_account_limit({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_account_limit name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_account_limit ::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_account_limit({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_account_limit(::Google::Shopping::Merchant::Quota::V1::GetAccountLimitRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_account_limit_client_stub.call_rpc_count - end - end - - def test_list_account_limits - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_account_limits_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_account_limits, name - assert_kind_of ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_account_limits_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_account_limits({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_account_limits parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_account_limits ::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_account_limits({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_account_limits(::Google::Shopping::Merchant::Quota::V1::ListAccountLimitsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_account_limits_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :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::Quota::V1::AccountLimitsService::Client.new do |config| - 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::Quota::V1::AccountLimitsService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::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::Quota::V1::AccountLimitsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Quota::V1::AccountLimitsService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_paths_test.rb deleted file mode 100644 index 0302cab2d1e6..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_paths_test.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/quota/v1/quota_service" - -class ::Google::Shopping::Merchant::Quota::V1::QuotaService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_rest_test.rb deleted file mode 100644 index 5b6df299142b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_rest_test.rb +++ /dev/null @@ -1,155 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/quota/v1/quota_pb" -require "google/shopping/merchant/quota/v1/quota_service/rest" - - -class ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_quota_groups - # Create test objects. - client_result = ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_quota_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::ServiceStub.stub :transcode_list_quota_groups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_quota_groups_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_quota_groups parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_quota_groups ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_quota_groups(::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_quota_groups_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Shopping::Merchant::Quota::V1::QuotaService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_test.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_test.rb deleted file mode 100644 index a47367275016..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/test/google/shopping/merchant/quota/v1/quota_service_test.rb +++ /dev/null @@ -1,171 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/quota/v1/quota_pb" -require "google/shopping/merchant/quota/v1/quota_service" - -class ::Google::Shopping::Merchant::Quota::V1::QuotaService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_quota_groups - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_quota_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_quota_groups, name - assert_kind_of ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_quota_groups_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_quota_groups parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_quota_groups ::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_quota_groups(::Google::Shopping::Merchant::Quota::V1::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_quota_groups_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Quota::V1::QuotaService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1/test/helper.rb b/owl-bot-staging/google-shopping-merchant-quota-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-quota-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/.repo-metadata.json b/owl-bot-staging/google-shopping-merchant-quota-v1beta/.repo-metadata.json deleted file mode 100644 index 82d52958e89e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta", - "distribution_name": "google-shopping-merchant-quota-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-quota-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-quota 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-quota-v1beta/.rubocop.yml b/owl-bot-staging/google-shopping-merchant-quota-v1beta/.rubocop.yml deleted file mode 100644 index ecbd18ed6270..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-shopping-merchant-quota-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-quota-v1beta.rb" diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/.toys.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta/.yardopts b/owl-bot-staging/google-shopping-merchant-quota-v1beta/.yardopts deleted file mode 100644 index 3ddd15e0cf87..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-shopping-merchant-quota-v1beta/AUTHENTICATION.md deleted file mode 100644 index 98912d8eb3ca..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-shopping-merchant-quota-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-quota-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/quota/v1beta" - -client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::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/quota/v1beta" - -::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::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-quota-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/quota/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::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-quota-v1beta/CHANGELOG.md b/owl-bot-staging/google-shopping-merchant-quota-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/Gemfile b/owl-bot-staging/google-shopping-merchant-quota-v1beta/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/LICENSE.md b/owl-bot-staging/google-shopping-merchant-quota-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta/README.md b/owl-bot-staging/google-shopping-merchant-quota-v1beta/README.md deleted file mode 100644 index 7eb62ce75fd3..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota](https://rubygems.org/gems/google-shopping-merchant-quota). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-shopping-merchant-quota-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/quota/v1beta" - -client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new -request = ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest.new # (request fields as keyword arguments...) -response = client.list_quota_groups request -``` - -View the [Client Library Documentation](https://rubydoc.info/gems/google-shopping-merchant-quota-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/quota/v1beta" -require "logger" - -client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-quota`, -and lower-level _versioned_ client libraries with names such as -`google-shopping-merchant-quota-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-quota`. -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-quota-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-quota-v1beta/Rakefile b/owl-bot-staging/google-shopping-merchant-quota-v1beta/Rakefile deleted file mode 100644 index c768f7ee70d1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-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/quota/v1beta/quota_service/credentials" - ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::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-quota-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-quota-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-quota-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-quota-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-shopping-merchant-quota-v1beta" - header "google-shopping-merchant-quota-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-shopping-merchant-quota-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-shopping-merchant-quota-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-quota-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-quota-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-quota-v1beta/gapic_metadata.json b/owl-bot-staging/google-shopping-merchant-quota-v1beta/gapic_metadata.json deleted file mode 100644 index 994e71129897..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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.quota.v1beta", - "libraryPackage": "::Google::Shopping::Merchant::Quota::V1beta", - "services": { - "QuotaService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client", - "rpcs": { - "ListQuotaGroups": { - "methods": [ - "list_quota_groups" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/google-shopping-merchant-quota-v1beta.gemspec b/owl-bot-staging/google-shopping-merchant-quota-v1beta/google-shopping-merchant-quota-v1beta.gemspec deleted file mode 100644 index 80797fd88c0c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/google-shopping-merchant-quota-v1beta.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/shopping/merchant/quota/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-shopping-merchant-quota-v1beta" - gem.version = Google::Shopping::Merchant::Quota::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-quota-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-shopping-merchant-quota instead. See the readme for more details." - gem.summary = "Programmatically manage your Merchant Center accounts." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google-shopping-merchant-quota-v1beta.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google-shopping-merchant-quota-v1beta.rb deleted file mode 100644 index dcfef8dd8a22..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google-shopping-merchant-quota-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/quota/v1beta" diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta.rb deleted file mode 100644 index 977196bec81a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/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/quota/v1beta/quota_service" -require "google/shopping/merchant/quota/v1beta/version" - -module Google - module Shopping - module Merchant - module Quota - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/shopping/merchant/quota/v1beta" - # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/shopping/merchant/quota/v1beta" - # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/shopping/merchant/quota/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_pb.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_pb.rb deleted file mode 100644 index 53ba336dd3d5..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_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/quota/v1beta/quota.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n1google/shopping/merchant/quota/v1beta/quota.proto\x12%google.shopping.merchant.quota.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xaf\x02\n\nQuotaGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bquota_usage\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bquota_limit\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1f\n\x12quota_minute_limit\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12Q\n\x0emethod_details\x18\x04 \x03(\x0b\x32\x34.google.shopping.merchant.quota.v1beta.MethodDetailsB\x03\xe0\x41\x03:f\xea\x41\x63\n%merchantapi.googleapis.com/QuotaGroup\x12!accounts/{account}/groups/{group}*\x0bquotaGroups2\nquotaGroup\"b\n\rMethodDetails\x12\x13\n\x06method\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06subapi\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\x88\x01\n\x16ListQuotaGroupsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%merchantapi.googleapis.com/QuotaGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"{\n\x17ListQuotaGroupsResponse\x12G\n\x0cquota_groups\x18\x01 \x03(\x0b\x32\x31.google.shopping.merchant.quota.v1beta.QuotaGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xa5\x02\n\x0cQuotaService\x12\xcb\x01\n\x0fListQuotaGroups\x12=.google.shopping.merchant.quota.v1beta.ListQuotaGroupsRequest\x1a>.google.shopping.merchant.quota.v1beta.ListQuotaGroupsResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/quota/v1beta/{parent=accounts/*}/quotas\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xbb\x01\n)com.google.shopping.merchant.quota.v1betaB\nQuotaProtoP\x01ZEcloud.google.com/go/shopping/merchant/quota/apiv1beta/quotapb;quotapb\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 Quota - module V1beta - QuotaGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1beta.QuotaGroup").msgclass - MethodDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1beta.MethodDetails").msgclass - ListQuotaGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1beta.ListQuotaGroupsRequest").msgclass - ListQuotaGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.quota.v1beta.ListQuotaGroupsResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service.rb deleted file mode 100644 index f4b3e9f55f81..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_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/quota/v1beta/version" - -require "google/shopping/merchant/quota/v1beta/quota_service/credentials" -require "google/shopping/merchant/quota/v1beta/quota_service/paths" -require "google/shopping/merchant/quota/v1beta/quota_service/client" -require "google/shopping/merchant/quota/v1beta/quota_service/rest" - -module Google - module Shopping - module Merchant - module Quota - module V1beta - ## - # Service to get method call quota information per Merchant API method. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/shopping/merchant/quota/v1beta/quota_service" - # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/shopping/merchant/quota/v1beta/quota_service/rest" - # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new - # - module QuotaService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "quota_service", "helpers.rb" -require "google/shopping/merchant/quota/v1beta/quota_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/client.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/client.rb deleted file mode 100644 index ce910c300d2b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/client.rb +++ /dev/null @@ -1,495 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/quota/v1beta/quota_pb" - -module Google - module Shopping - module Merchant - module Quota - module V1beta - module QuotaService - ## - # Client for the QuotaService service. - # - # Service to get method call quota information per Merchant API method. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :quota_service_stub - - ## - # Configure the QuotaService Client class. - # - # See {::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all QuotaService clients - # ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Quota", "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 QuotaService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @quota_service_stub.universe_domain - end - - ## - # Create a new QuotaService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the QuotaService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/shopping/merchant/quota/v1beta/quota_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @quota_service_stub = ::Gapic::ServiceStub.new( - ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @quota_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @quota_service_stub.logger - end - - # Service calls - - ## - # Lists the daily call quota and usage per group for your Merchant - # Center account. - # - # @overload list_quota_groups(request, options = nil) - # Pass arguments to `list_quota_groups` via a request object, either of type - # {::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_quota_groups(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_quota_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the collection of method quotas - # Format: accounts/\\{account} - # @param page_size [::Integer] - # Optional. The maximum number of quotas to return in the response, used - # for paging. Defaults to 500; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Token (if provided) to retrieve the subsequent page. All other - # parameters must match the original call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1beta::QuotaGroup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1beta::QuotaGroup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/shopping/merchant/quota/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest.new - # - # # Call the list_quota_groups method. - # result = client.list_quota_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Quota::V1beta::QuotaGroup. - # p item - # end - # - def list_quota_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_quota_groups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Quota::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_quota_groups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_quota_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @quota_service_stub.call_rpc :list_quota_groups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @quota_service_stub, :list_quota_groups, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the QuotaService API. - # - # This class represents the configuration for QuotaService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_quota_groups to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_quota_groups.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_quota_groups.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the QuotaService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_quota_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_quota_groups - - # @private - def initialize parent_rpcs = nil - list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups - @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/credentials.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/credentials.rb deleted file mode 100644 index a19ac3012c6e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_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 Quota - module V1beta - module QuotaService - # Credentials for the QuotaService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/content" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/paths.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/paths.rb deleted file mode 100644 index 6e36a3756c8a..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/paths.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Quota - module V1beta - module QuotaService - # Path helper methods for the QuotaService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest.rb deleted file mode 100644 index 99ace1692d6f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_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/quota/v1beta/version" - -require "google/shopping/merchant/quota/v1beta/quota_service/credentials" -require "google/shopping/merchant/quota/v1beta/quota_service/paths" -require "google/shopping/merchant/quota/v1beta/quota_service/rest/client" - -module Google - module Shopping - module Merchant - module Quota - module V1beta - ## - # Service to get method call quota information per Merchant API method. - # - # To load this service and instantiate a REST client: - # - # require "google/shopping/merchant/quota/v1beta/quota_service/rest" - # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new - # - module QuotaService - # 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/quota/v1beta/quota_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest/client.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest/client.rb deleted file mode 100644 index 5793455107d2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest/client.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! - -require "google/cloud/errors" -require "google/shopping/merchant/quota/v1beta/quota_pb" -require "google/shopping/merchant/quota/v1beta/quota_service/rest/service_stub" - -module Google - module Shopping - module Merchant - module Quota - module V1beta - module QuotaService - module Rest - ## - # REST client for the QuotaService service. - # - # Service to get method call quota information per Merchant API method. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "merchantapi.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :quota_service_stub - - ## - # Configure the QuotaService Client class. - # - # See {::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all QuotaService clients - # ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Shopping", "Merchant", "Quota", "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 QuotaService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @quota_service_stub.universe_domain - end - - ## - # Create a new QuotaService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the QuotaService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @quota_service_stub = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @quota_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @quota_service_stub.logger - end - - # Service calls - - ## - # Lists the daily call quota and usage per group for your Merchant - # Center account. - # - # @overload list_quota_groups(request, options = nil) - # Pass arguments to `list_quota_groups` via a request object, either of type - # {::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_quota_groups(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_quota_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The merchant account who owns the collection of method quotas - # Format: accounts/\\{account} - # @param page_size [::Integer] - # Optional. The maximum number of quotas to return in the response, used - # for paging. Defaults to 500; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Token (if provided) to retrieve the subsequent page. All other - # parameters must match the original call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1beta::QuotaGroup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Shopping::Merchant::Quota::V1beta::QuotaGroup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/shopping/merchant/quota/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest.new - # - # # Call the list_quota_groups method. - # result = client.list_quota_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Shopping::Merchant::Quota::V1beta::QuotaGroup. - # p item - # end - # - def list_quota_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_quota_groups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Shopping::Merchant::Quota::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_quota_groups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_quota_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @quota_service_stub.list_quota_groups request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @quota_service_stub, :list_quota_groups, "quota_groups", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the QuotaService REST API. - # - # This class represents the configuration for QuotaService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_quota_groups to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_quota_groups.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_quota_groups.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the QuotaService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_quota_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_quota_groups - - # @private - def initialize parent_rpcs = nil - list_quota_groups_config = parent_rpcs.list_quota_groups if parent_rpcs.respond_to? :list_quota_groups - @list_quota_groups = ::Gapic::Config::Method.new list_quota_groups_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest/service_stub.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_service/rest/service_stub.rb deleted file mode 100644 index 5222fa1d85ed..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_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/quota/v1beta/quota_pb" - -module Google - module Shopping - module Merchant - module Quota - module V1beta - module QuotaService - module Rest - ## - # REST service stub for the QuotaService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_quota_groups REST call - # - # @param request_pb [::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsResponse] - # A result object deserialized from the server's reply - def list_quota_groups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_quota_groups_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_quota_groups", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_quota_groups REST call - # - # @param request_pb [::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_quota_groups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/quota/v1beta/{parent}/quotas", - 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-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_services_pb.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_services_pb.rb deleted file mode 100644 index 4ac187ad3350..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/quota_services_pb.rb +++ /dev/null @@ -1,48 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/shopping/merchant/quota/v1beta/quota.proto for package 'google.shopping.merchant.quota.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/quota/v1beta/quota_pb' - -module Google - module Shopping - module Merchant - module Quota - module V1beta - module QuotaService - # Service to get method call quota information per Merchant API method. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.shopping.merchant.quota.v1beta.QuotaService' - - # Lists the daily call quota and usage per group for your Merchant - # Center account. - rpc :ListQuotaGroups, ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest, ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/rest.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/rest.rb deleted file mode 100644 index 4fcd8b4889ab..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/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/quota/v1beta/quota_service/rest" -require "google/shopping/merchant/quota/v1beta/version" - -module Google - module Shopping - module Merchant - module Quota - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/shopping/merchant/quota/v1beta/rest" - # client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new - # - module V1beta - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/version.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/v1beta/version.rb deleted file mode 100644 index c90a0137b2b0..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/lib/google/shopping/merchant/quota/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 Quota - module V1beta - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/README.md b/owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/README.md deleted file mode 100644 index 03467a3756be..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta/proto_docs/google/shopping/merchant/quota/v1beta/quota.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/shopping/merchant/quota/v1beta/quota.rb deleted file mode 100644 index a29fd3bc636f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/proto_docs/google/shopping/merchant/quota/v1beta/quota.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Shopping - module Merchant - module Quota - module V1beta - # The group information for methods in the Merchant API. The quota is shared - # between all methods in the group. Even if none of the methods within the - # group have usage the information for the group is returned. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the quota group. - # Format: accounts/\\{account}/quotas/\\{group} - # Note: There is no guarantee on the format of \\{group} - # @!attribute [r] quota_usage - # @return [::Integer] - # Output only. The current quota usage, meaning the number of calls already - # made on a given day to the methods in the group. The daily quota limits - # reset at at 12:00 PM midday UTC. - # @!attribute [r] quota_limit - # @return [::Integer] - # Output only. The maximum number of calls allowed per day for the group. - # @!attribute [r] quota_minute_limit - # @return [::Integer] - # Output only. The maximum number of calls allowed per minute for the group. - # @!attribute [r] method_details - # @return [::Array<::Google::Shopping::Merchant::Quota::V1beta::MethodDetails>] - # Output only. List of all methods group quota applies to. - class QuotaGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The method details per method in the Merchant API. - # @!attribute [r] method - # @return [::String] - # Output only. The name of the method for example `products.list`. - # @!attribute [r] version - # @return [::String] - # Output only. The API version that the method belongs to. - # @!attribute [r] subapi - # @return [::String] - # Output only. The sub-API that the method belongs to. - # @!attribute [r] path - # @return [::String] - # Output only. The path for the method such as - # `products/v1/productInputs.insert` - class MethodDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListQuotaGroups method. - # @!attribute [rw] parent - # @return [::String] - # Required. The merchant account who owns the collection of method quotas - # Format: accounts/\\{account} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of quotas to return in the response, used - # for paging. Defaults to 500; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Token (if provided) to retrieve the subsequent page. All other - # parameters must match the original call that provided the page token. - class ListQuotaGroupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListMethodGroups method. - # @!attribute [rw] quota_groups - # @return [::Array<::Google::Shopping::Merchant::Quota::V1beta::QuotaGroup>] - # The methods, current quota usage and limits per each group. The quota is - # shared between all methods in the group. The groups are sorted in - # descending order based on - # [quotaUsage][google.shopping.merchant.quota.v1main.QuotaGroup.quota_usage]. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListQuotaGroupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/Gemfile b/owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/Gemfile deleted file mode 100644 index 5b0a2081824c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-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-quota-v1beta", path: "../" -else - gem "google-shopping-merchant-quota-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-quota-v1beta/snippets/quota_service/list_quota_groups.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/quota_service/list_quota_groups.rb deleted file mode 100644 index 21d599f72c9f..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/quota_service/list_quota_groups.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START merchantapi_v1beta_generated_QuotaService_ListQuotaGroups_sync] -require "google/shopping/merchant/quota/v1beta" - -## -# Snippet for the list_quota_groups call in the QuotaService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client#list_quota_groups. -# -def list_quota_groups - # Create a client object. The client can be reused for multiple calls. - client = Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest.new - - # Call the list_quota_groups method. - result = client.list_quota_groups request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Shopping::Merchant::Quota::V1beta::QuotaGroup. - p item - end -end -# [END merchantapi_v1beta_generated_QuotaService_ListQuotaGroups_sync] diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/snippet_metadata_google.shopping.merchant.quota.v1beta.json b/owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/snippet_metadata_google.shopping.merchant.quota.v1beta.json deleted file mode 100644 index 908a3f3a5db1..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/snippets/snippet_metadata_google.shopping.merchant.quota.v1beta.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "client_library": { - "name": "google-shopping-merchant-quota-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.shopping.merchant.quota.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "merchantapi_v1beta_generated_QuotaService_ListQuotaGroups_sync", - "title": "Snippet for the list_quota_groups call in the QuotaService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client#list_quota_groups.", - "file": "quota_service/list_quota_groups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_quota_groups", - "full_name": "::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client#list_quota_groups", - "async": false, - "parameters": [ - { - "type": "::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsResponse", - "client": { - "short_name": "QuotaService::Client", - "full_name": "::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client" - }, - "method": { - "short_name": "ListQuotaGroups", - "full_name": "google.shopping.merchant.quota.v1beta.QuotaService.ListQuotaGroups", - "service": { - "short_name": "QuotaService", - "full_name": "google.shopping.merchant.quota.v1beta.QuotaService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_paths_test.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_paths_test.rb deleted file mode 100644 index 8791e3bae6b2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_paths_test.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/quota/v1beta/quota_service" - -class ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_rest_test.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_rest_test.rb deleted file mode 100644 index 1e468b8aabf8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_rest_test.rb +++ /dev/null @@ -1,155 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/shopping/merchant/quota/v1beta/quota_pb" -require "google/shopping/merchant/quota/v1beta/quota_service/rest" - - -class ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_quota_groups - # Create test objects. - client_result = ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_quota_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::ServiceStub.stub :transcode_list_quota_groups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_quota_groups_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_quota_groups parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_quota_groups ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_quota_groups(::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_quota_groups_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_test.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_test.rb deleted file mode 100644 index 68ee67a98103..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/google/shopping/merchant/quota/v1beta/quota_service_test.rb +++ /dev/null @@ -1,171 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/shopping/merchant/quota/v1beta/quota_pb" -require "google/shopping/merchant/quota/v1beta/quota_service" - -class ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_quota_groups - # Create GRPC objects. - grpc_response = ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_quota_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_quota_groups, name - assert_kind_of ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_quota_groups_client_stub do - # Create client - client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_quota_groups parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_quota_groups ::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_quota_groups({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_quota_groups(::Google::Shopping::Merchant::Quota::V1beta::ListQuotaGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_quota_groups_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Shopping::Merchant::Quota::V1beta::QuotaService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/helper.rb b/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-quota-v1beta/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1/.gitignore b/owl-bot-staging/google-shopping-merchant-reports-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-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 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-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 e7ebc0e8d197..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.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-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 06a39d8d0730..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.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-shopping-type", "~> 1.0" -end diff --git a/owl-bot-staging/google-shopping-merchant-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 1fc5cad88cf2..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/client.rb +++ /dev/null @@ -1,504 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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](/merchant/api/reference/rest/reports_v1/accounts.reports). - # @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::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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `: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 50866c204d10..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/report_service/rest/client.rb +++ /dev/null @@ -1,454 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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](/merchant/api/reference/rest/reports_v1/accounts.reports). - # @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::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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `: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 eb83a7ff4516..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/lib/google/shopping/merchant/reports/v1/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/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\"\xbd\n\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\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\"\xa2\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\x83\x01\n#aggregated_reporting_context_status\x18\x1a \x01(\x0e\x32Q.google.shopping.merchant.reports.v1.ProductView.AggregatedReportingContextStatusH\x16\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\x17\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\"\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\"\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\"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::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 - 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 c00c192cbb54..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 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/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 74352be9c58c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-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 d231e3061292..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/proto_docs/google/shopping/merchant/reports/v1/reports.rb +++ /dev/null @@ -1,1292 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -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](/merchant/api/reference/rest/reports_v1/accounts.reports). - # @!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::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] 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::V1::ProductView::AggregatedReportingContextStatus] - # Aggregated status. - # @!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] - # 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::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. - # @!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. - # - # **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::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 - - # 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 95284a3a8ecc..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 - client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 7e5b5f6dc9ed..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 - client = ::Google::Shopping::Merchant::Reports::V1::ReportService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-reports-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-reports-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-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 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-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 665515ceb032..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.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-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 db4e7aa1ab14..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.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-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 d0c7126966f8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/client.rb +++ /dev/null @@ -1,503 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `: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 e18fdbefcb4b..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/lib/google/shopping/merchant/reports/v1beta/report_service/rest/client.rb +++ /dev/null @@ -1,453 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `: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 74352be9c58c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-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 2a9856765e68..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 - client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 608ef4d36ebe..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 - client = ::Google::Shopping::Merchant::Reports::V1beta::ReportService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reports-v1beta/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.gitignore b/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-shopping-merchant-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 1d08558908d8..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-shopping-merchant-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 913254327902..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.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-shopping-merchant-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 f1899985e359..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.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-shopping-type", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-shopping-merchant-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 b958b53b3b3e..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/client.rb +++ /dev/null @@ -1,786 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `: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 03c35edf5ad6..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,715 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/shopping/merchant/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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `: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 56d185c0fb35..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/client.rb +++ /dev/null @@ -1,781 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for 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. - # * `: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 fb219610fe3c..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,710 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "merchantapi.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_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. - # * `: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 74352be9c58c..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-shopping-merchant-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 efcfec182d1e..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 - client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_merchant_review({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_merchant_review name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.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 - client.get_merchant_review({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.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 - client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_merchant_review({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_merchant_review name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.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 - client.delete_merchant_review({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.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 3b13d9b5ae42..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 - client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_merchant_review({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_merchant_review name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_merchant_review({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_merchant_review name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 f156e3eea156..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 - client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_product_review({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_product_review name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.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 - client.get_product_review({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.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 - client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_product_review({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_product_review name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.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 - client.delete_product_review({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.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 d6334a4fc20a..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 - client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_product_review({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_product_review name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_product_review({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_product_review name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 672b337030e7..000000000000 --- a/owl-bot-staging/google-shopping-merchant-reviews-v1beta/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/grafeas-v1/.gitignore b/owl-bot-staging/grafeas-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/grafeas-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/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 1d08558908d8..000000000000 --- a/owl-bot-staging/grafeas-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/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 8ab5de2c8527..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.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `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 3c76d6adb8e0..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.2" - 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 12a5b5d82e12..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/cvss_pb.rb +++ /dev/null @@ -1,32 +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\"\xb8\x0b\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\"\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\"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\"{\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*S\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\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 - 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 8c994d359958..000000000000 --- a/owl-bot-staging/grafeas-v1/lib/grafeas/v1/grafeas/client.rb +++ /dev/null @@ -1,1808 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly 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. - # * `: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 cc6a9c38efd0..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\"\xa7\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\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\"\xb8\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\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 74352be9c58c..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/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 4f3b944949f3..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/cvss.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 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] - # 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::CVSS::AttackComplexity] - # @!attribute [rw] authentication - # @return [::Grafeas::V1::CVSS::Authentication] - # @!attribute [rw] privileges_required - # @return [::Grafeas::V1::CVSS::PrivilegesRequired] - # @!attribute [rw] user_interaction - # @return [::Grafeas::V1::CVSS::UserInteraction] - # @!attribute [rw] scope - # @return [::Grafeas::V1::CVSS::Scope] - # @!attribute [rw] confidentiality_impact - # @return [::Grafeas::V1::CVSS::Impact] - # @!attribute [rw] integrity_impact - # @return [::Grafeas::V1::CVSS::Impact] - # @!attribute [rw] availability_impact - # @return [::Grafeas::V1::CVSS::Impact] - class CVSS - 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 - - ATTACK_COMPLEXITY_MEDIUM = 3 - end - - module Authentication - AUTHENTICATION_UNSPECIFIED = 0 - - AUTHENTICATION_MULTIPLE = 1 - - AUTHENTICATION_SINGLE = 2 - - AUTHENTICATION_NONE = 3 - 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 - - IMPACT_PARTIAL = 4 - - IMPACT_COMPLETE = 5 - end - end - - # CVSS Version. - module CVSSVersion - CVSS_VERSION_UNSPECIFIED = 0 - - CVSS_VERSION_2 = 1 - - CVSS_VERSION_3 = 2 - 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 57c9b424760a..000000000000 --- a/owl-bot-staging/grafeas-v1/proto_docs/grafeas/v1/vulnerability.rb +++ /dev/null @@ -1,317 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module 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. - 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. - 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 87615088c6ce..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 - client = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_occurrence({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_occurrence name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_occurrence({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_occurrence name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_occurrence({ parent: parent, occurrence: occurrence }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_occurrence parent: parent, occurrence: occurrence do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_create_occurrences({ parent: parent, occurrences: occurrences }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_create_occurrences parent: parent, occurrences: occurrences do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_occurrence_note({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_occurrence_note name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_note({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_note name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_note({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_note name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_create_notes({ parent: parent, notes: notes }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_create_notes parent: parent, notes: notes do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Grafeas::V1::Grafeas::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 672b337030e7..000000000000 --- a/owl-bot-staging/grafeas-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct"